|
Open PaperOpt
|
#include <Transform.h>
Public Member Functions | |
| Transform (void) | |
| ~Transform (void) | |
| void | reset (void) |
| void | AddChangeOfBasis (const V3< double > &x, const V3< double > &y) |
| void | AddChangeOfBasis (const V3< double > &x, const V3< double > &y, const V3< double > &z) |
| void | AddScaling (double x, double y, double z) |
| void | AddRotationX (double ang) |
| const V3< double > | ApplyTransform (const V3< double > &v) const |
| const V3< double > | ApplyInvTransform (const V3< double > &v) const |
Class used to perform vector space transforms.
Performs coordinate transforms. Makes code more readable. =)
#include "transform.h"
| Transform::Transform | ( | void | ) |
Default constructor.

| Transform::~Transform | ( | void | ) | [inline] |
Destructor.
Adds a change of basis to transform.
Takes two orthonormal vectors as parameters and forms an orthonormal basis. No checks are done.
| x | First vector in new basis. |
| y | Second vector in new basis. |


| void Transform::AddChangeOfBasis | ( | const V3< double > & | x, |
| const V3< double > & | y, | ||
| const V3< double > & | z | ||
| ) |
Adds a change of basis to transform.
Takes three orthonormal vectors as parameters and adds this basis to transform. No checks are done.
| x | First vector in new basis. |
| y | Second vector in new basis. |
| z | Third vector in new basis. |

| void Transform::AddRotationX | ( | double | ang | ) |
Adds a rotation about the x axix to transform.
| ang | Angle in radians for rotation. |


| void Transform::AddScaling | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Adds a scaling to transform.
Takes three scaling parameters.
| x | Scale factor for x axis. |
| y | Scale factor for y axis. |
| z | Scale factor for z axis. |


Performs the inverse transform on a vector.
NB: This only works if the transform is orthonormal.
| v | Input vector. |
return V3 Transformed vector.

Performs the transform on a vector.
| v | Input vector. |
return V3 Transformed vector.

| void Transform::reset | ( | void | ) |
Resets the transform.

