pgl
PrimitiveOpenGL3Dprimitivelibrary
Public Member Functions | Public Attributes | Friends | List of all members
pgl::Transform Class Reference

Homogeneous coordinate transform. More...

#include <math.h>

Inheritance diagram for pgl::Transform:
Inheritance graph
[legend]

Public Member Functions

 Transform (double _data[16])
 
 Transform (const Vector3 &rotation, const Vector3 &translation)
 Specifies transform through intrinsict roll-pitch-yaw and translation.
 
 Transform (const Vector3 &axis, const double &angle, const Vector3 &translation)
 Specifies transform through axis-angle and translation.
 
void set (double _data[16])
 
void set (const Vector3 &axis, const double &angle, const Vector3 &translation)
 
void set (const Vector3 &rotation, const Vector3 &translation)
 
double & operator[] (const unsigned int idx)
 
double operator[] (const unsigned int idx) const
 
Transform operator* (const Transform &rhs) const
 
Vector3 operator* (const Vector3 &rhs) const
 

Public Attributes

union {
   double   data [16]
 
   struct {
      double   __dummy [12]
 
      double   x
 
      double   y
 
      double   z
 
      double   __dummy2
 
   } 
 
}; 
 

Friends

std::ostream & operator<< (std::ostream &os, const Transform &obj)
 

Detailed Description

Homogeneous coordinate transform.

Column-major storage order. The translation can be addressed through either

transform.x

or

transform[12]
Note
Since we're working with 3-component vectors, a matrix-vector product will not apply the last row of the matrix. It is, however, stored for potential other uses.

The documentation for this class was generated from the following file: