A3DGlobalGetGraphMaterialData
-
A3DStatus
A3DGlobalGetGraphMaterialData(const A3DUns32 uiIndexMaterial, A3DGraphMaterialData *pData) A3DStatusA3DGlobalGetGraphMaterialData(constA3DUns32uiIndexMaterial,A3DGraphMaterialData* pData)Retrieves an indexed RGB color.
2.0HOOPS stores materials in a global state using indexes. When given an index, call
A3DGlobalGetGraphMaterialDatato fill in anA3DGraphMaterialDatainstance.// Retrieves the material data at index 3: A3DGraphMaterialData material_data = A3D_MAKE_DATA(A3DGraphMaterialData); A3DStatus result = A3DGlobalGetGraphMaterialData(3, &material_data); assert(result == A3D_SUCCESS);
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
pDatais null.A3D_INVALID_DATA_STRUCT_SIZE: if
pDatais incorrectly initializedThis function allows getting basic material data from its index in the global state. To retrieve the underlying material entity, use
A3DMiscPointerFromIndexGetas stated in the documentation forA3DGraphMaterialDataA3DGlobalInsertGraphMaterialA3DGraphMaterialDataA3DMiscPointerFromIndexGetParameters
uiIndexMaterial: The index of the material
pData: The
A3DGraphMaterialDatato fill in.Returns
A3D_SUCCESSor an error code in case of failure.