GetVertexColor

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

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "GetVertexColor")]
public static extern void GetVertexColor(Int64 model, ref float vertexBuffer, Int64 vertexIndex, Int64 setting, out Int32 ambient, out Int32 diffuse, out Int32 emissive, out Int32 specular);

[DllImport(enginedll, EntryPoint = "GetVertexColor")]
public static extern void GetVertexColor(Int64 model, ref double vertexBuffer, Int64 vertexIndex, Int64 setting, out Int32 ambient, out Int32 diffuse, out Int32 emissive, out 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.