Panda3D
|
This defines how a single column is interleaved within a vertex array stored within a Geom. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ (const GeomVertexColumn copy) | |
__init__ (const InternalName name, int num_components, GeomEnums::NumericType numeric_type, GeomEnums::Contents contents, int start, int column_alignment, int num_elements, int element_stride) | |
int | getColumnAlignment () |
Returns the alignment requirements for this column. More... | |
int | getComponentBytes () |
Returns the number of bytes used by each component (that is, by one element of the numeric type). More... | |
GeomEnums::Contents | getContents () |
Returns the token representing the semantic meaning of the stored value. More... | |
int | getElementStride () |
This value is only relevant for matrix types. More... | |
const InternalName | getName () |
Returns the name of this particular data field, e.g. More... | |
int | getNumComponents () |
Returns the number of components of the column: the number of instances of the NumericType in each element. More... | |
int | getNumElements () |
Returns the number of times this column is repeated. More... | |
GeomEnums::NumericType | getNumericType () |
Returns the token representing the numeric type of the data storage. More... | |
int | getNumValues () |
Returns the number of numeric values of the column: the number of distinct numeric values that go into each element. More... | |
int | getStart () |
Returns the byte within the array record at which this column starts. More... | |
int | getTotalBytes () |
Returns the number of bytes used by each element of the column: component_bytes * num_components. More... | |
bool | hasHomogeneousCoord () |
Returns true if this Contents type is one that includes a homogeneous coordinate in the fourth component, or false otherwise. More... | |
bool | isBytewiseEquivalent (const GeomVertexColumn other) |
Returns true if the data store of this column is exactly the same as that of the other, irrespective of name or start position within the record. More... | |
GeomVertexColumn | operator= (const GeomVertexColumn copy) |
output (Ostream out) | |
bool | overlapsWith (int start_byte, int num_bytes) |
Returns true if this column overlaps with any of the bytes in the indicated range, false if it does not. More... | |
setColumnAlignment (int column_alignment) | |
Changes the column alignment of an existing column. More... | |
setContents (GeomEnums::Contents contents) | |
Changes the semantic meaning of an existing column. More... | |
setName (InternalName name) | |
Replaces the name of an existing column. More... | |
setNumComponents (int num_components) | |
Changes the number of components of an existing column. More... | |
setNumericType (GeomEnums::NumericType numeric_type) | |
Changes the numeric type an existing column. More... | |
setStart (int start) | |
Changes the start byte of an existing column. More... | |
![]() | |
__init__ () | |
__init__ (const GeomEnums) | |
This defines how a single column is interleaved within a vertex array stored within a Geom.
The GeomVertexArrayFormat class maintains a list of these to completely define a particular array structure.
__init__ | ( | const GeomVertexColumn | copy | ) |
__init__ | ( | const InternalName | name, |
int | num_components, | ||
GeomEnums::NumericType | numeric_type, | ||
GeomEnums::Contents | contents, | ||
int | start, | ||
int | column_alignment, | ||
int | num_elements, | ||
int | element_stride | ||
) |
int getColumnAlignment | ( | ) |
Returns the alignment requirements for this column.
If this is greater than 1, it restricts the column to appear only on memory addresses that are integer multiples of this value; this has implications for this column's start value, as well as the stride of the resulting array.
int getComponentBytes | ( | ) |
Returns the number of bytes used by each component (that is, by one element of the numeric type).
GeomEnums::Contents getContents | ( | ) |
Returns the token representing the semantic meaning of the stored value.
int getElementStride | ( | ) |
This value is only relevant for matrix types.
Returns the number of bytes to add to access the next row of the matrix.
const InternalName getName | ( | ) |
Returns the name of this particular data field, e.g.
"vertex" or "normal". The name may be a user-defined string, or it may be one of the standard system-defined field types. Only the system-defined field types are used for the actual rendering.
int getNumComponents | ( | ) |
Returns the number of components of the column: the number of instances of the NumericType in each element.
This is usually, but not always, the same thing as get_num_values().
int getNumElements | ( | ) |
Returns the number of times this column is repeated.
This is usually 1, except for matrices.
GeomEnums::NumericType getNumericType | ( | ) |
Returns the token representing the numeric type of the data storage.
int getNumValues | ( | ) |
Returns the number of numeric values of the column: the number of distinct numeric values that go into each element.
This is usually, but not always, the same thing as get_num_components(); the difference is in the case of a composite numeric type like NT_packed_dcba, which has four numeric values per component.
int getStart | ( | ) |
Returns the byte within the array record at which this column starts.
This can be set to non-zero to implement interleaved arrays.
int getTotalBytes | ( | ) |
Returns the number of bytes used by each element of the column: component_bytes * num_components.
bool hasHomogeneousCoord | ( | ) |
Returns true if this Contents type is one that includes a homogeneous coordinate in the fourth component, or false otherwise.
If this is true, correct operation on the vertex data may require scaling by the homogeneous coordinate from time to time (but in general this is handled automatically if you use the 3-component or smaller forms of get_data() and set_data()).
bool isBytewiseEquivalent | ( | const GeomVertexColumn | other | ) |
Returns true if the data store of this column is exactly the same as that of the other, irrespective of name or start position within the record.
GeomVertexColumn operator= | ( | const GeomVertexColumn | copy | ) |
output | ( | Ostream | out | ) |
bool overlapsWith | ( | int | start_byte, |
int | num_bytes | ||
) |
Returns true if this column overlaps with any of the bytes in the indicated range, false if it does not.
setColumnAlignment | ( | int | column_alignment | ) |
Changes the column alignment of an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).
setContents | ( | GeomEnums::Contents | contents | ) |
Changes the semantic meaning of an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).
setName | ( | InternalName | name | ) |
Replaces the name of an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).
setNumComponents | ( | int | num_components | ) |
Changes the number of components of an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).
setNumericType | ( | GeomEnums::NumericType | numeric_type | ) |
Changes the numeric type an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).
setStart | ( | int | start | ) |
Changes the start byte of an existing column.
This is only legal on an unregistered format (i.e. when constructing the format initially).