Represents a transform that may be applied to a particular instance of a tree when added to the SpeedTreeNode. More...
#include "stTransform.h"
Public Member Functions | |
| STTransform () | |
| The default constructor creates an identity transform. More... | |
| STTransform (const TransformState *trans) | |
| This constructor accepts a Panda TransformState, for instance as extracted from the scene graph. More... | |
| STTransform (const LPoint3 &pos, PN_stdfloat rotate=0.0f, PN_stdfloat scale=1.0f) | |
| Construct a transform with componentwise inputs. More... | |
| STTransform (PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat rotate, PN_stdfloat scale) | |
| Construct a transform with componentwise inputs. More... | |
| STTransform (const STTransform ©) | |
| STTransform (const SpeedTree::CInstance &instance) | |
| This is used internally to construct an STTransform from a SpeedTree::CInstance object. More... | |
| 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 SpeedTreeNode. More... | |
| const LPoint3 & | get_pos () const |
| Returns the translation component. More... | |
| PN_stdfloat | get_rotate () const |
| Returns the rotation component, in degrees counter-clockwise around the vertical axis. More... | |
| PN_stdfloat | get_scale () const |
| Returns the scale component, as a uniform scale value. More... | |
| STTransform | operator * (const STTransform &other) const |
| Composes these transforms and returns the result. More... | |
| void | operator *= (const STTransform &other) |
| Composes these transforms and stores the result in-place. More... | |
| operator SpeedTree::CInstance () const | |
| This is used internally to convert an STTransform into a SpeedTree::CInstance object. More... | |
| void | operator= (const STTransform ©) |
| void | output (std::ostream &out) const |
| void | set_pos (const LPoint3 &pos) |
| Replaces the translation component. More... | |
| void | set_rotate (PN_stdfloat rotate) |
| Replaces the rotation component. More... | |
| void | set_scale (PN_stdfloat scale) |
| Replaces the scale component. More... | |
| operator CPT() | TransformState () const |
| void | write_datagram (BamWriter *manager, Datagram &dg) |
| Writes the contents of this object to the datagram for shipping out to a Bam file. More... | |
Static Public Member Functions | |
| static const STTransform & | ident_mat () |
| Returns a global identity transform object. More... | |
Public Attributes | |
| LPoint3 | _pos |
| PN_stdfloat | _rotate |
| PN_stdfloat | _scale |
Static Public Attributes | |
| static STTransform | _ident_mat |
Represents a transform that may be applied to a particular instance of a tree when added to the SpeedTreeNode.
Definition at line 26 of file stTransform.h.
|
inline |
The default constructor creates an identity transform.
Definition at line 18 of file stTransform.I.
| STTransform::STTransform | ( | const TransformState * | trans | ) |
This constructor accepts a Panda TransformState, for instance as extracted from the scene graph.
Definition at line 23 of file stTransform.cxx.
|
inline |
Construct a transform with componentwise inputs.
Definition at line 29 of file stTransform.I.
|
inline |
Construct a transform with componentwise inputs.
Definition at line 40 of file stTransform.I.
|
inline |
This is used internally to construct an STTransform from a SpeedTree::CInstance object.
Definition at line 73 of file stTransform.I.
| void STTransform::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 SpeedTreeNode.
Definition at line 67 of file stTransform.cxx.
References DatagramIterator::get_stdfloat().
|
inline |
Returns the translation component.
Definition at line 124 of file stTransform.I.
|
inline |
Returns the rotation component, in degrees counter-clockwise around the vertical axis.
Definition at line 142 of file stTransform.I.
|
inline |
Returns the scale component, as a uniform scale value.
Definition at line 158 of file stTransform.I.
|
inlinestatic |
Returns a global identity transform object.
Definition at line 108 of file stTransform.I.
|
inline |
Composes these transforms and returns the result.
Definition at line 178 of file stTransform.I.
|
inline |
Composes these transforms and stores the result in-place.
Definition at line 166 of file stTransform.I.
|
inline |
This is used internally to convert an STTransform into a SpeedTree::CInstance object.
Definition at line 85 of file stTransform.I.
|
inline |
Replaces the translation component.
Definition at line 116 of file stTransform.I.
|
inline |
Replaces the rotation component.
Accepts a rotation in degrees counter- clockwise around the vertical axis.
Definition at line 133 of file stTransform.I.
|
inline |
Replaces the scale component.
Accepts a uniform scale value.
Definition at line 150 of file stTransform.I.
Writes the contents of this object to the datagram for shipping out to a Bam file.
Definition at line 56 of file stTransform.cxx.
References Datagram::add_stdfloat().
1.8.15