C4 Engine
C4 Engine API Documentation

DataStructure::GetArrayStateElement

Defined in:  TSOpenDDL.h
Returns the state associated with a single subarray in a data structure.
Prototype

const uint32& GetArrayStateElement(int32 index) const;

Parameters
index The zero-based index of the subarray for which to retrieve the state.
Description
The GetArrayStateElement function returns a reference to the state associated with a single subarray in a data structure. The legal values of the index parameter range from zero to n / s −1, inclusive, where n is the total count of data elements returned by the DataStructure::GetDataElementCount function, and s is the size of each subarray returned by the PrimitiveStructure::GetArraySize function. States are stored contiguously in memory.

State data exists only if the PrimitiveStructure::GetStateFlag function returns true, and there is one state value per subarray. The GetArrayStateElement function should not be called if the PrimitiveStructure::GetStateFlag function returns false.
See Also

PrimitiveStructure::GetStateFlag

DataStructure::GetArrayDataElement