Returns vertex color
requiredColor is one of the control vertex data bits applied to colors (FORMAT_VERTEX_COLOR...)
If vertex format does provide required color, the model default color will be used
Syntax
//
// Linux, MacOS and non-Visual Studio Windows solutions (pure C++11 / C++98)
//
void GetVertexColor(
int64_t model,
const void * vertexBuffer,
int64_t vertexIndex,
int64_t setting,
int32_t * ambient,
int32_t * diffuse,
int32_t * emissive,
int32_t * specular
);
//
// Visual Studio for Windows
//
void __declspec(dllexport) __stdcall GetVertexColor(
__int64 model,
const void * vertexBuffer,
__int64 vertexIndex,
__int64 setting,
__int32 * ambient,
__int32 * diffuse,
__int32 * emissive,
__int32 * specular
);
Property model
Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.
Property vertexBuffer
Size: 64 bit / 8 byte (reference)
The array of vertices, this array is allocated by the host application. Depending on SetFormat() the array exists of 32 bit (4 byte) single precision floats or 64 bit (8 byte) double precision floats. Each vertex elements exists of several elemens, i.e. X, Y, Z values, but optionally also nX, nY, nZ, texture coordinates, bitangent / binormal coordinates, colors etc. What is contained is defined by SetFormat() and can be retrieved via GetFormat(). The host application has to make sure enough memory is allocated for the vertexBuffer array.
Property vertexIndex
Size: 64 bit / 8 byte (value)
The index in the vertex buffer.
Property setting
Size: 64 bit / 8 byte (value)
The setting is the data that is defined for bitwise operations, only bits set in the mask will be relevant.
Property ambient
Size: 64 bit / 8 byte (reference)
Defines a pointer to the ambient color as a 32 bit value that will be filled by this call; the 32 bit value is build up as 8 : 8 : 8 : 8 bits representing RGBA (or sometimes called RGBW), i.e. Red, Green, Blue, Alpha (transparency) each defined as a unsigned char value 0 .. 255.
Property diffuse
Size: 64 bit / 8 byte (reference)
Defines a pointer to the diffuse color as a 32 bit value that will be filled by this call; the 32 bit value is build up as 8 : 8 : 8 : 8 bits representing RGBA (or sometimes called RGBW), i.e. Red, Green, Blue, Alpha (transparency) each defined as a unsigned char value 0 .. 255.
Property emissive
Size: 64 bit / 8 byte (reference)
Defines a pointer to the emissive color as a 32 bit value that will be filled by this call; the 32 bit value is build up as 8 : 8 : 8 : 8 bits representing RGBA (or sometimes called RGBW), i.e. Red, Green, Blue, Alpha (transparency) each defined as a unsigned char value 0 .. 255.
Property specular
Size: 64 bit / 8 byte (reference)
Defines a pointer to the specular color as a 32 bit value that will be filled by this call; the 32 bit value is build up as 8 : 8 : 8 : 8 bits representing RGBA (or sometimes called RGBW), i.e. Red, Green, Blue, Alpha (transparency) each defined as a unsigned char value 0 .. 255.