#include <geomTransformer.h>
Public Member Functions | |
GeomTransformer () | |
~GeomTransformer () | |
bool | transform_vertices (Geom *geom, const LMatrix4f &mat) |
Transforms the vertices and the normals in the indicated Geom by the indicated matrix. | |
bool | transform_vertices (GeomNode *node, const LMatrix4f &mat) |
Transforms the vertices and the normals in all of the Geoms within the indicated GeomNode by the indicated matrix. | |
bool | transform_texcoords (Geom *geom, const LMatrix4f &mat) |
Transforms the texture coordinates in the indicated Geom by the indicated matrix. | |
bool | transform_texcoords (GeomNode *node, const LMatrix4f &mat) |
Transforms the texture coordinates in all of the Geoms within the indicated GeomNode by the indicated matrix. | |
bool | set_color (Geom *geom, const Colorf &color) |
Overrides the color indicated within the Geom with the given replacement color. | |
bool | set_color (GeomNode *node, const Colorf &color) |
Overrides the color indicated within the GeomNode with the given replacement color. | |
bool | transform_colors (Geom *geom, const LVecBase4f &scale) |
Transforms the colors in the indicated Geom by the indicated scale. | |
bool | transform_colors (GeomNode *node, const LVecBase4f &scale) |
Transforms the colors in all of the Geoms within the indicated GeomNode by the indicated scale. | |
bool | apply_state (GeomNode *node, const RenderState *state) |
Applies the indicated render state to all the of Geoms. | |
Private Types | |
typedef pmap< SourceVertices, PTA_Vertexf > | Vertices |
typedef pmap< SourceNormals, PTA_Normalf > | Normals |
typedef pmap< SourceTexCoords, PTA_TexCoordf > | TexCoords |
typedef pmap< Colorf, PTA_Colorf > | FColors |
typedef pmap< SourceColors, PTA_Colorf > | TColors |
Private Attributes | |
Vertices | _vertices |
Normals | _normals |
TexCoords | _texcoords |
FColors | _fcolors |
TColors | _tcolors |
If you create a single GeomTransformer and use it to transform a number of different Geoms by various transformations, then those Geoms which happen to share the same arrays and are transformed by the same amounts will still share the same arrays as each other (but different from the original arrays).
Definition at line 63 of file geomTransformer.h.
|
Definition at line 117 of file geomTransformer.h. |
|
Definition at line 100 of file geomTransformer.h. |
|
Definition at line 127 of file geomTransformer.h. |
|
Definition at line 110 of file geomTransformer.h. |
|
Definition at line 90 of file geomTransformer.h. |
|
Definition at line 34 of file geomTransformer.cxx. |
|
Definition at line 45 of file geomTransformer.cxx. References PointerToArray< Vertexf >::empty(), Geom::get_coords(), nassertr, and NULL. |
|
Applies the indicated render state to all the of Geoms. Returns true if the GeomNode was changed, false otherwise. Definition at line 427 of file geomTransformer.cxx. |
|
Overrides the color indicated within the GeomNode with the given replacement color. Returns true if any Geom in the GeomNode was changed, false otherwise. Definition at line 304 of file geomTransformer.cxx. References Colorf. |
|
Overrides the color indicated within the Geom with the given replacement color. Returns true if the Geom was changed, false otherwise. Definition at line 272 of file geomTransformer.cxx. Referenced by GeomNode::~GeomNode(). |
|
Transforms the colors in all of the Geoms within the indicated GeomNode by the indicated scale. Does not destructively change Geoms; instead, a copy will be made of each Geom to be changed, in case multiple GeomNodes reference the same Geom. Returns true if the GeomNode was changed, false otherwise. Definition at line 396 of file geomTransformer.cxx. |
|
Transforms the colors in the indicated Geom by the indicated scale. Returns true if the Geom was changed, false otherwise. Definition at line 334 of file geomTransformer.cxx. References GeomNode::_cycler, GeomNode::GeomEntry::_geom, and PT. |
|
Transforms the texture coordinates in all of the Geoms within the indicated GeomNode by the indicated matrix. Does not destructively change Geoms; instead, a copy will be made of each Geom to be changed, in case multiple GeomNodes reference the same Geom. Returns true if the GeomNode was changed, false otherwise. Definition at line 241 of file geomTransformer.cxx. |
|
Transforms the texture coordinates in the indicated Geom by the indicated matrix. Returns true if the Geom was changed, false otherwise. Definition at line 179 of file geomTransformer.cxx. |
|
Transforms the vertices and the normals in all of the Geoms within the indicated GeomNode by the indicated matrix. Does not destructively change Geoms; instead, a copy will be made of each Geom to be changed, in case multiple GeomNodes reference the same Geom. Returns true if the GeomNode was changed, false otherwise. Definition at line 148 of file geomTransformer.cxx. References GeomTransformer::SourceTexCoords::_mat, _texcoords, GeomTransformer::SourceTexCoords::_texcoords, PointerToArray< TexCoordf >::begin(), PointerToArray< TexCoordf >::end(), G_OFF, GeomBindType, Geom::get_texcoords(), PointerToBase< RefCountObj< pvector< TexCoordf > > >::is_null(), nassertr, NULL, PointerToArray< TexCoordf >::reserve(), PointerToArray< TexCoordf >::size(), and TexCoordf. |
|
Transforms the vertices and the normals in the indicated Geom by the indicated matrix. Returns true if the Geom was changed, false otherwise. Definition at line 61 of file geomTransformer.cxx. References _vertices, PointerToArray< Vertexf >::begin(), PointerToArray< Vertexf >::end(), nassertr, PointerToArray< Vertexf >::push_back(), PointerToArray< Vertexf >::reserve(), and PointerToArray< Vertexf >::size(). Referenced by GeomNode::apply_attribs_to_vertices(), and GeomNode::~GeomNode(). |
|
Definition at line 118 of file geomTransformer.h. |
|
Definition at line 101 of file geomTransformer.h. |
|
Definition at line 128 of file geomTransformer.h. |
|
Definition at line 111 of file geomTransformer.h. Referenced by transform_vertices(). |
|
Definition at line 91 of file geomTransformer.h. Referenced by transform_vertices(). |