A3DGraphSolidPatternData

Fields

A3DBool

m_bMaterial

A3DUns32

m_uiRgbColorIndex

A3DUns32

m_uiNextPatternIndex

Detailed Description

struct A3DGraphSolidPatternData

A fill pattern describing either a simple color or a material.

A3DGraphSolidPatternData is one of the four fill pattern provided by HOOPS. It is associated to the kA3DTypeGraphSolidPattern entity type. The other available fill patterns are A3DGraphDottingPatternData, A3DGraphHatchingPatternData and A3DGraphVPicturePatternData.

Version

2.0

Pattern description

This pattern consists in either a flat shading represented with an RGB color code, or a full material description By default (m_bMaterial == A3D_FALSE), m_uiRgbColorIndex is an index to an instance of A3DGraphRgbColorData which can be retrieved using A3DGlobalGetGraphRgbColorData. if m_bMaterial is true, m_uiRgbColorIndex indexes a A3DGraphMaterialData. In that case, use A3DGlobalGetGraphMaterialData.

// Getting the solid pattern info according to its type:
A3DGraphSolidPatternData solid_pattern;
A3D_INITIALIZE_DATA(A3DGraphSolidPatternData, solid_pattern);
// Filling in solid_pattern...
if(solid_pattern.m_bMaterial) {
    A3DGraphMaterialData material;
    A3D_INITIALIZE_DATA(A3DGraphMaterialData, material);
    A3DGlobalGetGraphMaterialData(solid_pattern.m_uiRgbColorIndex, &material);
    // Processing material...
} else {
    A3DGraphRgbColorData rgb_color;
    A3D_INITIALIZE_DATA(A3DGraphRgbColorData, rgb_color);
    A3DGlobalGetGraphRgbColorData(solid_pattern.m_uiRgbColorIndex, &rgb_color);
    // Processing rgb_color...
}

Pattern layers

Implementations can express complex patterns by chaining them in order, using the m_uiNextPatternIndex field.

Public Members

A3DBool m_bMaterial

A3D_TRUE if m_uiRgbColorIndex refers to a material index, A3D_FALSE otherwise.

A3DUns32 m_uiRgbColorIndex

Global index to either an RGB color code (m_uiRgbColorIndex == A3D_TRUE) or material description (m_uiRgbColorIndex == A3D_FALSE)

A3DUns32 m_uiNextPatternIndex

Global index for the next pattern.