GetVertexColorDiffuse (inline)

...

Syntax

//
//   Linux, MacOS and non-Visual Studio Windows solutions (pure C++11 / C++98)
//

static  inline  int32_t GetVertexColorDiffuse(
                                int64_t             model,
                                const void          * vertexBuffer,
                                int64_t             vertexIndex,
                                int64_t             setting
                            )
{
    int32_t diffuse = 0;
    GetVertexColor(
            model,
            vertexBuffer,
            vertexIndex,
            setting,
            nullptr,        //    ambient
            &diffuse,
            nullptr,        //    emissive
            nullptr         //    specular
        );
    return  diffuse;
}


//
//   Visual Studio for Windows
//

static  inline  __int32 GetVertexColorDiffuse(
                                __int64             model,
                                const void          * vertexBuffer,
                                __int64             vertexIndex,
                                __int64             setting
                            )
{
    int32_t diffuse = 0;
    GetVertexColor(
            model,
            vertexBuffer,
            vertexIndex,
            setting,
            nullptr,        //    ambient
            &diffuse,
            nullptr,        //    emissive
            nullptr         //    specular
        );
    return  diffuse;
}
    

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: 32 bit / 4 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.