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

◆ A3DRootBaseWithGraphicsSet()

A3DStatus A3DRootBaseWithGraphicsSet ( A3DRootBaseWithGraphics pRoot,
const A3DRootBaseWithGraphicsData pData 
)

Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity.

Version
11.1
Returns
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.
#define A3D_INITIALIZE_DATA(MAC_TYPE, MAC_VALUE)
Definition: A3DSDKInitializeFunctions.h:31
A structure specifying root graphics data.
Definition: A3DSDKRootEntities.h:314
void A3DGraphics
Definition: A3DSDKTypes.h:712
A3DStatus A3DGraphicsDelete(A3DGraphics *pGraphics)
Deletes an A3DGraphics entity.
A3DStatus A3DRootBaseWithGraphicsSet(A3DRootBaseWithGraphics *pRoot, const A3DRootBaseWithGraphicsData *pData)
Adds an A3DRootBaseWithGraphicsData structure to an existing A3DRootBaseWithGraphics entity.
A3DGraphics * m_pGraphics
Definition: A3DSDKRootEntities.h:317
Main description of graphics properties within an A3DRootBaseWithGraphics instance.
Definition: A3DSDKGraphics.h:120
A3DStatus
Error Codes.
Definition: A3DSDKErrorCodes.h:71
A3DStatus A3DGraphicsCreate(const A3DGraphicsData *pData, A3DGraphics **ppGraphics)
Creates a new graphics entity, returning its handle.