A3DGraphSolidPatternData Struct Reference
A fill pattern describing either a simple color or a material. More...
Data Fields | |
A3DBool | m_bMaterial |
A3D_TRUE if m_uiRgbColorIndex refers to a material index, A3D_FALSE otherwise. | |
A3DUns32 | m_uiNextPatternIndex |
Global index for the next pattern. | |
A3DUns32 | m_uiRgbColorIndex |
Global index to either an RGB color code (m_uiRgbColorIndex == A3D_TRUE ) or material description (m_uiRgbColorIndex == A3D_FALSE ) | |
Detailed Description
A fill pattern describing either a simple color or a material.
- Version
- 2.0
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
.
- 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 ofA3DGraphRgbColorData
which can be retrieved usingA3DGlobalGetGraphRgbColorData
. ifm_bMaterial
is true,m_uiRgbColorIndex
indexes aA3DGraphMaterialData
. In that case, useA3DGlobalGetGraphMaterialData
.// 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.