Query and manipulate scene and rendering informations. More...

Data Structures

struct  A3DGraphAmbientLightData
 Data for an ambient light source entity (``) 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  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 *puiIndexHatchingPattern)
 Insert a new hatching lines fill pattern into the global state, returning its index for further retrieval. 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 A3DMiscPointerFromIndexGet (const A3DUns32 uiIndex, const A3DEEntityType eType, A3DEntity **ppEntity)
 Retrieve the handle of an indexed entity. More...
 
A3DStatus A3DMiscRootBaseInsertAttribute (const A3DRootBase *pRootBase, const A3DMiscAttribute *pAttribute)
 Adds a new attribute to the given entity. More...
 

Detailed Description

Query and manipulate scene and rendering informations.

The graphics group provides the essential set of tools for describing a rendering scene, such as texturing, lighting or view information. The following entities are presents in this modules, along with their public data and access functions:

The module also provides a set of indexed data:

General Structure
An entity of type A3DRootBaseWithGraphics embeds an A3DGraphics entity. This structure mainly provides two informations:
  • A layer which allows grouping entities with a common identifier.
  • A style index which references an A3DGraphStyleData. A3DGraphStyleData lists all graphics properties the A3DRootBaseWithGraphics is assigned to, such as drawing patterns, materials or textures.

Any entity of the given type can be used as an A3DRootBaseWithGraphics.

Indexed data
Indexed data are plain structures which are globally shared among a potentially important amount of entities within a model file. For example, the same color description can be used for all the graphics entities of a scene.

HOOPS Exchange provides a global container (A3DGlobalData) which references each of these data using indexed lists. Thus, structures such as A3DGraphRgbColorData are obtained using an non-typed numerical index.

Yet, these data act as front-end for internal entities which are still referenced to by handles. The purpose of obtaining the underlying entity of an indexed data depends on the context and is generally an uncommon operation. As an example, the full PBR (Physically-Based Rendering) features is provided as an extension of A3DGraphMaterialData throughout its underlying entity. To retrieve the underlying entity of an indexed data, see A3DMiscPointerFromIndexGet.

Function Documentation

◆ A3DGraphicsGet()

A3DStatus A3DGraphicsGet ( const A3DGraphics pGraphics,
A3DGraphicsData pData 
)

Fetches data from a graphics entity, given its handle.

Version
2.0
Parameters
[in]pGraphicsA handle to the graphics entity to fetch data from.
[out]pDataThe A3DGraphicsData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif 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]pDataThe data used for graphics creation.
[in]ppGraphicsAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3DGraphic handle = 0;
A3DGraphicData data;
A3D_INITIALIZE_DATA(A3DGraphicData, data);
// Configure data...
A3DStatus result = A3DGraphicCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphicsData
A3DGraphicsGet
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ 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]pGraphicsA handle to the entity to delete.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
See also
A3DGraphicsData
A3DGraphicsCreate
A3DGraphicsGet

◆ 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.
// Retrieves the graph style at index 3. Use initialized style as default:
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexStyleThe index of the style to retrieve data from
[out]pDataThe A3DGraphRgbColorData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_STYLE_INDEXif the style index does not match any color code.
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
See also
A3DGlobalInsertGraphStyle
A3DGraphStyleData

◆ 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.

rgb.m_dRed = rgb.m_dGreen = rgb.m_dBlue = 0.75f;
A3DStatus result = A3DGlobalInsertGraphRgbColor(&rgb, &idx_0);
assert(result == A3D_SUCCESS);
Second insertion with the same color, expect index to be the same.
A3DUns32 idx_1 = A3D_DEFAULT_COLOR_INDEX;
result = A3DGlobalInsertGraphRgbColor(&rgb, &idx_1);
assert(result == A3D_SUCCESS);
assert(idx_0 == idx_1);
Parameters
[in]pDataThe color code to insert.
[out]puiIndexStyleThe resulting index for the style.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
See also
A3DGlobalGetGraphRgbColorData
A3DGraphRgbColorData

◆ 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 of pData prior to calling A3DGlobalGetGraphRgbColorData. The default index can be explicitely stated using A3D_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.
// Retrieves the color code at index 3. Use gray shade as default color:
rgb.m_dRed = rgb.m_dGreen = rgb.m_dBlue = 0.75f;
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexRgbColorThe index of the color code
[out]pDataThe A3DGraphRgbColorData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_DEFAULT_COLORif the input value is the index for the default color (A3D_DEFAULT_COLOR_INDEX).
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_COLOR_INDEXif the color index does not match any color code.
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
See also
A3DGlobalInsertGraphRgbColor
A3DGraphRgbColorData

◆ 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.

rgb.m_dRed = rgb.m_dGreen = rgb.m_dBlue = 0.75f;
A3DStatus result = A3DGlobalInsertGraphRgbColor(&rgb, &idx_0);
assert(result == A3D_SUCCESS);
Second insertion with the same color, expect index to be the same.
A3DUns32 idx_1 = A3D_DEFAULT_COLOR_INDEX;
result = A3DGlobalInsertGraphRgbColor(&rgb, &idx_1);
assert(result == A3D_SUCCESS);
assert(idx_0 == idx_1);
Parameters
[in]pDataThe color code to insert.
[out]puiIndexRgbColorThe resulting index for the input color.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
See also
A3DGlobalGetGraphRgbColorData
A3DGraphRgbColorData

◆ 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 calling A3DGlobalGetGraphLinePatternData. To free it, call the function with A3D_DEFAULT_LINEPATTERN_INDEX.
// Retrieves the line pattern descriptor at index 3.
A3D_INITALIZE_DATA(A3DGlobalGetGraphLinePatternData, descriptor);
// Frees it:
Parameters
[in]uiIndexLinePatternThe index of the line pattern descriptor
[out]pDataThe A3DGraphLinePatternData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_LINEPATTERN_INDEXif the given index is negative or corresponds to a non-existing line pattern.
See also
A3DGraphLinePatternData
A3DGlobalInsertGraphLinePattern
A3DGraphStyleData
A3DGraphPictureData
A3DGraphicsData

◆ 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.

// Retrieves the material data at index 3:
A3DGraphMaterialData material_data;
A3DStatus result = A3DGlobalGetGraphMaterialData(3, &material_data);
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexMaterialThe index of the material
[out]pDataThe A3DGraphMaterialData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_MATERIAL_INDEXif the material index does not match any existing.
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif 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 for A3DGraphMaterialData
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.

A3DGraphMaterialData material_data;
A3DStatus result = A3DGlobalInsertGraphMaterial(&material_data, &idx_0);
assert(result == A3D_SUCCESS);
Second insertion with the same data, expect index to be the same.
A3DUns32 idx_1 = A3D_DEFAULT_MATERIAL_INDEX;
result = A3DGlobalInsertGraphMaterial(&material_data, &idx_1);
assert(result == A3D_SUCCESS);
assert(idx_0 == idx_1);
Parameters
[in]pDataThe material data to insert.
[out]puiIndexMaterialThe resulting index for the input color.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
See also
A3DGlobalGetGraphMaterialData
A3DGraphMaterialData

◆ 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.

// Retrieves the picture data at index 3:
A3DGraphPictureData picture_data;
A3DStatus result = A3DGlobalGetGraphPictureData(3, &picture_data);
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexPictureThe index of the picture data.
[out]pDataThe A3DGraphPictureData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_PICTURE_INDEXif the picture index does not match any existing.
A3D_INVALID_PICTURE_FORMATif the internal image format is not supported.
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
Memory management
pData contains data allocated from heap by A3DGlobalGetGraphPictureData. This data must be explicitely freed by your application. To do so, you can use the convienence call to A3DGlobalGetGraphPictureData with A3D_DEFAULT_PICTURE_INDEX:
// Deallocating data previously reserved by A3DGlobalGetGraphPictureData:
assert(result == A3D_SUCCESS);
See also
A3DGraphPictureData
A3DGlobalInsertGraphPicture

◆ 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.

A3DGraphPictureData picture_data;
// Configure picture_data...
A3DStatus result = A3DGlobalInsertGraphPicture(&picture_data, &idx);
assert(result == A3D_SUCCESS);
Parameters
[in]pDataThe picture data to insert.
[out]puiPictureIndexThe resulting index for the inserted picture data.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_ERRORwhen 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 of pData.

◆ 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.

// Retrieves the picture data at index 3:
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexDottingPatternThe index of the pattern.
[out]pDataThe A3DGraphDottingPatternData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_PATTERN_INDEXif uiIndexDottingPattern does not match any existing.
A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPEif uiIndexDottingPattern is invalid but indexes an other pattern type (either A3DGraphHatchingPatternData, A3DGraphSolidPatternData or A3DGraphVPicturePatternData)
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
See also
A3DGraphDottingPatternData
A3DGlobalInsertGraphDottingPattern
A3DGraphHatchingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ 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.

// Configure pattern_data...
A3DStatus result = A3DGlobalInsertGraphDottingPattern(&pattern_data, &idx);
assert(result == A3D_SUCCESS);
Parameters
[in]pDataThe pattern data to insert.
[out]puiIndexDottingPatternThe resulting index for the inserted pattern data.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_ERRORwhen an internal error is encountered while storing the pattern data.
See also
A3DGraphDottingPatternData
A3DGlobalGetGraphDottingPatternData
A3DGraphHatchingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ 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]uiIndexHatchingPatternThe index of the pattern.
[out]pDataThe A3DGraphHatchingPatternData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_PATTERN_INDEXif uiIndexHatchingPattern does not match any existing.
A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPEif uiIndexHatchingPattern is invalid but indexes an other pattern type (either A3DGraphDottingPatternData, A3DGraphSolidPatternData or A3DGraphVPicturePatternData)
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
Memory management
Some data in A3DGraphHatchingPatternData are allocated from the heap upon calling A3DGlobalGetGraphHatchingPatternData. To free it, call the function again with A3D_DEFAULT_PATTERN_INDEX.
// Retrieves the pattern data at index 3:
assert(result == A3D_SUCCESS);
// Frees it:
See also
A3DGraphHatchingPatternData
A3DGlobalInsertGraphHatchingPattern
A3DGraphDottingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ A3DGlobalInsertGraphHatchingPattern()

A3DStatus A3DGlobalInsertGraphHatchingPattern ( const A3DGraphHatchingPatternData pData,
A3DUns32 puiIndexHatchingPattern 
)

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.

// Configure pattern_data...
A3DStatus result = A3DGlobalInsertGraphHatchingPattern(&pattern_data, &idx);
assert(result == A3D_SUCCESS);
Memory management
A3DGraphHatchingPatternData contains heap allocated data. When called, A3DGlobalInsertGraphHatchingPattern will clone these data internally. Thus, your application is responsible for the management of pData only and not for the cloned content.
Parameters
[in]pDataThe pattern data to insert.
[out]puiIndexHatchingPatternThe resulting index for the inserted pattern data.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_ERRORwhen an internal error is encountered while storing the pattern data.
See also
A3DGraphHatchingPatternData
A3DGraphHatchingPatternLineData
A3DGlobalGetGraphHatchingPatternData
A3DGraphDottingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ 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.

// Retrieves the pattern data at index 3:
A3DStatus result = A3DGlobalGetGraphSolidPatternData(3, &pattern_data);
assert(result == A3D_SUCCESS);
Parameters
[in]uiIndexSolidPatternThe index of the pattern.
[out]pDataThe A3DGraphSolidPatternData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_PATTERN_INDEXif uiIndexDottingPattern does not match any existing.
A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPEif uiIndexDottingPattern is invalid but indexes an other pattern type (either A3DGraphHatchingPatternData, A3DGraphDottingPatternData or A3DGraphVPicturePatternData)
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
See also
A3DGraphDottingPatternData
A3DGlobalInsertGraphHatchingPattern
A3DGraphHatchingPatternData
A3DGraphVPicturePatternData

◆ 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.

// Configure pattern_data...
A3DStatus result = A3DGlobalInsertGraphHatchingPattern(&pattern_data, &idx);
assert(result == A3D_SUCCESS);
Parameters
[in]pDataThe pattern data to insert.
[out]puiIndexSolidPatternThe resulting index for the inserted pattern data.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_ERRORwhen an internal error is encountered while storing the pattern data.
See also
A3DGraphSolidPatternData
A3DGlobalGetGraphSolidPatternData
A3DGraphDottingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ 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]uiIndexVPicturePatternThe index of the pattern.
[out]pDataThe A3DGraphVPicturePatternData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_PATTERN_INDEXif uiIndexVPicturePattern does not match any existing.
A3D_BASEWITHGRAPHICS_BAD_ENTITY_TYPEif uiIndexVPicturePattern is invalid but indexes an other pattern type (either A3DGraphDottingPatternData, A3DGraphSolidPatternData or A3DGraphVPicturePatternData)
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
Memory management
A3DGraphVPicturePatternData contains a handle to an already existing instance of A3DTessMarkupData. This instance is entirely managed by HOOPS. Thus you are not responsible for deleting an entity returned by this function.
// Retrieves the pattern data at index 3:
assert(result == A3D_SUCCESS);
Retrieve tessellation base and markup data:
if(pattern_data.m_pMarkupTess != 0) {
A3DTessBaseData tess_base;
result = A3DTessBaseGet(pattern_data.m_pMarkupTess, &tess_base);
assert(result == A3D_SUCCESS);
A3DTessMarkupData tess_markup;
result = A3DTessMarkupGet(pattern_data.m_pMarkupTess, &tess_markup);
assert(result == A3D_SUCCESS);
// ...
A3DTessMarkupGet(0, &tess_markup);
A3DTessBaseGet(0, &tess_base);
}
See also
A3DGraphVPicturePatternData
A3DGlobalInsertGraphVPicturePattern
A3DTessBaseGet
A3DTessMarkupGet
A3DTessBaseData
A3DTessMarkupData
A3DGraphDottingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ 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.

// Configure pattern_data...
A3DStatus result = A3DGlobalInsertGraphVPicturePattern(&pattern_data, &idx);
assert(result == A3D_SUCCESS);
Memory management
A3DGraphVPicturePatternData contains a handle to an already existing instance of A3DTessMarkupData. This instance is entirely managed by HOOPS.
Parameters
[in]pDataThe pattern data to insert.
[out]puiIndexVPicturePatternThe resulting index for the inserted pattern data.
Returns
A3D_SUCCESS or an error code.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_ERRORwhen an internal error is encountered while storing the pattern data.
See also
A3DGraphVPicturePatternData
A3DGlobalGetGraphVPicturePatternData
A3DTessBaseSet
A3DTessMarkupCreate
A3DTessBaseData
A3DTessMarkupData
A3DGraphDottingPatternData
A3DGraphSolidPatternData
A3DGraphVPicturePatternData

◆ A3DGraphCameraGet()

A3DStatus A3DGraphCameraGet ( const A3DGraphCamera pCamera,
A3DGraphCameraData pData 
)

Fetches data from a camera entity given its handle.

Version
2.0
Parameters
[in]pCameraA handle to the camera to fetch data from.
[out]pDataThe A3DGraphCameraData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
// Retrieves the camera data at index 3:
A3DStatus result = A3DGraphCameraGet(3, &camera);
assert(result == A3D_SUCCESS);
See also
A3DGraphCameraData
A3DGraphCameraCreate
A3DGraphSceneDisplayParametersData
A3DAsmProductOccurrenceData

◆ 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]pDataThe data used for camera creation.
[in]ppCameraAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3DGraphCamera handle = 0;
// Configure data...
A3DStatus result = A3DGraphCameraCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphCameraData
A3DGraphCameraGet
A3DGraphSceneDisplayParametersData
A3DAsmProductOccurrenceData

◆ 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]pLightA handle to the light to fetch data from.
[out]pDataThe A3DGraphAmbientLightData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
// Retrieves the light data at index 3:
A3DStatus result = A3DGraphAmbientLightGet(3, &light);
assert(result == A3D_SUCCESS);
See also
A3DGraphAmbientLightData
A3DGraphAmbientLightCreate
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ 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]pDataThe data used for light creation.
[in]ppLightAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
// Configure data...
A3DStatus result = A3DGraphAmbientLightCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphAmbientLightData
A3DGraphAmbientLightGet
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ A3DGraphPointLightGet()

A3DStatus A3DGraphPointLightGet ( const A3DGraphPointLight pLight,
A3DGraphPointLightData pData 
)

Fetches data from a point light source entity given its handle.

Version
2.0
Parameters
[in]pLightA handle to the light to fetch data from.
[out]pDataThe A3DGraphPointLightData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_ENTITY_TYPEif the entity type pLight refers to is not kA3DTypeGraphPointLight
// Retrieves the light data at index 3:
A3DStatus result = A3DGraphPointLightGet(3, &light);
assert(result == A3D_SUCCESS);
See also
A3DGraphPointLightData
A3DGraphPointLightCreate
A3DGraphAmbientLightData
A3DGraphDirectionalLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ 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]pDataThe data used for light creation.
[in]ppLightAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3DGraphPointLight handle = 0;
// Configure data...
A3DStatus result = A3DGraphPointLightCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphAmbientLightData
A3DGraphAmbientLightGet
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ A3DGraphSpotLightGet()

A3DStatus A3DGraphSpotLightGet ( const A3DGraphSpotLight pLight,
A3DGraphSpotLightData pData 
)

Fetches data from a spotlight source entity given its handle.

Version
2.0
Parameters
[in]pLightA handle to the light to fetch data from.
[out]pDataThe A3DGraphSpotLightData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_ENTITY_TYPEif the entity type pLight refers to is not kA3DTypeGraphSpotLight
// Retrieves the light data at index 3:
A3DStatus result = A3DGraphSpotLightGet(3, &light);
assert(result == A3D_SUCCESS);
See also
A3DGraphSpotLightData
A3DGraphSpotLightCreate
A3DGraphAmbientLightData
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSceneDisplayParametersData

◆ 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]pDataThe data used for light creation.
[in]ppLightAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3DGraphSpotLight handle = 0;
// Configure data...
A3DStatus result = A3DGraphSpotLightCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphSpotLightData
A3DGraphAmbientLightData
A3DGraphAmbientLightGet
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSceneDisplayParametersData

◆ A3DGraphDirectionalLightGet()

A3DStatus A3DGraphDirectionalLightGet ( const A3DGraphDirectionalLight pLight,
A3DGraphDirectionalLightData pData 
)

Fetches data from a directional source entity given its handle.

Version
2.0
Parameters
[in]pLightA handle to the light to fetch data from.
[out]pDataThe A3DGraphDirectionalLightData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
A3D_INVALID_ENTITY_TYPEif the entity type pLight refers to is not kA3DTypeGraphDirectionalLight
// Retrieves the light data at index 3:
assert(result == A3D_SUCCESS);
See also
A3DGraphDirectionalLightData
A3DGraphDirectionalLightCreate
A3DGraphAmbientLightData
A3DGraphDirectionalLightData
A3DGraphPointLightData
A3DGraphSceneDisplayParametersData

◆ 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]pDataThe data used for light creation.
[in]ppLightAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
// Configure data...
A3DStatus result = A3DGraphDirectionalLightCreate(&data, &handle);
assert(handle != 0);
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.
See also
A3DGraphDirectionalLightData
A3DGraphDirectionalLightGet
A3DGraphAmbientLightData
A3DGraphAmbientLightGet
A3DGraphPointLightData
A3DGraphSpotLightData
A3DGraphSceneDisplayParametersData

◆ A3DGraphSceneDisplayParametersGet()

A3DStatus A3DGraphSceneDisplayParametersGet ( const A3DGraphSceneDisplayParameters pSceneDisplayParameters,
A3DGraphSceneDisplayParametersData pData 
)

Fetches data from a scene diplay parameters entity given its handle.

Version
2.0
Parameters
[in]pSceneDisplayParametersA handle to the entity to fetch data from.
[out]pDataThe A3DGraphSceneDisplayParametersData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif pData is incorrectly initialized
Memory management
pData contains data allocated from heap by A3DGraphSceneDisplayParametersGet. This data must be explicitely freed by your application. To do so, you can use the convienence call to A3DGraphSceneDisplayParametersGet with 0 as handle.
// Retrieves the scene display data handled by pHandle:
assert(result == A3D_SUCCESS);
// Free the data:
See also
A3DGraphSceneDisplayParametersCreate
A3DGraphSceneDisplayParametersData

◆ 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]pDataThe data used for scene parameters creation.
[in]ppSceneDisplayParametersAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif pData is null.
A3D_INVALID_DATA_STRUCT_SIZEif 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.
See also
A3DGraphSceneDisplayParametersData
A3DGraphSceneDisplayParametersGet

◆ 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]ppAttrAn address to the new handle after creation.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
assert(result == A3D_SUCCESS);
assert(handle != 0);
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.
See also
A3DMiscCascadedAttributesData
A3DMiscCascadedAttributesGet
A3DMiscCascadedAttributesDelete

◆ 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]pAttrA handle to the entity to delete.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
See also
A3DMiscCascadedAttributesData
A3DMiscCascadedAttributesCreate
A3DMiscCascadedAttributesGet

◆ A3DMiscCascadedAttributesGet()

A3DStatus A3DMiscCascadedAttributesGet ( const A3DMiscCascadedAttributes pAttr,
A3DMiscCascadedAttributesData psData 
)

Fetches data from a cascaded attributes entity given its handle.

Version
2.0
Parameters
[in]pAttrA handle to the light to fetch data from.
[out]psDataThe A3DMiscCascadedAttributesData to fill in.
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_DATA_STRUCT_NULLif psData is null.
A3D_INVALID_DATA_STRUCT_SIZEif psData is incorrectly initialized
// Retrieves the light data at handle 'light':
assert(result == A3D_SUCCESS);
See also
A3DMiscCascadedAttributesData
A3DMiscCascadedAttributesCreate
A3DMiscCascadedAttributesDelete

◆ 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]pAttrA handle to the resulting cascaded attributes
[in]pBaseThe child node the attributes are computed from
[in]pFatherThe attributes held by the parent node
Returns
A3D_SUCCESS or an error code in case of failure.
Return values
A3D_SUCCESSin case of success.
A3D_INITIALIZE_NOT_CALLEDif 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 info
A3DMiscCascadedAttributes* computed_attributes = 0;
A3DMiscCascadedAttributesCreate(computed_attributes);
computed_attributes,
product_occurrence, // as const A3DRootBaseWithGraphics*
parent_attributes
);
// Recursively call children po, giving them local computed_attributes
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);
}
A3DMiscCascadedAttributesDelete(computed_attributes);
}

◆ A3DMiscPointerFromIndexGet()

A3DStatus A3DMiscPointerFromIndexGet ( const A3DUns32  uiIndex,
const A3DEEntityType  eType,
A3DEntity **  ppEntity 
)

Retrieve the handle of an indexed entity.

Version
2.0

Even if they are usually accessed using a numerical index from the global data, entities such as A3DGraphMaterialData each have a handle like any other entity.

This function allows you to retrieve the entity handle behind an indexed data. From the entity, additional content can be obtained, such as meta-data.

Parameters
[in]uiIndexThe index of the data in the global data
[in]eTypeThe expected entity type
[out]ppEntityA pointer to the resulting entity handle
Supported types

eType can be one of:

Returns
A3D_SUCCESS or A3D_ERROR

◆ A3DMiscRootBaseInsertAttribute()

A3DStatus A3DMiscRootBaseInsertAttribute ( const A3DRootBase pRootBase,
const A3DMiscAttribute pAttribute 
)

Adds a new attribute to the given entity.

Version
2.0
Parameters
[in]pRootBaseA handle to the entity
[in]pAttributeA handle to the new attribute
Returns
A3D_SUCCESS or an error code
Return values
A3D_INITIALIZE_NOT_CALLEDif the library is not initialized
A3D_INVALID_ENTITY_NULLif either pRootBase of pAttribute is 0
A3D_BASE_BAD_ENTITY_TYPEif pRootBase is not a root base type or derived