Next: General Transforms Up: Transforms Previous: Transforms

Linear Transforms

The linear transform functions all deal with objects whose type is Transform.


#define   Transform_elem( transform, i, j )

Is used to set or retrieve the value of the i'th row and j'th column of the transform, where .


public  void  make_identity_transform(
    Transform   *transform )

Creates a four by four identity transform.


public  void  transform_point(
    Transform  *transform,
    Real       x,
    Real       y,
    Real       z,
    Real       *x_trans,
    Real       *y_trans,
    Real       *z_trans )

Transforms a three dimensional point by the given transform, passing back the three transformed coordinates.


public  void  transform_vector(
    Transform  *transform,
    Real       x,
    Real       y,
    Real       z,
    Real       *x_trans,
    Real       *y_trans,
    Real       *z_trans )

Transforms a three dimensional vector by the given transform, passing back the three transformed coordinates. The only difference between transforming a point and a vector is that transforming a vector does not involve the translational component of the transform.


public  void  inverse_transform_point(
    Transform  *transform,
    Real       x,
    Real       y,
    Real       z,
    Real       *x_trans,
    Real       *y_trans,
    Real       *z_trans )

Assuming the transform is an orthogonal transform (no shear components), the point is transformed by the inverse of the transform.


public  void  inverse_transform_vector(
    Transform  *transform,
    Real       x,
    Real       y,
    Real       z,
    Real       *x_trans,
    Real       *y_trans,
    Real       *z_trans )

Assuming the transform is an orthogonal transform (no shear components), the vector is transformed by the inverse of the transform.


public  void   concat_transforms(
    Transform   *result,
    Transform   *t1,
    Transform   *t2 )

Multiplies the transform t2 by the transform t1, storing the product in result. Transforming a point by result is equivalent to transforming the point by t1, then transforming the result by t2.



Next: General Transforms Up: Transforms Previous: Transforms


david@pet.mni.mcgill.ca
Fri Feb 17 15:37:42 EST 1995