|
|
|
This describes the structure of a single array within a Geom data.
More...
List of all members.
Public Member Functions |
| | GeomVertexArrayFormat () |
| | GeomVertexArrayFormat (GeomVertexArrayFormat const copy) |
| | GeomVertexArrayFormat (InternalName name0, int num_components0, NumericType numeric_type0, Contents contents0, InternalName name1, int num_components1, NumericType numeric_type1, Contents contents1) |
| | GeomVertexArrayFormat (InternalName name0, int num_components0, NumericType numeric_type0, Contents contents0, InternalName name1, int num_components1, NumericType numeric_type1, Contents contents1, InternalName name2, int num_components2, NumericType numeric_type2, Contents contents2) |
| | GeomVertexArrayFormat (InternalName name0, int num_components0, NumericType numeric_type0, Contents contents0) |
| | GeomVertexArrayFormat (InternalName name0, int num_components0, NumericType numeric_type0, Contents contents0, InternalName name1, int num_components1, NumericType numeric_type1, Contents contents1, InternalName name2, int num_components2, NumericType numeric_type2, Contents contents2, InternalName name3, int num_components3, NumericType numeric_type3, Contents contents3) |
| int | addColumn (InternalName name, int num_components, NumericType numeric_type, Contents contents) |
| | Adds a new column to the specification.
|
| int | addColumn (GeomVertexColumn const column) |
| | Adds a new column to the specification.
|
| int | addColumn (InternalName name, int num_components, NumericType numeric_type, Contents contents, int start) |
| | Adds a new column to the specification.
|
| | clearColumns () |
| | Removes all columns previously added, sets the stride to zero, and prepares to start over.
|
| int | countUnusedSpace () |
| | Returns the number of bytes per row that are not assigned to any column.
|
| GeomVertexColumn const | getColumn (int start_byte, int num_bytes) |
| | Returns the first specification that overlaps with any of the indicated bytes in the range, or NULL if none do.
|
| GeomVertexColumn const | getColumn (InternalName const name) |
| | Returns the specification with the indicated name, or NULL if the name is not used.
|
| GeomVertexColumn const | getColumn (int i) |
| | Returns the ith column of the array.
|
| list | getColumns () |
| int | getNumColumns () |
| | Returns the number of different columns in the array.
|
| int | getPadTo () |
| | Returns the byte divisor to which the data record must be padded to meet hardware limitations.
|
| int | getStride () |
| | Returns the total number of bytes reserved in the array for each vertex.
|
| int | getTotalBytes () |
| | Returns the total number of bytes used by the data types within the format, including gaps between elements.
|
| bool | hasColumn (InternalName const name) |
| | Returns true if the array has the named column, false otherwise.
|
| bool | isDataSubsetOf (GeomVertexArrayFormat const other) |
| | Returns true if all of the fields in this array format are also present and equivalent in the other array format, and in the same byte positions, and the stride is the same.
|
| bool | isRegistered () |
| | Returns true if this format has been registered, false if it has not.
|
| GeomVertexArrayFormat | operator= (GeomVertexArrayFormat const copy) |
| | output (ostream out) |
| | packColumns () |
| | Removes wasted space between columns.
|
| | removeColumn (InternalName const name) |
| | Removes the column with the indicated name, if any.
|
| | setStride (int stride) |
| | Changes the total number of bytes reserved in the array for each vertex.
|
| bool | unref () |
| | This method overrides ReferenceCount.unref() to unregister the object when its reference count goes to zero.
|
| | write (ostream out, int indent_level) |
| | write (ostream out) |
| | writeWithData (ostream out, int indent_level, GeomVertexArrayData const array_data) |
Static Public Member Functions |
| static TypeHandle | getClassType () |
| static GeomVertexArrayFormat const | registerFormat (GeomVertexArrayFormat const format) |
| | Adds the indicated format to the registry, if there is not an equivalent format already there; in either case, returns the pointer to the equivalent format now in the registry.
|
Detailed Description
This describes the structure of a single array within a Geom data.
See GeomVertexFormat for the parent class which collects together all of the individual GeomVertexArrayFormat objects.
A particular array may include any number of standard or user-defined columns. All columns consist of a sequence of one or more numeric values, packed in any of a variety of formats; the semantic meaning of each column is defined in general with its contents member, and in particular by its name. The standard array types used most often are named "vertex", "normal", "texcoord", and "color"; other kinds of data may be piggybacked into the data record simply by choosing a unique name.
Constructor & Destructor Documentation
| GeomVertexArrayFormat |
( |
InternalName |
name0, |
|
|
int |
num_components0, |
|
|
NumericType |
numeric_type0, |
|
|
Contents |
contents0, |
|
|
InternalName |
name1, |
|
|
int |
num_components1, |
|
|
NumericType |
numeric_type1, |
|
|
Contents |
contents1, |
|
|
InternalName |
name2, |
|
|
int |
num_components2, |
|
|
NumericType |
numeric_type2, |
|
|
Contents |
contents2 |
|
) |
| |
| GeomVertexArrayFormat |
( |
InternalName |
name0, |
|
|
int |
num_components0, |
|
|
NumericType |
numeric_type0, |
|
|
Contents |
contents0, |
|
|
InternalName |
name1, |
|
|
int |
num_components1, |
|
|
NumericType |
numeric_type1, |
|
|
Contents |
contents1, |
|
|
InternalName |
name2, |
|
|
int |
num_components2, |
|
|
NumericType |
numeric_type2, |
|
|
Contents |
contents2, |
|
|
InternalName |
name3, |
|
|
int |
num_components3, |
|
|
NumericType |
numeric_type3, |
|
|
Contents |
contents3 |
|
) |
| |
Member Function Documentation
Adds a new column to the specification.
This is a table of per-vertex floating-point numbers such as "vertex" or "normal"; you must specify where in each record the table starts, and how many components (dimensions) exist per vertex.
Adding a column with the same name as a previous type, or that overlaps with one or more previous types, quietly removes the previous type(s).
The return value is the index number of the new data type.
Adds a new column to the specification.
This is a table of per-vertex floating-point numbers such as "vertex" or "normal"; you must specify where in each record the table starts, and how many components (dimensions) exist per vertex.
The return value is the index number of the new data type.
Adds a new column to the specification.
This is a table of per-vertex floating-point numbers such as "vertex" or "normal"; you must specify where in each record the table starts, and how many components (dimensions) exist per vertex.
The return value is the index number of the new data type.
Removes all columns previously added, sets the stride to zero, and prepares to start over.
Returns the number of bytes per row that are not assigned to any column.
Returns the specification with the indicated name, or NULL if the name is not used.
Returns the ith column of the array.
Returns the first specification that overlaps with any of the indicated bytes in the range, or NULL if none do.
Returns the number of different columns in the array.
Returns the byte divisor to which the data record must be padded to meet hardware limitations.
For instance, if this is 4, the stride will be automatically rounded up to the next multiple of 4 bytes.
Returns the total number of bytes reserved in the array for each vertex.
Returns the total number of bytes used by the data types within the format, including gaps between elements.
Returns true if the array has the named column, false otherwise.
Returns true if all of the fields in this array format are also present and equivalent in the other array format, and in the same byte positions, and the stride is the same.
That is, true if this format can share the same data pointer as the other format (with possibly some unused gaps).
Returns true if this format has been registered, false if it has not.
It may not be used for a Geom until it has been registered, but once registered, it may no longer be modified.
Removes wasted space between columns.
Adds the indicated format to the registry, if there is not an equivalent format already there; in either case, returns the pointer to the equivalent format now in the registry.
This is similar to GeomVertexFormat.register_format(), except that you generally need not call it explicitly. Calling GeomVertexFormat.register_format() automatically registers all of the nested array formats.
Removes the column with the indicated name, if any.
This leaves a gap in the byte structure.
Changes the total number of bytes reserved in the array for each vertex.
| | |