Header file for the a3d_graphics_module. More...
Data Structures | |
struct | A3DGraphAmbientLightData |
Data for an ambient light source entity (``) More... | |
struct | A3DGraphCameraData |
A complete description of a view point within a three-dimensional space (A3DGraphCamera ). More... | |
struct | A3DGraphDirectionalLightData |
Data for a directional light source entity (A3DGraphDirectionalLight ) More... | |
struct | A3DGraphDottingPatternData |
Dotting fill pattern descriptor. More... | |
struct | A3DGraphHatchingPatternData |
Hatching lines fill pattern descriptor. More... | |
struct | A3DGraphHatchingPatternLineData |
Line descriptor for the A3DGraphHatchingPatternData structure. More... | |
struct | A3DGraphicsData |
Main description of graphics properties within an A3DRootBaseWithGraphics instance. More... | |
struct | A3DGraphLinePatternData |
2D line pattern descriptor. More... | |
struct | A3DGraphMaterialData |
Material properties descriptor. More... | |
struct | A3DGraphPictureData |
A description of a two-dimensional picture. More... | |
struct | A3DGraphPointLightData |
Data for a point light source entity (A3DGraphPointLight ) More... | |
struct | A3DGraphRgbColorData |
Utility class for manipulating RGB color data. More... | |
struct | A3DGraphSceneDisplayParametersData |
Entity for describing the view and shading properties of a graphics scene (A3DGraphSceneDisplayParameters ). More... | |
struct | A3DGraphSolidPatternData |
A fill pattern describing either a simple color or a material. More... | |
struct | A3DGraphSpotLightData |
Data for a spotlight source entity (A3DGraphSpotLight ) More... | |
struct | A3DGraphStyleData |
General style information. More... | |
struct | A3DGraphVPicturePatternData |
A fill pattern using a vectorized picture. More... | |
struct | A3DMiscCascadedAttributesData |
Describes inheritable properties of a model file node (A3DMiscCascadedAttributes ) More... | |
Functions | |
A3DStatus | A3DGlobalGetGraphDottingPatternData (const A3DUns32 uiIndexDottingPattern, A3DGraphDottingPatternData *pData) |
Retrieves an A3DGraphDottingPatternData instance. More... | |
A3DStatus | A3DGlobalGetGraphHatchingPatternData (const A3DUns32 uiIndexHatchingPattern, A3DGraphHatchingPatternData *pData) |
Retrieves an A3DGraphHatchingPatternData instance. More... | |
A3DStatus | A3DGlobalGetGraphLinePatternData (const A3DUns32 uiIndexLinePattern, A3DGraphLinePatternData *pData) |
Retrieves a line pattern descriptor. More... | |
A3DStatus | A3DGlobalGetGraphMaterialData (const A3DUns32 uiIndexMaterial, A3DGraphMaterialData *pData) |
Retrieves an indexed RGB color. More... | |
A3DStatus | A3DGlobalGetGraphPictureData (const A3DUns32 uiIndexPicture, A3DGraphPictureData *pData) |
Retrieves an A3DGraphPictureData instance. More... | |
A3DStatus | A3DGlobalGetGraphRgbColorData (const A3DUns32 uiIndexRgbColor, A3DGraphRgbColorData *pData) |
Retrieves an indexed RGB color. More... | |
A3DStatus | A3DGlobalGetGraphSolidPatternData (const A3DUns32 uiIndexSolidPattern, A3DGraphSolidPatternData *pData) |
Retrieves an A3DGraphHatchingPatternData instance. More... | |
A3DStatus | A3DGlobalGetGraphStyleData (const A3DUns32 uiIndexStyle, A3DGraphStyleData *pData) |
Retrieves an indexed graph style. More... | |
A3DStatus | A3DGlobalGetGraphVPicturePatternData (const A3DUns32 uiIndexVPicturePattern, A3DGraphVPicturePatternData *pData) |
Retrieves an A3DGraphVPicturePatternData instance. More... | |
A3DStatus | A3DGlobalInsertGraphDottingPattern (const A3DGraphDottingPatternData *pData, A3DUns32 *puiIndexDottingPattern) |
Insert a new dotting pattern into the global state, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphHatchingPattern (const A3DGraphHatchingPatternData *pData, A3DUns32 *) |
Insert a new hatching lines fill pattern into the global state, returning its index for further retrieval. More... | |
A3DStatus | A3DGlobalInsertGraphLinePattern (const A3DGraphLinePatternData *pData, A3DUns32 *puiIndexLinePattern) |
Creates a line pattern, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphMaterial (const A3DGraphMaterialData *pData, A3DUns32 *puiIndexMaterial) |
Creates a new material, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphPicture (const A3DGraphPictureData *pData, A3DUns32 *puiPictureIndex) |
Insert a new picture into the global state, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphRgbColor (const A3DGraphRgbColorData *pData, A3DUns32 *puiIndexRgbColor) |
Creates a new indexed color, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphSolidPattern (const A3DGraphSolidPatternData *pData, A3DUns32 *puiIndexSolidPattern) |
Insert a new solid fill pattern into the global state, returning its index for further retrieval. More... | |
A3DStatus | A3DGlobalInsertGraphStyle (const A3DGraphStyleData *pData, A3DUns32 *puiIndexStyle) |
Creates a new graphics style, returning its index. More... | |
A3DStatus | A3DGlobalInsertGraphVPicturePattern (const A3DGraphVPicturePatternData *pData, A3DUns32 *puiIndexVPicturePattern) |
Insert a new vectorized picture fill pattern into the global state, returning its index for further retrieval. More... | |
A3DStatus | A3DGraphAmbientLightCreate (const A3DGraphAmbientLightData *pData, A3DGraphAmbientLight **ppLight) |
Creates a new ambient light source entity, returning its handle. More... | |
A3DStatus | A3DGraphAmbientLightGet (const A3DGraphAmbientLight *pLight, A3DGraphAmbientLightData *pData) |
Fetches data from an ambient light source entity given its handle. More... | |
A3DStatus | A3DGraphCameraCreate (const A3DGraphCameraData *pData, A3DGraphCamera **ppCamera) |
Creates a new camera entity, returning its handle. More... | |
A3DStatus | A3DGraphCameraGet (const A3DGraphCamera *pCamera, A3DGraphCameraData *pData) |
Fetches data from a camera entity given its handle. More... | |
A3DStatus | A3DGraphDirectionalLightCreate (const A3DGraphDirectionalLightData *pData, A3DGraphDirectionalLight **ppLight) |
Creates a new directional source entity, returning its handle. More... | |
A3DStatus | A3DGraphDirectionalLightGet (const A3DGraphDirectionalLight *pLight, A3DGraphDirectionalLightData *pData) |
Fetches data from a directional source entity given its handle. More... | |
A3DStatus | A3DGraphicsCreate (const A3DGraphicsData *pData, A3DGraphics **ppGraphics) |
Creates a new graphics entity, returning its handle. More... | |
A3DStatus | A3DGraphicsDelete (A3DGraphics *pGraphics) |
Deletes an A3DGraphics entity. More... | |
A3DStatus | A3DGraphicsGet (const A3DGraphics *pGraphics, A3DGraphicsData *pData) |
Fetches data from a graphics entity, given its handle. More... | |
A3DStatus | A3DGraphPointLightCreate (const A3DGraphPointLightData *pData, A3DGraphPointLight **ppLight) |
Creates a new point light source entity, returning its handle. More... | |
A3DStatus | A3DGraphPointLightGet (const A3DGraphPointLight *pLight, A3DGraphPointLightData *pData) |
Fetches data from a point light source entity given its handle. More... | |
A3DStatus | A3DGraphSceneDisplayParametersCreate (const A3DGraphSceneDisplayParametersData *pData, A3DGraphSceneDisplayParameters **ppSceneDisplayParameters) |
Creates a new A3DGraphSceneDisplayParameters entity, returning its handle. More... | |
A3DStatus | A3DGraphSceneDisplayParametersGet (const A3DGraphSceneDisplayParameters *pSceneDisplayParameters, A3DGraphSceneDisplayParametersData *pData) |
Fetches data from a scene diplay parameters entity given its handle. More... | |
A3DStatus | A3DGraphSpotLightCreate (const A3DGraphSpotLightData *pData, A3DGraphSpotLight **ppLight) |
Creates a new spotlight source entity, returning its handle. More... | |
A3DStatus | A3DGraphSpotLightGet (const A3DGraphSpotLight *pLight, A3DGraphSpotLightData *pData) |
Fetches data from a spotlight source entity given its handle. More... | |
A3DStatus | A3DMiscCascadedAttributesCreate (A3DMiscCascadedAttributes **ppAttr) |
Creates a new A3DMiscCascadedAttributes entity, returning its handle. More... | |
A3DStatus | A3DMiscCascadedAttributesDelete (A3DMiscCascadedAttributes *pAttr) |
Deletes a A3DMiscCascadedAttributes. More... | |
A3DStatus | A3DMiscCascadedAttributesGet (const A3DMiscCascadedAttributes *pAttr, A3DMiscCascadedAttributesData *psData) |
Fetches data from a cascaded attributes entity given its handle. More... | |
A3DStatus | A3DMiscCascadedAttributesPush (A3DMiscCascadedAttributes *pAttr, const A3DRootBaseWithGraphics *pBase, const A3DMiscCascadedAttributes *pFather) |
Computes the result of cascaded attribute propagation from a parent node. More... | |
A3DStatus | A3DMiscCascadedAttributesPushTessFace (A3DMiscCascadedAttributes *pAttr, const A3DRiRepresentationItem *pRepItem, const A3DTessBase *pTessBase, const A3DTessFaceData *psTessFaceData, A3DUns32 uiFaceIndex, const A3DMiscCascadedAttributes *pFather) |
Push a A3DMiscCascadedAttributesData for a A3DTessFaceData. More... | |
Detailed Description
Header file for the a3d_graphics_module.
- Version
- 22.1
- Date
- April 2022
- Copyright (c) 2010 - 2022 by Tech Soft 3D, Inc. All rights reserved.
Function Documentation
◆ A3DGraphicsGet()
A3DStatus A3DGraphicsGet | ( | const A3DGraphics * | pGraphics, |
A3DGraphicsData * | pData | ||
) |
Fetches data from a graphics entity, given its handle.
- Version
- 2.0
- Parameters
-
[in] pGraphics A handle to the graphics entity to fetch data from. [out] pData The A3DGraphicsData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- See also
- A3DGraphicsData
- A3DGraphicsDelete
◆ A3DGraphicsCreate()
A3DStatus A3DGraphicsCreate | ( | const A3DGraphicsData * | pData, |
A3DGraphics ** | ppGraphics | ||
) |
Creates a new graphics entity, returning its handle.
- Version
- 2.0
- Parameters
-
[out] pData The data used for graphics creation. [in] ppGraphics An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is nullA3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DGraphicsDelete
on it.
◆ A3DGraphicsDelete()
A3DStatus A3DGraphicsDelete | ( | A3DGraphics * | pGraphics | ) |
Deletes an A3DGraphics entity.
- Version
- 2.0
Once created with A3DGraphicsCreate
, a graphics entity must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling A3DGraphicsDelete
on it.
- Parameters
-
[in] pGraphics A handle to the entity to delete.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized
◆ A3DGlobalGetGraphStyleData()
A3DStatus A3DGlobalGetGraphStyleData | ( | const A3DUns32 | uiIndexStyle, |
A3DGraphStyleData * | pData | ||
) |
Retrieves an indexed graph style.
- Version
- 2.0
HOOPS stores styles in a global state using indexes. When given an index, you may call A3DGlobalGetGraphStyleData
to fill in an A3DGraphStyleData
instance.
- Default style
- When the input value is
A3D_DEFAULT_STYLE_INDEX
,pData
is unchanched and the function returns immediately.
- Parameters
-
[in] uiIndexStyle The index of the style to retrieve data from [out] pData The A3DGraphRgbColorData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_STYLE_INDEX if the style index does not match any color code. A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGlobalInsertGraphStyle()
A3DStatus A3DGlobalInsertGraphStyle | ( | const A3DGraphStyleData * | pData, |
A3DUns32 * | puiIndexStyle | ||
) |
Creates a new graphics style, returning its index.
- Version
- 2.0
When given an A3DGraphStyleData
, the function searches for an already existing color code of the same value and returns its index. If the color does not exist, it is created and a new index is returned.
- Color Comparison
- Two color codes are considered of same value when their components (red, _green and blue) have the same respective values within a tolerance of 1.0f / 255.f.
In case of success, puiIndexRgbColor
is set to the index of the color. This index can be compared to A3D_DEFAULT_COLOR_INDEX
to check whether the input color code matches the default color. In case of failure *puiIndexRgbColor
is unchanged.
- Parameters
-
[in] pData The color code to insert. [out] puiIndexRgbColor The resulting index for the input color.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.
◆ A3DGlobalGetGraphRgbColorData()
A3DStatus A3DGlobalGetGraphRgbColorData | ( | const A3DUns32 | uiIndexRgbColor, |
A3DGraphRgbColorData * | pData | ||
) |
Retrieves an indexed RGB color.
- Version
- 2.0
HOOPS stores colors in a global state using indexes. When given an index, call A3DGlobalGetGraphRgbColorData
to fill in an A3DGraphRgbColorData
instance.
- Default Color
- When the input value is the index for the default color, the function returns
A3D_DEFAULT_COLOR
. In that case,pData
is unchanged and the actual color code is up to your implementation. To support a specific default color, assign values to members ofpData
prior to callingA3DGlobalGetGraphRgbColorData
. The default index can be explicitely stated usingA3D_DEFAULT_COLOR_INDEX
.
- Validity
- HOOPS internally stores all RGB colors in a sequential C-style array where each value is a color component: Red, Green, Blue, Red, Green, Blue, .... Thus a valid index value is either 0 or a multiple of 3.
- Parameters
-
[in] uiIndexRgbColor The index of the color code [out] pData The A3DGraphRgbColorData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_DEFAULT_COLOR if the input value is the index for the default color ( A3D_DEFAULT_COLOR_INDEX
).A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_COLOR_INDEX if the color index does not match any color code. A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGlobalInsertGraphRgbColor()
A3DStatus A3DGlobalInsertGraphRgbColor | ( | const A3DGraphRgbColorData * | pData, |
A3DUns32 * | puiIndexRgbColor | ||
) |
Creates a new indexed color, returning its index.
- Version
- 2.0
When given an A3DGraphRgbColorData
, the function searches for an already existing color code of the same value and returns its index. If the color does not exist, it is created and a new index is returned.
- Color Comparison
- Two color codes are considered of "same value" when their respective components (red, green and blue) have the same value within a tolerance of 1.0f / 255.f.
In case of success, puiIndexRgbColor
is set to the index of the color. This index can be compared to A3D_DEFAULT_COLOR_INDEX
to check whether the input color code matches the default color. In case of failure *puiIndexRgbColor
is unchanged.
- Parameters
-
[in] pData The color code to insert. [out] puiIndexRgbColor The resulting index for the input color.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.
◆ A3DGlobalGetGraphLinePatternData()
A3DStatus A3DGlobalGetGraphLinePatternData | ( | const A3DUns32 | uiIndexLinePattern, |
A3DGraphLinePatternData * | pData | ||
) |
Retrieves a line pattern descriptor.
- Version
- 2.0
HOOPS stores line patterns in a global state using indexes. When given an index, you may call A3DGlobalGetGraphLinePatternData
to fill in an A3DGraphLinePatternData
instance.
- Memory management
- Some data in
A3DGraphLinePatternData
are allocated from the heap upon callingA3DGlobalGetGraphLinePatternData
. To free it, call the function withA3D_DEFAULT_LINEPATTERN_INDEX
.
- Parameters
-
[in] uiIndexLinePattern The index of the line pattern descriptor [out] pData The A3DGraphLinePatternData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_LINEPATTERN_INDEX if the given index is negative or corresponds to a non-existing line pattern.
◆ A3DGlobalInsertGraphLinePattern()
A3DStatus A3DGlobalInsertGraphLinePattern | ( | const A3DGraphLinePatternData * | pData, |
A3DUns32 * | puiIndexLinePattern | ||
) |
Creates a line pattern, returning its index.
- Version
- 2.0
When given an A3DGraphLinePatternData
, the function searches for an already existing descriptor of the same value and returns its index. If the descriptor does not exist, it is created and a new index is returned. In case of failure *puiIndexRgbColor
is unchanged.
- Parameters
-
[in] pData The line pattern descriptor to insert. [out] puiIndexRgbColor The resulting index for the input color.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.
◆ A3DGlobalGetGraphMaterialData()
A3DStatus A3DGlobalGetGraphMaterialData | ( | const A3DUns32 | uiIndexMaterial, |
A3DGraphMaterialData * | pData | ||
) |
Retrieves an indexed RGB color.
- Version
- 2.0
HOOPS stores materials in a global state using indexes. When given an index, call A3DGlobalGetGraphMaterialData
to fill in an A3DGraphMaterialData
instance.
- Parameters
-
[in] uiIndexMaterial The index of the material [out] pData The A3DGraphMaterialData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_MATERIAL_INDEX if the material index does not match any existing. A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Note
- This function allows getting basic material data from its index in the global state. To retrieve the underlying material entity, use
A3DMiscPointerFromIndexGet
as stated in the documentation forA3DGraphMaterialData
- See also
A3DGlobalInsertGraphMaterial
-
A3DGraphMaterialData
-
A3DMiscPointerFromIndexGet
◆ A3DGlobalInsertGraphMaterial()
A3DStatus A3DGlobalInsertGraphMaterial | ( | const A3DGraphMaterialData * | pData, |
A3DUns32 * | puiIndexMaterial | ||
) |
Creates a new material, returning its index.
- Version
- 2.0
When given an A3DGraphMaterialData
, the function searches for an already existing material data of the same value and returns its index. If the material does not exist, it is created and a new index is returned. In case of failure *puiIndexMaterial
is unchanged.
- Parameters
-
[in] pData The material data to insert. [out] puiIndexMaterial The resulting index for the input color.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.
◆ A3DGlobalGetGraphPictureData()
A3DStatus A3DGlobalGetGraphPictureData | ( | const A3DUns32 | uiIndexPicture, |
A3DGraphPictureData * | pData | ||
) |
Retrieves an A3DGraphPictureData
instance.
- Version
- 2.0
HOOPS stores picture information in a global state using indexes. When given an index, call A3DGlobalGetGraphPictureData
to fill in an A3DGraphPictureData
instance.
- Parameters
-
[in] uiIndexPicture The index of the picture data. [out] pData The A3DGraphPictureData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_PICTURE_INDEX if the picture index does not match any existing. A3D_INVALID_PICTURE_FORMAT if the internal image format is not supported. A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
pData
contains data allocated from heap byA3DGlobalGetGraphPictureData
. This data must be explicitely freed by your application. To do so, you can use the convienence call toA3DGlobalGetGraphPictureData
withA3D_DEFAULT_PICTURE_INDEX
:// Deallocating data previously reserved by A3DGlobalGetGraphPictureData:result = A3DGlobalGetGraphPictureData(A3D_DEFAULT_PICTURE_INDEX, &picture_data);assert(result == A3D_SUCCESS);
◆ A3DGlobalInsertGraphPicture()
A3DStatus A3DGlobalInsertGraphPicture | ( | const A3DGraphPictureData * | pData, |
A3DUns32 * | puiPictureIndex | ||
) |
Insert a new picture into the global state, returning its index.
- Version
- 2.0
When given an A3DGraphPictureData
, the function clones the picture data for internal storage and returns a new index to further retrieval with A3DGlobalGetGraphPictureData
. In case of failure *puiPictureIndex
is unchanged.
- Parameters
-
[in] pData The picture data to insert. [out] puiPictureIndex The resulting index for the inserted picture data.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_ERROR when an internal error is encountered while storing the image data.
- Memory management
- Upon inserting a new picture data into the the library the memory pointed to by
pData->m_pucBinaryData
is internally cloned. Thus, your application is only responsible for the memory management ofpData
.
◆ A3DGlobalGetGraphDottingPatternData()
A3DStatus A3DGlobalGetGraphDottingPatternData | ( | const A3DUns32 | uiIndexDottingPattern, |
A3DGraphDottingPatternData * | pData | ||
) |
Retrieves an A3DGraphDottingPatternData
instance.
- Version
- 2.0
HOOPS stores pattern information in a global state using indexes. When given an index, call A3DGlobalGetGraphDottingPatternData
to fill in an A3DGraphDottingPatternData
instance.
- Parameters
-
[in] uiIndexDottingPattern The index of the pattern. [out] pData The A3DGraphDottingPatternData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_PATTERN_INDEX if uiIndexDottingPattern
does not match any existing.A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPE if uiIndexDottingPattern
is invalid but indexes an other pattern type (eitherA3DGraphHatchingPatternData
,A3DGraphSolidPatternData
orA3DGraphVPicturePatternData
)A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGlobalInsertGraphDottingPattern()
A3DStatus A3DGlobalInsertGraphDottingPattern | ( | const A3DGraphDottingPatternData * | pData, |
A3DUns32 * | puiIndexDottingPattern | ||
) |
Insert a new dotting pattern into the global state, returning its index.
- Version
- 2.0
When given an A3DGraphDottingPatternData
, the function clones the picture data for internal storage and returns a new index to further retrieval with A3DGlobalGetGraphPictureData
. In case of failure *puiIndexDottingPattern
is unchanged.
- Parameters
-
[in] pData The pattern data to insert. [out] puiIndexDottingPattern The resulting index for the inserted pattern data.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_ERROR when an internal error is encountered while storing the pattern data.
◆ A3DGlobalGetGraphHatchingPatternData()
A3DStatus A3DGlobalGetGraphHatchingPatternData | ( | const A3DUns32 | uiIndexHatchingPattern, |
A3DGraphHatchingPatternData * | pData | ||
) |
Retrieves an A3DGraphHatchingPatternData
instance.
- Version
- 2.0
HOOPS stores pattern information in a global state using indexes. When given an index, you may call A3DGlobalGetGraphHatchingPatternData
to fill in an A3DGraphHatchingPatternData
instance.
- Parameters
-
[in] uiIndexHatchingPattern The index of the pattern. [out] pData The A3DGraphHatchingPatternData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_PATTERN_INDEX if uiIndexHatchingPattern
does not match any existing.A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPE if uiIndexHatchingPattern
is invalid but indexes an other pattern type (eitherA3DGraphDottingPatternData
,A3DGraphSolidPatternData
orA3DGraphVPicturePatternData
)A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Some data in
A3DGraphHatchingPatternData
are allocated from the heap upon callingA3DGlobalGetGraphHatchingPatternData
. To free it, call the function again withA3D_DEFAULT_PATTERN_INDEX
.
◆ A3DGlobalInsertGraphHatchingPattern()
A3DStatus A3DGlobalInsertGraphHatchingPattern | ( | const A3DGraphHatchingPatternData * | pData, |
A3DUns32 * | |||
) |
Insert a new hatching lines fill pattern into the global state, returning its index for further retrieval.
- Version
- 2.0
When given an A3DGraphHatchingPatternData
, the function clones the content for internal storage and returns a new index for further retrieval with A3DGlobalGetGraphHatchingPatternData
. In case of failure *puiIndexHatchingPattern
is unchanged.
- Memory management
A3DGraphHatchingPatternData
contains heap allocated data. When called,A3DGlobalInsertGraphHatchingPattern
will clone these data internally. Thus, your application is responsible for the management ofpData
only and not for the cloned content.
- Parameters
-
[in] pData The pattern data to insert. [out] puiIndexHatchingPattern The resulting index for the inserted pattern data.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_ERROR when an internal error is encountered while storing the pattern data.
◆ A3DGlobalGetGraphSolidPatternData()
A3DStatus A3DGlobalGetGraphSolidPatternData | ( | const A3DUns32 | uiIndexSolidPattern, |
A3DGraphSolidPatternData * | pData | ||
) |
Retrieves an A3DGraphHatchingPatternData
instance.
- Version
- 2.0
HOOPS stores pattern information in a global state using indexes. When given an index, call A3DGlobalGetGraphSolidPatternData
to fill in an A3DGraphSolidPatternData
instance.
- Parameters
-
[in] uiIndexSolidPattern The index of the pattern. [out] pData The A3DGraphSolidPatternData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_PATTERN_INDEX if uiIndexDottingPattern
does not match any existing.A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPE if uiIndexDottingPattern
is invalid but indexes an other pattern type (eitherA3DGraphHatchingPatternData
,A3DGraphDottingPatternData
orA3DGraphVPicturePatternData
)A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGlobalInsertGraphSolidPattern()
A3DStatus A3DGlobalInsertGraphSolidPattern | ( | const A3DGraphSolidPatternData * | pData, |
A3DUns32 * | puiIndexSolidPattern | ||
) |
Insert a new solid fill pattern into the global state, returning its index for further retrieval.
- Version
- 2.0
When given an A3DGraphSolidPatternData
, the function clones the content for internal storage and returns a new index for further retrieval with A3DGlobalGetGraphSolidPatternData
. In case of failure *puiIndexSolidPattern
is unchanged.
- Parameters
-
[in] pData The pattern data to insert. [out] puiIndexSolidPattern The resulting index for the inserted pattern data.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_ERROR when an internal error is encountered while storing the pattern data.
◆ A3DGlobalGetGraphVPicturePatternData()
A3DStatus A3DGlobalGetGraphVPicturePatternData | ( | const A3DUns32 | uiIndexVPicturePattern, |
A3DGraphVPicturePatternData * | pData | ||
) |
Retrieves an A3DGraphVPicturePatternData
instance.
- Version
- 2.0
HOOPS stores pattern information in a global state using indexes. When given an index, call A3DGlobalInsertGraphVPicturePattern
to fill in an A3DGraphVPicturePatternData
instance.
- Parameters
-
[in] uiIndexVPicturePattern The index of the pattern. [out] pData The A3DGraphVPicturePatternData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_PATTERN_INDEX if uiIndexVPicturePattern
does not match any existing.A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPE if uiIndexVPicturePattern
is invalid but indexes an other pattern type (eitherA3DGraphDottingPatternData
,A3DGraphSolidPatternData
orA3DGraphVPicturePatternData
)A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
A3DGraphVPicturePatternData
contains a handle to an already existing instance ofA3DTessMarkupData
. This instance is entirely managed by HOOPS. Thus you are not responsible for deleting an entity returned by this function.
◆ A3DGlobalInsertGraphVPicturePattern()
A3DStatus A3DGlobalInsertGraphVPicturePattern | ( | const A3DGraphVPicturePatternData * | pData, |
A3DUns32 * | puiIndexVPicturePattern | ||
) |
Insert a new vectorized picture fill pattern into the global state, returning its index for further retrieval.
- Version
- 2.0
When given an A3DGraphVPicturePatternData
, the function clones the content for internal storage and returns a new index for further retrieval with A3DGlobalGetGraphHatchingPatternData
. In case of failure *puiIndexVPicturePattern
is unchanged.
- Memory management
A3DGraphVPicturePatternData
contains a handle to an already existing instance ofA3DTessMarkupData
. This instance is entirely managed by HOOPS.
- Parameters
-
[in] pData The pattern data to insert. [out] puiIndexVPicturePattern The resulting index for the inserted pattern data.
- Returns
- A3D_SUCCESS or an error code.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized. A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_ERROR when an internal error is encountered while storing the pattern data.
◆ A3DGraphCameraGet()
A3DStatus A3DGraphCameraGet | ( | const A3DGraphCamera * | pCamera, |
A3DGraphCameraData * | pData | ||
) |
Fetches data from a camera entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pCamera A handle to the camera to fetch data from. [out] pData The A3DGraphCameraData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGraphCameraCreate()
A3DStatus A3DGraphCameraCreate | ( | const A3DGraphCameraData * | pData, |
A3DGraphCamera ** | ppCamera | ||
) |
Creates a new camera entity, returning its handle.
- Version
- 2.0
Once created, the new camera entity can be referenced to by its handle, given by *ppCamera
. In case of failure, *ppCamera
is unchanged.
- Parameters
-
[out] pData The data used for camera creation. [in] ppCamera An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DGraphAmbientLightGet()
A3DStatus A3DGraphAmbientLightGet | ( | const A3DGraphAmbientLight * | pLight, |
A3DGraphAmbientLightData * | pData | ||
) |
Fetches data from an ambient light source entity given its handle.
- Version
- 2.0
- Validity
- All light sources can be interpreted as ambient if only the color is read. This is why
A3DGraphAmbientLightGet
can be safely called with any of the four light source types HOOPS provides.
- Parameters
-
[in] pLight A handle to the light to fetch data from. [out] pData The A3DGraphAmbientLightData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
◆ A3DGraphAmbientLightCreate()
A3DStatus A3DGraphAmbientLightCreate | ( | const A3DGraphAmbientLightData * | pData, |
A3DGraphAmbientLight ** | ppLight | ||
) |
Creates a new ambient light source entity, returning its handle.
- Version
- 2.0
Once created, the new light entity can be referenced to by its handle, given by *ppLight
. In case of failure, *ppLight
is unchanged.
- Parameters
-
[out] pData The data used for light creation. [in] ppLight An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DGraphPointLightGet()
A3DStatus A3DGraphPointLightGet | ( | const A3DGraphPointLight * | pLight, |
A3DGraphPointLightData * | pData | ||
) |
Fetches data from a point light source entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pLight A handle to the light to fetch data from. [out] pData The A3DGraphPointLightData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_ENTITY_TYPE if the entity type pLight
refers to is notkA3DTypeGraphPointLight
◆ A3DGraphPointLightCreate()
A3DStatus A3DGraphPointLightCreate | ( | const A3DGraphPointLightData * | pData, |
A3DGraphPointLight ** | ppLight | ||
) |
Creates a new point light source entity, returning its handle.
- Version
- 2.0
Once created, the new light entity can be referenced to by its handle, given by *ppLight
. In case of failure, *ppLight
is unchanged.
- Parameters
-
[out] pData The data used for light creation. [in] ppLight An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DGraphSpotLightGet()
A3DStatus A3DGraphSpotLightGet | ( | const A3DGraphSpotLight * | pLight, |
A3DGraphSpotLightData * | pData | ||
) |
Fetches data from a spotlight source entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pLight A handle to the light to fetch data from. [out] pData The A3DGraphSpotLightData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_ENTITY_TYPE if the entity type pLight
refers to is notkA3DTypeGraphSpotLight
◆ A3DGraphSpotLightCreate()
A3DStatus A3DGraphSpotLightCreate | ( | const A3DGraphSpotLightData * | pData, |
A3DGraphSpotLight ** | ppLight | ||
) |
Creates a new spotlight source entity, returning its handle.
- Version
- 2.0
Once created, the new light entity can be referenced to by its handle, given by *ppLight
. In case of failure, *ppLight
is unchanged.
- Parameters
-
[out] pData The data used for light creation. [in] ppLight An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DGraphDirectionalLightGet()
A3DStatus A3DGraphDirectionalLightGet | ( | const A3DGraphDirectionalLight * | pLight, |
A3DGraphDirectionalLightData * | pData | ||
) |
Fetches data from a directional source entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pLight A handle to the light to fetch data from. [out] pData The A3DGraphDirectionalLightData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initializedA3D_INVALID_ENTITY_TYPE if the entity type pLight
refers to is notkA3DTypeGraphDirectionalLight
◆ A3DGraphDirectionalLightCreate()
A3DStatus A3DGraphDirectionalLightCreate | ( | const A3DGraphDirectionalLightData * | pData, |
A3DGraphDirectionalLight ** | ppLight | ||
) |
Creates a new directional source entity, returning its handle.
- Version
- 2.0
Once created, the new light entity can be referenced to by its handle, given by *ppLight
. In case of failure, *ppLight
is unchanged.
- Parameters
-
[out] pData The data used for light creation. [in] ppLight An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DGraphSceneDisplayParametersGet()
A3DStatus A3DGraphSceneDisplayParametersGet | ( | const A3DGraphSceneDisplayParameters * | pSceneDisplayParameters, |
A3DGraphSceneDisplayParametersData * | pData | ||
) |
Fetches data from a scene diplay parameters entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pSceneDisplayParameters A handle to the entity to fetch data from. [out] pData The A3DGraphSceneDisplayParametersData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
pData
contains data allocated from heap byA3DGraphSceneDisplayParametersGet
. This data must be explicitely freed by your application. To do so, you can use the convienence call toA3DGraphSceneDisplayParametersGet
with0
as handle.
◆ A3DGraphSceneDisplayParametersCreate()
A3DStatus A3DGraphSceneDisplayParametersCreate | ( | const A3DGraphSceneDisplayParametersData * | pData, |
A3DGraphSceneDisplayParameters ** | ppSceneDisplayParameters | ||
) |
Creates a new A3DGraphSceneDisplayParameters
entity, returning its handle.
- Version
- 2.0
Once created, the new entity can be referenced to by its handle, given by *ppSceneDisplayParameters
. In case of failure, *ppLight
is unchanged.
- Parameters
-
[out] pData The data used for scene parameters creation. [in] ppSceneDisplayParameters An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if pData
is null.A3D_INVALID_DATA_STRUCT_SIZE if pData
is incorrectly initialized
- Memory management
- Once created, entities must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DEntityDelete
on it.
◆ A3DMiscCascadedAttributesCreate()
A3DStatus A3DMiscCascadedAttributesCreate | ( | A3DMiscCascadedAttributes ** | ppAttr | ) |
Creates a new A3DMiscCascadedAttributes
entity, returning its handle.
- Version
- 2.0
Once created, the new entity can be referenced to by its handle, given by *ppAttr
. In case of failure, *ppAttr
is unchanged.
- Parameters
-
[out] ppAttr An address to the new handle after creation.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized
- Memory management
- Once created, the entity must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling
A3DMiscCascadedAttributesDelete
on it.
◆ A3DMiscCascadedAttributesDelete()
A3DStatus A3DMiscCascadedAttributesDelete | ( | A3DMiscCascadedAttributes * | pAttr | ) |
Deletes a A3DMiscCascadedAttributes.
- Version
- 2.0
Once created with A3DMiscCascadedAttributesCreate
, a cascaded attributes entity must be integrated within a model file so that HOOPS is responsible for its memory management. If the entity is created but never used, it is up to your application to request for its deletion by calling A3DMiscCascadedAttributesDelete
on it.
- Parameters
-
[in] pAttr A handle to the entity to delete.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized
◆ A3DMiscCascadedAttributesGet()
A3DStatus A3DMiscCascadedAttributesGet | ( | const A3DMiscCascadedAttributes * | pAttr, |
A3DMiscCascadedAttributesData * | psData | ||
) |
Fetches data from a cascaded attributes entity given its handle.
- Version
- 2.0
- Parameters
-
[in] pAttr A handle to the light to fetch data from. [out] psData The A3DMiscCascadedAttributesData
to fill in.
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized A3D_INVALID_DATA_STRUCT_NULL if psData
is null.A3D_INVALID_DATA_STRUCT_SIZE if psData
is incorrectly initialized
◆ A3DMiscCascadedAttributesPush()
A3DStatus A3DMiscCascadedAttributesPush | ( | A3DMiscCascadedAttributes * | pAttr, |
const A3DRootBaseWithGraphics * | pBase, | ||
const A3DMiscCascadedAttributes * | pFather | ||
) |
Computes the result of cascaded attribute propagation from a parent node.
- Version
- 2.0
In the context of a model file node hierarchy, cascaded describes the way an application using HOOPS Exchange will resolve conflicting attributes. Attributes are propagated downstream, by overriding current attributes with the parent node's ones according to specific inheritance rules defined in Bit Field for Behavior on Graphics.
Although properties propagation can be manually applied if those rules are known, HOOPS Exchange provides A3DMiscCascadedAttributesPush
as a convenience function.
A3DMiscCascadedAttributesPush
computes the result of propagating attributes from pFather
to pBase
and writes them into pAttr
, which data can then be retrieves using A3DMiscCascadedAttributesGet
.
pBase
can be any instance of A3DTopoFace
A3DTopoShell
, A3DTopoConnex
, A3DRiRepresentationItem
, A3DAsmPartDefinition
or A3DAsmProductOccurrence
.
- Parameters
-
[in] pAttr A handle to the resulting cascaded attributes [in] pBase The child node the attributes are computed from [in] pFather The attributes held by the parent node
- Returns
A3D_SUCCESS
or an error code in case of failure.
- Return values
-
A3D_SUCCESS in case of success. A3D_INITIALIZE_NOT_CALLED if the library is not initialized
- example
- The following example traverses a product occurrence tree, calling
A3DMiscCascadedAttributesPush
on each new node:void traverse_product_occurrence(const A3DAsmProductOccurrence* product_occurrence, const A3DMiscCascadedAttributes* parent_attributes){// Compute new cascaded attributes entity using parent and local infoA3DMiscCascadedAttributes* computed_attributes = 0;A3DMiscCascadedAttributesCreate(computed_attributes);computed_attributes,product_occurrence, // as const A3DRootBaseWithGraphics*parent_attributes);// Recursively call children po, giving them local computed_attributesA3DAsmProductOccurrenceData po_data;A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, po_data);A3DAsmProductOccurrenceGet(product_occurrence, &po_data);for (size_t po = 0; po < po_data.m_uiproduct_occurrencesSize; ++po) {traverse_product_occurrence(po_data.m_ppproduct_occurrences[ui], computed_attributes);}A3DAsmProductOccurrenceGet(0, &po_data);A3DMiscCascadedAttributesDelete(computed_attributes);}