#include <sglTransform.hpp>
Inheritance diagram for sglTransform::
Public Methods | |
sglTransform () | |
virtual | ~sglTransform () |
void | loadIdentity () |
void | setTranslation (T x, T y, T z) |
void | setRotation (T angle, T x, T y, T z) |
void | setRotation (T h, T p, T r) |
void | setMatrix (const sglMat4< T > &m) |
const sglMat4<T>& | getMatrix () const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectf &isector) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectd &isector) const |
virtual void | pick (sglPickf &pick_state, unsigned int cull_flags) const |
virtual void | pick (sglPickd &pick_state, unsigned int cull_flags) const |
virtual void | computeTxToParent (sglMat4f &curr_mat) const |
virtual void | computeTxToParent (sglMat4d &curr_mat) const |
virtual sglNode* | clone (unsigned int mode) const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods | |
virtual void | computeBound () |
virtual void | cull (sglCull< float > &trav_state, unsigned int cull_flags) const |
virtual void | cull (sglCull< double > &trav_state, unsigned int cull_flags) const |
void | checkForIdentity () |
void | checkForDeformation () |
void | copyTo (sglTransform *dst, unsigned int mode) const |
Protected Attributes | |
sglMat4<T> | m_matrix |
sglMat4<T> | m_inv_mat |
bool | m_is_ident |
bool | m_rescale |
bool | m_normalize |
Note that the sglTransform class is a templated class which can allow this to be instantiated with either single or double precision. Two typedefs, sglTransformf and sglTransformd, are added for convenience. The behaviour when using other templated types is undefined.
Example:
sglTransformf *dcs_node = new sglTransformf; // or new sglTransform<float>; dcs_node->setTranslation(0.0f, 0.0f, 25.0f); dcs_node->setRotation(M_PI, 1.0f, 0.0f, 0.0f);
Definition at line 67 of file sglTransform.hpp.
|
default constructor - creates an identity transform.
Definition at line 71 of file sglTransform.hpp. |
|
virtual destructor.
Definition at line 73 of file sglTransform.hpp. |
|
Reset this node to an identity transform.
Referenced by sglTransform(). |
|
Set the translation part of the transform (affects the 4th row of the matrix only).
|
|
Set the rotation portion of the transform (affects the upper left 3x3 portion of the matrix only) by specifying and angle and axis. The axis does not have to be normalized.
|
|
Set the rotation portion of the transform (affects the upper left 3x3 portion of the matrix only) by specifying euler angles.
|
|
Set the transform matrix directly. There is currently no error checking to see if non-supported matrix types are set here. It should be non-singular though.
|
|
Get the current transform matrix.
Definition at line 115 of file sglTransform.hpp. |
|
The single precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The double precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The single precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
The double precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
Compute a single precision transform to parent and append (via multiplication) the matrix passed in. This is part of an upward traversal, which most commonly begins with an sglViewPlatform and used for computing the position and orientation of said platform. This is the default implementation for all nodes that do not affect this matrix and therefore this function does nothing.
Reimplemented from sglNode. |
|
Compute a double precision transform to parent and append (via multiplication) the matrix passed in. This is part of an upward traversal, which most commonly begins with an sglViewPlatform and used for computing the position and orientation of said platform. This is the default implementation for all nodes that do not affect this matrix and therefore this function does nothing.
Reimplemented from sglNode. |
|
Make a copy of the scenegraph rooted at this node.
Reimplemented from sglGroup. Reimplemented in sglSphericalTransform. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglGroup. Reimplemented in sglSphericalTransform. |
|
The single precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |
|
The double precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |