class mpkTransform |
The base class for representing spatial transforms.
double | R [3][3] Orientation matrix |
double | T [3] Translation vector |
mpkTransform (const SoTransform* X=0) | |
void | bind (const double* param_ptr) |
void | rescale (double scalef) |
double | get_scale () |
TYPE | get_type () |
const double* | get_axis () |
bool | update () |
void | set_product (const mpkTransform& X, const mpkTransform& Y) |
void | append (const mpkTransform& X) |
mpkTransform& | operator* (const mpkTransform& X) |
void | set_identity () |
bool | is_identity () const |
void | apply (double out[3], const double in[3]) const |
static void | apply (double out[3], const double R[3][3], const double T[3], const double in[3]) |
void | apply_inv (double out[3], const double in[3]) const |
void | print (ostream& f=cout) const |
operator SbMatrix () const |
For efficiency reasons, there is not an abstract base class plus several derived classes, one for each transform type. Instead, this single mpkTransform class includes a type flag and implements all possible transforms. The fields (R,T) store the current values of the transform. Further private fields store information required to update certain transform types, such as axis for a rotation.Since multiple transforms can depend on the same parameter(s), each parameterized transform must be bound to a set of (normalized) parameters (each in [0,1]) using bind(). Once this has been done, the function update() can read the current values of the assigned parameters to recompute R and T.
For further details see mpkTransform.H.
Alphabetic index HTML hierarchy of classes or Java