LOOS
v2.3.2

Matrix class for handling coordinate transforms... More...
#include <XForm.hpp>
Public Member Functions  
XForm (const GMatrix &m)  
Initialize an XForm with an existing matrix.  
XForm (const XForm &x)  
void  push (void) 
Push the current matrix onto the stack.  
void  pop (void) 
Pop the top matrix off the stack.  
void  load (const GMatrix &) 
Load a matrix onto the current transform.  
void  concat (const GMatrix &) 
Concatenate (postmultiply) a matrix with the current transform.  
void  premult (const GMatrix &) 
Premultiply the current transform.  
void  identity (void) 
Set the current transform to the identity.  
bool  unset (void) const 
void  translate (const greal, const greal, const greal) 
Translation matrix.  
void  translate (const GCoord &) 
Translation specified by a GCoord()  
void  scale (const greal, const greal, const greal) 
Scaling.  
void  scale (const GCoord &) 
Scaling.  
void  rotate (const GCoord &, const greal) 
void  rotate (const char, const greal) 
GCoord  transform (const GCoord &) 
Transform a GCoord() with the current transformation.  
GMatrix  current (void) const 
Get the current trasnformation.  
Matrix class for handling coordinate transforms...
This is based on the OpenGL/RenderMan model of handling geometric transforms. Coords are expected to be homegenous and the transformation matrix is 4x4. Rotations are all lefthanded.
The transform mantains a stack of transformation matrices that you can push and pop as necessary. You can also load the current transformation with an arbitrary matrix.
Transformations are concatenated by postmultiplication. This means the last declared transformation is the first one applied to an atom's coordinates... Imagine you've defined a set of transformations in your code:
* * rotate > M_r * translate > M_t * scale > M_s *
These are postmultiplied together to create the composite transformation matrix:
* M = M_r * M_t * M_s *
Now, when you transform your coordinate vector, it's just the matrixvector multiplication:
* v' = Mv = M_r * M_t * M_s * v *
So from the perspective of the atom's coordinate frame, we're scaled, then translated, then rotated into the global coordinates...
void loos::XForm::rotate  (  const GCoord &  ov, 
const greal  angle  
) 
void loos::XForm::rotate  (  const char  axis, 
const greal  angle  
) 