Creates and accesses global graphic characteristics that apply to any PRC entity in the Graphics Module. More...
Data Structures | |
struct | A3DRootBaseWithGraphicsData |
A structure specifying root graphics data. More... | |
Functions | |
A3DStatus | A3DRootBaseWithGraphicsGet (const A3DRootBaseWithGraphics *pRoot, A3DRootBaseWithGraphicsData *pData) |
Populates the A3DRootBaseWithGraphicsData structure. More... | |
A3DStatus | A3DRootBaseWithGraphicsSet (A3DRootBaseWithGraphics *pRoot, const A3DRootBaseWithGraphicsData *pData) |
Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity. More... | |
Detailed Description
Creates and accesses global graphic characteristics that apply to any PRC entity in the Graphics Module.
- Version
- 11.1
Entity type is kA3DTypeRootBaseWithGraphics.
Any PRC entity that bears graphics can have an A3DRootBaseWithGraphics entity.
The A3DRootBaseWithGraphics entity references graphic attributes such as line patterns, RGB colors, and textures. Those graphic attributes are used in the more specific PRC entity.
- See also
- Graphics
Function Documentation
◆ A3DRootBaseWithGraphicsGet()
A3DStatus A3DRootBaseWithGraphicsGet | ( | const A3DRootBaseWithGraphics * | pRoot, |
A3DRootBaseWithGraphicsData * | pData | ||
) |
Populates the A3DRootBaseWithGraphicsData structure.
- Version
- 11.1
◆ A3DRootBaseWithGraphicsSet()
A3DStatus A3DRootBaseWithGraphicsSet | ( | A3DRootBaseWithGraphics * | pRoot, |
const A3DRootBaseWithGraphicsData * | pData | ||
) |
Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity.
- Version
- 11.1
- Note
- The A3DRootBaseWithGraphics entity type is an abstract class and cannot be directly created; however, any graphic entity created with a function of the form
A3DGraphics_entity_nameCreate
results in the creation of a PRC entity of typeA3DRootBaseWithGraphics
and of typeA3DEntity_name
. That is, a function of the formA3DGraphics_entity_nameCreate
adds specific data to the base class, for example A3DRootBaseWithGraphicsData::m_pGraphics. -
When A3DRootBaseWithGraphicsSet is used to set a new A3DGraphics, its data is copied in the A3DRootBaseWithGraphics but the pointer is not kept nor freed later when the A3DRootBaseWithGraphics is deleted. It must be deleted using A3DGraphicsDelete: Never call A3DGraphicsDelete on an A3DGraphics obtained with A3DRootBaseWithGraphicsGet.A3DGraphicsData sGraphicsData;A3D_INITIALIZE_DATA(A3DGraphicsData, sGraphicsData)// fill in sGraphicsDataA3DGraphics* pGraphics = NULL;A3DStatus eStatus = A3DGraphicsCreate(&sGraphicsData, &graphics);A3DRootBaseWithGraphicsData sRootBaseWithGraphicsData;A3D_INITIALIZE_DATA(A3DRootBaseWithGraphicsData, sRootBaseWithGraphicsData)sRootBaseWithGraphicsData.m_pGraphics = pGraphics;// copy pGraphics'content to pEntityeStatus = A3DRootBaseWithGraphicsSet(pEntity, &sRootBaseWithGraphicsData);// free pGraphicseStatus = A3DGraphicsDelete(pGraphics);