#include <builderVertex.h>
Inheritance diagram for BuilderVertexI:
Public Types | |
typedef BuilderAttribI | Attrib |
typedef ushort | VType |
typedef ushort | NType |
typedef ushort | TType |
typedef ushort | CType |
Public Member Functions | |
BuilderVertexI () | |
BuilderVertexI (ushort c) | |
void | set_coord_value (const BuilderV *array, ushort index) |
Reassigns the vertex coordinate, without knowing whether the vertex is indexed or nonindexed. | |
void | set_normal_value (const BuilderN *array, ushort index) |
Reassigns the vertex normal, without knowing whether the vertex is indexed or nonindexed. | |
void | set_texcoord_value (const BuilderTC *array, ushort index) |
Reassigns the vertex texture coordinate, without knowing whether the vertex is indexed or nonindexed. | |
void | set_color_value (const BuilderC *array, ushort index) |
Reassigns the vertex color, without knowing whether the vertex is indexed or nonindexed. | |
BuilderV | get_coord_value (const BuilderBucket &bucket) const |
Returns the actual coordinate value of the vertex, whether it is indexed or nonindexed. | |
BuilderN | get_normal_value (const BuilderBucket &bucket) const |
Returns the actual normal value of the vertex, whether it is indexed or nonindexed. | |
BuilderTC | get_texcoord_value (const BuilderBucket &bucket) const |
Returns the actual texture coordinate value of the vertex, whether it is indexed or nonindexed. | |
BuilderC | get_color_value (const BuilderBucket &bucket) const |
Returns the actual color value of the vertex, whether it is indexed or nonindexed. | |
bool | is_valid () const |
BuilderVertexTempl & | clear () |
bool | has_coord () const |
VType | get_coord () const |
BuilderVertexTempl & | set_coord (const VType &c) |
BuilderVertexTempl & | set_normal (const NType &c) |
BuilderVertexTempl & | clear_normal () |
bool | has_texcoord () const |
TType | get_texcoord () const |
BuilderVertexTempl & | set_texcoord (const TType &t) |
BuilderVertexTempl & | clear_texcoord () |
BuilderVertexTempl & | set_color (const CType &c) |
BuilderVertexTempl & | clear_color () |
BuilderVertexTempl & | set_pixel_size (float s) |
BuilderVertexTempl & | clear_pixel_size () |
bool | operator== (const BuilderVertexTempl &other) const |
bool | operator== (const BuilderAttribTempl &other) const |
bool | operator!= (const BuilderVertexTempl &other) const |
bool | operator!= (const BuilderAttribTempl &other) const |
bool | operator< (const BuilderVertexTempl &other) const |
bool | operator< (const BuilderAttribTempl &other) const |
int | compare_to (const BuilderVertexTempl &other) const |
int | compare_to (const BuilderAttribTempl &other) const |
ostream & | output (ostream &out) const |
bool | has_normal () const |
NType | get_normal () const |
bool | has_color () const |
CType | get_color () const |
bool | has_pixel_size () const |
float | get_pixel_size () const |
Protected Attributes | |
VType | _coord |
TType | _texcoord |
NType | _normal |
CType | _color |
float | _pixel_size |
int | _flags |
See the comments at the the head of this file, and in builder.h.
Look in builderVertexTempl.h and builderAttribTempl.h for most of the interface to BuilderVertex.
Definition at line 124 of file builderVertex.h.
|
Definition at line 127 of file builderVertex.h. |
|
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. Definition at line 53 of file builderVertexTempl.h. |
|
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. Definition at line 51 of file builderVertexTempl.h. |
|
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. Definition at line 52 of file builderVertexTempl.h. |
|
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. Definition at line 50 of file builderVertexTempl.h. |
|
Definition at line 129 of file builderVertex.h. |
|
Definition at line 130 of file builderVertex.h. |
|
Resets the vertex to its initial, empty state.
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Removes the vertex's color.
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Removes the vertex's normal.
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Removes the vertex's pixel_size.
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Removes the vertex's texcoord.
|
|
Returns a number less than zero if this object sorts before the indicated object, greater than zero if it sorts after, and zero if the objects are equivalent.
|
|
Returns a number less than zero if this vertex sorts before the indicated vertex, greater than zero if it sorts after, and zero if the vertices are equivalent.
|
|
Returns the attribute's color. It is an error to call this without first verifying that has_color() is true. Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. |
|
Returns the actual color value of the vertex, whether it is indexed or nonindexed. See get_coord_value(). Definition at line 412 of file builderVertex.I. |
|
Returns the vertex's coordinate. It is an error to call this without first verifying that has_coord() is true. |
|
Returns the actual coordinate value of the vertex, whether it is indexed or nonindexed. Normally, the value returned by get_coord(), which will be either a BuilderV or a ushort, is sufficient, but there are occasional times when it is necessary to get the actual location in space of the vertex position (for instance, to subdivide a concave polygon). This function returns the actual coordinate value. For a nonindexed vertex, its return value is the same as get_coord(); for an indexed vertex, it looks up the vertex's index in the bucket's coord array, and returns that value. Note that this makes some perhaps unwarranted assumptions about indexed geometry; specifically, that its value is valid at creation time, and that it won't change too drastically during runtime. Definition at line 358 of file builderVertex.I. |
|
Returns the attribute's normal. It is an error to call this without first verifying that has_normal() is true. Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. Referenced by set_coord_value(). |
|
Returns the actual normal value of the vertex, whether it is indexed or nonindexed. See get_coord_value(). Definition at line 376 of file builderVertex.I. |
|
Returns the attribute's pixel_size. It is an error to call this without first verifying that has_pixel_size() is true. Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. |
|
Returns the vertex's texture coordinate. It is an error to call this without first verifying that has_texcoord() is true. |
|
Returns the actual texture coordinate value of the vertex, whether it is indexed or nonindexed. See get_coord_value(). Definition at line 394 of file builderVertex.I. |
|
Returns true if the attribute has a color.
Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. |
|
Returns true if the vertex has a vertex coordinate.
|
|
Returns true if the attribute has a normal.
Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. |
|
Returns true if the attribute has a pixel_size.
Reimplemented in BuilderPrimTempl< BuilderVertexI >, and BuilderPrimTempl< BuilderVertex >. |
|
Returns true if the vertex has a texture coordinate.
|
|
Returns true if the vertex is valid, i.e. if it has a vertex coordinate. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices in the locus of consideration will share the same state: with or without normals, texcoords, etc. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices in the locus of consideration will share the same state: with or without normals, texcoords, etc. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices in the locus of consideration will share the same state: with or without normals, texcoords, etc. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices to be meshed together must share the same state: with or without normals, texcoords, etc. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices in the locus of consideration will share the same state: with or without normals, texcoords, etc. |
|
Assigns an ordering to the vertices. This is used by the Mesher to group identical vertices. This assumes that all vertices in the locus of consideration will share the same state: with or without normals, texcoords, etc. |
|
Formats the vertex for output in some sensible way.
Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Resets the vertex's color. This is overridden from BuilderAttrib just so we can typecast the return value to BuilderVertex. The other functions, has_color() and get_color(), are inherited untouched from BuilderAttrib. Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Reassigns the vertex color, without knowing whether the vertex is indexed or nonindexed. A nonindexed vertex will look up the index in the array and store the resulting value, while an indexed vertex will just store the index number (which assumes the array is the same one it's indexing on). Definition at line 311 of file builderVertex.I. |
|
Resets the vertex's coordinate.
|
|
Reassigns the vertex coordinate, without knowing whether the vertex is indexed or nonindexed. A nonindexed vertex will look up the index in the array and store the resulting value, while an indexed vertex will just store the index number (which assumes the array is the same one it's indexing on). Definition at line 240 of file builderVertex.I. References BuilderN, BuilderAttribTempl< ushort, ushort, ushort, ushort >::get_normal(), BuilderBucket::get_normals(), INLINE, nassertr, Normalf, and NULL. |
|
Resets the vertex's normal. This is overridden from BuilderAttrib just so we can typecast the return value to BuilderVertex. The other functions, has_normal() and get_normal(), are inherited untouched from BuilderAttrib. Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Reassigns the vertex normal, without knowing whether the vertex is indexed or nonindexed. A nonindexed vertex will look up the index in the array and store the resulting value, while an indexed vertex will just store the index number (which assumes the array is the same one it's indexing on). Definition at line 264 of file builderVertex.I. |
|
Resets the vertex's pixel_size. This is overridden from BuilderAttrib just so we can typecast the return value to BuilderVertex. The other functions, has_pixel_size() and get_pixel_size(), are inherited untouched from BuilderAttrib. Reimplemented from BuilderAttribTempl< ushort, ushort, ushort, ushort >. |
|
Resets the vertex's texture coordinate.
|
|
Reassigns the vertex texture coordinate, without knowing whether the vertex is indexed or nonindexed. A nonindexed vertex will look up the index in the array and store the resulting value, while an indexed vertex will just store the index number (which assumes the array is the same one it's indexing on). Definition at line 288 of file builderVertex.I. |
|
Definition at line 84 of file builderAttribTempl.h. |
|
Definition at line 89 of file builderVertexTempl.h. |
|
Definition at line 86 of file builderAttribTempl.h. |
|
Definition at line 83 of file builderAttribTempl.h. |
|
Definition at line 85 of file builderAttribTempl.h. |
|
Definition at line 90 of file builderVertexTempl.h. |