|
|
|
This describes the structure of a single array within a Geom data.
More...
#include "geomVertexArrayFormat.h"
List of all members.
Classes |
| class | Registry |
Public Member Functions |
|
| GeomVertexArrayFormat (const GeomVertexArrayFormat ©) |
|
| 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) |
|
| 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) |
| int | add_column (InternalName *name, int num_components, NumericType numeric_type, Contents contents, int start=-1, int column_alignment=0) |
| | Adds a new column to the specification.
|
| int | add_column (const GeomVertexColumn &column) |
| | Adds a new column to the specification.
|
| void | align_columns_for_animation () |
| | Reprocesses the columns in the format to align the C_point and C_vector columns to 16-byte boundaries to allow for the more efficient SSE2 operations (assuming SSE2 is enabled in the build).
|
| void | clear_columns () |
| | Removes all columns previously added, sets the stride to zero, and prepares to start over.
|
|
int | compare_to (const GeomVertexArrayFormat &other) const |
| virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
| | Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
|
| int | count_unused_space () const |
| | Returns the number of bytes per row that are not assigned to any column.
|
| virtual void | finalize (BamReader *manager) |
| | Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
|
|
virtual TypeHandle | force_init_type () |
| const GeomVertexColumn * | get_column (int i) const |
| | Returns the ith column of the array.
|
| const GeomVertexColumn * | get_column (const InternalName *name) const |
| | Returns the specification with the indicated name, or NULL if the name is not used.
|
| const GeomVertexColumn * | get_column (int start_byte, int num_bytes) const |
| | Returns the first specification that overlaps with any of the indicated bytes in the range, or NULL if none do.
|
| int | get_num_columns () const |
| | Returns the number of different columns in the array.
|
| int | get_pad_to () const |
| | Returns the byte divisor to which the data record must be padded to meet hardware limitations.
|
| int | get_stride () const |
| | Returns the total number of bytes reserved in the array for each vertex.
|
| int | get_total_bytes () const |
| | Returns the total number of bytes used by the data types within the format, including gaps between elements.
|
|
virtual TypeHandle | get_type () const |
| bool | has_column (const InternalName *name) const |
| | Returns true if the array has the named column, false otherwise.
|
| bool | is_data_subset_of (const GeomVertexArrayFormat &other) const |
| | 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 | is_registered () const |
| | Returns true if this format has been registered, false if it has not.
|
|
| MAKE_SEQ (get_columns, get_num_columns, get_column) |
|
void | operator= (const GeomVertexArrayFormat ©) |
|
void | output (ostream &out) const |
| void | pack_columns () |
| | Removes wasted space between columns.
|
| void | remove_column (const InternalName *name) |
| | Removes the column with the indicated name, if any.
|
| void | set_pad_to (int pad_to) |
| | Explicitly sets the byte divisor to which the data record must be padded to meet hardware limitations.
|
| void | set_stride (int stride) |
| | Changes the total number of bytes reserved in the array for each vertex.
|
| virtual bool | unref () const |
| | This method overrides ReferenceCount::unref() to unregister the object when its reference count goes to zero.
|
|
void | write (ostream &out, int indent_level=0) const |
| virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
| | Writes the contents of this object to the datagram for shipping out to a Bam file.
|
|
void | write_with_data (ostream &out, int indent_level, const GeomVertexArrayData *array_data) const |
Static Public Member Functions |
|
static | CPT (GeomVertexArrayFormat) register_format(const GeomVertexArrayFormat *format) |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
| static void | register_with_read_factory () |
| | Tells the BamReader how to create objects of type GeomVertexArrayFormat.
|
Protected Member Functions |
| void | fillin (DatagramIterator &scan, BamReader *manager) |
| | This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new GeomVertexArrayFormat.
|
Static Protected Member Functions |
| static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
| | This function is called by the BamReader's factory when a new object of type GeomVertexArrayFormat is encountered in the Bam file.
|
Friends |
|
class | GeomVertexFormat |
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.
Definition at line 53 of file geomVertexArrayFormat.h.
Member Function Documentation
Returns the specification with the indicated name, or NULL if the name is not used.
Definition at line 409 of file geomVertexArrayFormat.cxx.
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. This value is automatically increased as needed to ensure the individual numeric components in the array are word-aligned.
Definition at line 86 of file geomVertexArrayFormat.I.
Returns the total number of bytes reserved in the array for each vertex.
Definition at line 55 of file geomVertexArrayFormat.I.
Referenced by DXGraphicsStateGuardian8::apply_vertex_buffer(), GeomVertexData::copy_from(), GeomVertexData::copy_row_from(), DXGraphicsStateGuardian8::draw_lines(), DXGraphicsStateGuardian9::draw_lines(), DXGraphicsStateGuardian8::draw_points(), DXGraphicsStateGuardian9::draw_points(), DXGraphicsStateGuardian8::draw_triangles(), DXGraphicsStateGuardian9::draw_triangles(), DXGraphicsStateGuardian8::draw_trifans(), DXGraphicsStateGuardian9::draw_trifans(), DXGraphicsStateGuardian8::draw_tristrips(), DXGraphicsStateGuardian9::draw_tristrips(), is_data_subset_of(), and GeomVertexData::unclean_set_format().
Returns the total number of bytes used by the data types within the format, including gaps between elements.
Definition at line 117 of file geomVertexArrayFormat.I.
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).
Definition at line 450 of file geomVertexArrayFormat.cxx.
References get_stride().
Referenced by GeomVertexData::copy_from().
Explicitly sets the byte divisor to which the data record must be padded to meet hardware limitations.
See get_pad_to(). Normally it is not necessary to call this unless you have some specific requirements for row-to-row data alignment. Note that this value may be automatically increased at each subsequent call to add_column().
Definition at line 102 of file geomVertexArrayFormat.I.
Changes the total number of bytes reserved in the array for each vertex.
You may not reduce this below get_total_bytes(), but you may increase it arbitrarily.
Definition at line 68 of file geomVertexArrayFormat.I.
The documentation for this class was generated from the following files:
| | |