Detailed Description
Element routines.
Definition in file rs_element.rsh.
Function Documentation
Returns the size of element in bytes
- Parameters:
-
e | element to get data from |
- Returns:
- total size of the element in bytes
Returns the element's data kind
- Parameters:
-
e | element to get data from |
- Returns:
- element's data size
Returns the element's data type
- Parameters:
-
e | element to get data from |
- Returns:
- element's data type
For complex elements, this function will return the sub-element at index
- Parameters:
-
e | element to get data from |
index | index of the sub-element to return |
- Returns:
- sub-element in this element at given index
For complex elements, some sub-elements could be statically sized arrays. This function will return the array size for sub-element at index
- Parameters:
-
e | element to get data from |
index | index of the sub-element |
- Returns:
- array size of sub-element in this element at given index
Elements could be simple, such as an int or a float, or a structure with multiple sub elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.
- Parameters:
-
e | element to get data from |
- Returns:
- number of sub-elements in this element
For complex elements, this function will return the sub-element name at index
- Parameters:
-
e | element to get data from |
index | index of the sub-element |
name | array to store the name into |
nameLength | length of the provided name array |
- Returns:
- number of characters actually written, excluding the null terminator
For complex elements, this function will return the length of sub-element name at index
- Parameters:
-
e | element to get data from |
index | index of the sub-element to return |
- Returns:
- length of the sub-element name including the null terminator (size of buffer needed to write the name)
This function specifies the location of a sub-element within the element
- Parameters:
-
e | element to get data from |
index | index of the sub-element |
- Returns:
- offset in bytes of sub-element in this element at given index
Returns the element's vector size
- Parameters:
-
e | element to get data from |
- Returns:
- length of the element vector (for float2, float3, etc.)