Global Data Module

Types

A3DGlobalData

Functions

A3DStatus

A3DGlobalGetPointer

A3DStatus

A3DGlobalGet

A3DStatus

A3DGlobalIsMaterialTexture

A3DStatus

A3DGlobalGetFillPatternType

Detailed Description

group a3d_global_data_module

Accesses global definitions used by all PRC entities.

This module defines the data for commonly used attributes, such as colors, textures, materials, and patterns. Global data is stored in the session’s global memory, separate from the A3DAsmModelFile. Global data can be accessed independently from A3DAsmModelFile. Therefore, you can access colors, textures, materials, and patterns that may or may not be used by the entities that are used in an A3DAsmModelFile. All these global arrays are filled when reading the PRC physical file and optimized to save place. For instance, if two entities uses the same color definition (same triplet RGB), only one color will be stored in the array.

Function Documentation

A3DStatus A3DGlobalGetPointer(A3DGlobal **ppGlobal)

Gets the global object A3DGlobal.

Version

2.0

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DGlobalGet(const A3DGlobal *pGlobal, A3DGlobalData *pData)

Populates the A3DGlobalData structure.

Version

2.0

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DGlobalIsMaterialTexture(const A3DUns32 uiIndexMaterial, A3DBool *pbIsTexture)

Determines whether the data at the index uiIndexMaterial in the global array of materials is an A3DGraphTextureApplication or an A3DGraphMaterialData.

Version

2.0

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure

A3DStatus A3DGlobalGetFillPatternType(const A3DUns32 uiIndexPattern, A3DEEntityType *pePatternType)

Gives the FillPattern type of the uiIndexPattern index in the global array of fill patterns.

A FillPattern type can be one of the following types:

Version

2.0

Return values:
  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_DATA_STRUCT_SIZE

  • A3D_INVALID_DATA_STRUCT_NULL

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_SUCCESS

Returns:

A3D_SUCCESS on success, or an error code on failure