Creates and accesses global graphic characteristics that apply to any PRC entity in the Graphics. 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.

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
a3d_graphics

Function Documentation

◆ A3DRootBaseWithGraphicsGet()

A3DStatus A3DRootBaseWithGraphicsGet ( const A3DRootBaseWithGraphics pRoot,
A3DRootBaseWithGraphicsData pData 
)

Populates the A3DRootBaseWithGraphicsData structure.

Version
11.1
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_INITIALIZE_NOT_CALLED
A3D_INVALID_DATA_STRUCT_SIZE
A3D_INVALID_DATA_STRUCT_NULL
A3D_INVALID_ENTITY_NULL
A3D_INVALID_ENTITY_TYPE
A3D_SUCCESS

◆ A3DRootBaseWithGraphicsSet()

A3DStatus A3DRootBaseWithGraphicsSet ( A3DRootBaseWithGraphics pRoot,
const A3DRootBaseWithGraphicsData pData 
)

Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity.

Version
11.1
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_INVALID_DATA_STRUCT_SIZE
A3D_INVALID_DATA_STRUCT_NULL
A3D_SUCCESS
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 type A3DRootBaseWithGraphics and of type A3DEntity_name. That is, a function of the form A3DGraphics_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
A3DGraphicsData sGraphicsData;
// fill in sGraphicsData
A3DGraphics* pGraphics = NULL;
A3DStatus eStatus = A3DGraphicsCreate(&sGraphicsData, &graphics);
A3DRootBaseWithGraphicsData sRootBaseWithGraphicsData;
sRootBaseWithGraphicsData.m_pGraphics = pGraphics;
// copy pGraphics'content to pEntity
eStatus = A3DRootBaseWithGraphicsSet(pEntity, &sRootBaseWithGraphicsData);
// free pGraphics
eStatus = A3DGraphicsDelete(pGraphics);
Never call A3DGraphicsDelete on an A3DGraphics obtained with A3DRootBaseWithGraphicsGet.