Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions
GeomVertexColumn Class Reference

This defines how a single column is interleaved within a vertex array stored within a Geom. More...

Inheritance diagram for GeomVertexColumn:
GeomEnums

List of all members.

Public Member Functions

 GeomVertexColumn (GeomVertexColumn const copy)
 GeomVertexColumn (InternalName name, int num_components, NumericType numeric_type, Contents contents, int start, int column_alignment)
 GeomVertexColumn (InternalName name, int num_components, NumericType numeric_type, Contents contents, int start)
int getColumnAlignment ()
 Returns the alignment requirements for this column.
int getComponentBytes ()
 Returns the number of bytes used by each component (that is, by one element of the numeric type).
Contents getContents ()
 Returns the token representing the semantic meaning of the stored value.
InternalName getName ()
 Returns the name of this particular data field, e.g.
int getNumComponents ()
 Returns the number of components of the column: the number of instances of the NumericType in each element.
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.
int getStart ()
 Returns the byte within the array record at which this column starts.
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.
bool isBytewiseEquivalent (GeomVertexColumn const 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= (GeomVertexColumn const 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.

Detailed Description

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.


Constructor & Destructor Documentation

GeomVertexColumn ( InternalName  name,
int  num_components,
NumericType  numeric_type,
Contents  contents,
int  start,
int  column_alignment 
)
GeomVertexColumn ( InternalName  name,
int  num_components,
NumericType  numeric_type,
Contents  contents,
int  start 
)

Member Function Documentation

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.

Returns the number of bytes used by each component (that is, by one element of the numeric type).

Returns the token representing the semantic meaning of the stored value.

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.

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().

Returns the token representing the numeric type of the data storage.

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.

Returns the byte within the array record at which this column starts.

This can be set to non-zero to implement interleaved arrays.

Returns the number of bytes used by each element of the column: component_bytes * num_components.

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 ( GeomVertexColumn const  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= ( GeomVertexColumn const  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.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties