#include <computedVerticesMaker.h>
Public Member Functions | |
ComputedVerticesMaker () | |
void | begin_new_space () |
Should be called before beginning the definition for a new transform space. | |
void | add_joint (EggNode *joint, double membership) |
Adds the joint with its associated membership amount to the current transform space definition. | |
void | add_vertex_joints (EggVertex *vertex, EggNode *object) |
Adds the joints the vertex belongs to, along with their respective memberships, to the current transform space definition. | |
void | mark_space () |
Completes the definition of a transform space as a set of joints and memberships. | |
int | add_vertex (const Vertexd &vertex, const EggMorphVertexList &morphs, const LMatrix4d &transform) |
Adds a vertex value to the currently-defined transform space, and returns its index number within the array. | |
int | add_normal (const Normald &normal, const EggMorphNormalList &morphs, const LMatrix4d &transform) |
Adds a normal value to the currently-defined transform space, and returns its index number within the array. | |
int | add_texcoord (const TexCoordd &texcoord, const EggMorphTexCoordList &morphs, const LMatrix3d &transform) |
Adds a texcoord value to the array (texture coordinates are unrelated to the current transform space), and returns its index number within the array. | |
int | add_color (const Colorf &color, const EggMorphColorList &morphs) |
Adds a color value to the array (color values are unrelated to the current transform space), and returns its index number within the array. | |
ComputedVertices * | make_computed_vertices (Character *character, CharacterMaker &char_maker) |
After all spaces have been defined and all vertices added, creates a new ComputedVertices object and returns it. | |
void | write (ostream &out) const |
Public Attributes | |
PTA_Vertexf | _coords |
PTA_Normalf | _norms |
PTA_Colorf | _colors |
PTA_TexCoordf | _texcoords |
Protected Types | |
typedef pmap< int, LVector3f > | VertexMorphList |
typedef pmap< int, LVector3f > | NormalMorphList |
typedef pmap< int, LVector2f > | TexCoordMorphList |
typedef pmap< int, LVector4f > | ColorMorphList |
typedef pmap< string, MorphList > | Morphs |
typedef pset< int > | Vertices |
typedef pmap< JointWeights, VertexCollection > | TransformSpaces |
Protected Attributes | |
Morphs | _morphs |
Vertices | _cindex |
Vertices | _tindex |
ComputedVerticesMakerTexCoordMap | _tmap |
ComputedVerticesMakerColorMap | _cmap |
TransformSpaces | _transforms |
JointWeights | _current_jw |
VertexCollection * | _current_vc |
Friends | |
ostream & | operator<< (ostream &, const JointWeights &) |
Generally, you use a ComputedVerticesMaker by first defining a transform space via begin_new_space(), repeated calls to add_joint() (or add_vertex_joints()), and then mark_space(). Having done that, you can then add any number of vertices to the space via add_vertex(), add_normal(), etc., and it will return an index number for each vertex, collapsing duplicate vertices together properly. When you are ready to define a new space, simply repeat the process from begin_new_space().
Definition at line 84 of file computedVerticesMaker.h.
|
Definition at line 117 of file computedVerticesMaker.h. |
|
Definition at line 126 of file computedVerticesMaker.h. |
|
Definition at line 115 of file computedVerticesMaker.h. |
|
Definition at line 116 of file computedVerticesMaker.h. |
|
Definition at line 159 of file computedVerticesMaker.h. |
|
Definition at line 114 of file computedVerticesMaker.h. |
|
Definition at line 129 of file computedVerticesMaker.h. |
|
Definition at line 42 of file computedVerticesMaker.cxx. References NULL. |
|
Adds a color value to the array (color values are unrelated to the current transform space), and returns its index number within the array.
Definition at line 333 of file computedVerticesMaker.cxx. |
|
Adds the joint with its associated membership amount to the current transform space definition.
Definition at line 77 of file computedVerticesMaker.cxx. References _current_jw. |
|
Adds a normal value to the currently-defined transform space, and returns its index number within the array.
Definition at line 242 of file computedVerticesMaker.cxx. References _morphs, _texcoords, _tindex, _tmap, ComputedVerticesMaker::MorphList::_tmorphs, ComputedVerticesMakerEntityMap< TexCoordf, EggMorphTexCoordList >::add_value(), EggMorphList< EggMorphTexCoord >::begin(), EggMorphList< EggMorphTexCoord >::end(), Namable::get_name(), EggMorph< Parameter >::get_offset(), LCAST, and TexCoordf. |
|
Adds a texcoord value to the array (texture coordinates are unrelated to the current transform space), and returns its index number within the array.
Definition at line 291 of file computedVerticesMaker.cxx. References _morphs. |
|
Adds a vertex value to the currently-defined transform space, and returns its index number within the array.
Definition at line 196 of file computedVerticesMaker.cxx. |
|
Adds the joints the vertex belongs to, along with their respective memberships, to the current transform space definition.
Definition at line 113 of file computedVerticesMaker.cxx. References NULL. |
|
Should be called before beginning the definition for a new transform space.
Definition at line 61 of file computedVerticesMaker.cxx. References _current_jw, _current_vc, and NULL. |
|
After all spaces have been defined and all vertices added, creates a new ComputedVertices object and returns it.
Definition at line 373 of file computedVerticesMaker.cxx. References _colors, _morphs, _norms, and _texcoords. |
|
Completes the definition of a transform space as a set of joints and memberships. From this point until the next call to begin_new_space(), vertices may be added to the transform space via calls to add_vertex(), add_normal(), etc. Definition at line 170 of file computedVerticesMaker.cxx. References _current_vc, _morphs, LCAST, and Vertexf. |
|
Definition at line 509 of file computedVerticesMaker.cxx. |
|
Definition at line 175 of file computedVerticesMaker.h. |
|
Definition at line 131 of file computedVerticesMaker.h. |
|
Definition at line 135 of file computedVerticesMaker.h. |
|
Definition at line 110 of file computedVerticesMaker.h. Referenced by make_computed_vertices(). |
|
Definition at line 108 of file computedVerticesMaker.h. |
|
Definition at line 168 of file computedVerticesMaker.h. Referenced by add_joint(), and begin_new_space(). |
|
Definition at line 169 of file computedVerticesMaker.h. Referenced by begin_new_space(), and mark_space(). |
|
Definition at line 127 of file computedVerticesMaker.h. Referenced by add_normal(), add_texcoord(), make_computed_vertices(), and mark_space(). |
|
Definition at line 109 of file computedVerticesMaker.h. Referenced by make_computed_vertices(). |
|
Definition at line 111 of file computedVerticesMaker.h. Referenced by add_normal(), and make_computed_vertices(). |
|
Definition at line 132 of file computedVerticesMaker.h. Referenced by add_normal(). |
|
Definition at line 134 of file computedVerticesMaker.h. Referenced by add_normal(). |
|
Definition at line 160 of file computedVerticesMaker.h. |