Class com.oroinc.math.geometry.AffineMap
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oroinc.math.geometry.AffineMap

java.lang.Object
   |
   +----com.oroinc.math.geometry.AffineMap

public class AffineMap
extends Object
A class representing an affine map. An AffineMap performs transformations from one reference frame to another.

Copyright © 1996, 1997 Original Reusable Objects, Inc. All rights reserved.

Author:
Daniel F. Savarese

Constructor Index

 o AffineMap(Frame, Frame)
Creates an AffineMap that performs transformations from one Frame to another.
 o AffineMap(int)
Creates an AffineMap of a given dimension.

Method Index

 o compose(AffineMap)
Composes the AffineMap with another.
 o inverse()
Returns the inverse of the AffineMap.
 o invert()
Inverts the AffineMap.
 o invert(AffineMap)
Inverts the AffineMap and stores the result in the passed parameter.
 o isInvertible()
Tests whether or not the AffineMap is invertible.
 o mapTransform(AffineMap)
Transforms an AffineMap, in effect returning the composition of the two maps.
 o normalTransform(Tuple)
Transform a normal vector according to the mapping defined by the AffineMap, but preserving the normal property of the vector in the new reference frame.
 o transform(Tuple)
Transform a tuple according to the mapping defined by the AffineMap.
 o transformNormal(Tuple)
Transform a normal according to the mapping defined by the AffineMap, but preserving the normal property of the vector in the new reference frame.
 o tupleTransform(Tuple)
Transforms a tuple according to the mapping defined by the AffineMap, but instead of returning the result by altering the passed parameter, returns a new tuple containing the result.

Constructors

 o AffineMap
  public AffineMap(int dimension)
Creates an AffineMap of a given dimension. Only dimensions between 1 and 3 are permitted. The default mapping is from the standard reference frame to the standard reference frame. This is not particularly useful which is why this constructor is only meant to be used when creating an AffineMap which will be used to store the result of a call to invert(AffineMap) .

Parameters:
dimension - The dimension of the spaces mapped by the AffineMap.
 o AffineMap
  public AffineMap(Frame from,
                   Frame to)
Creates an AffineMap that performs transformations from one Frame to another.

Parameters:
from - The frame from which to transform a point or vector.
to - The frame to which a point or vector is to be transformed.

Methods

 o compose
  public void compose(AffineMap map)
Composes the AffineMap with another. The result of the composition is stored in the calling AffineMap.

Parameters:
map - The AffineMap with which to perform the composition.
 o transform
  public void transform(Tuple tuple)
Transform a tuple according to the mapping defined by the AffineMap.

Parameters:
tuple - The tuple to transform.
 o tupleTransform
  public Tuple tupleTransform(Tuple tuple)
Transforms a tuple according to the mapping defined by the AffineMap, but instead of returning the result by altering the passed parameter, returns a new tuple containing the result.

Parameters:
tuple - The tuple to transform.
Returns:
The new transformed tuple.
 o transformNormal
  public void transformNormal(Tuple tuple)
Transform a normal according to the mapping defined by the AffineMap, but preserving the normal property of the vector in the new reference frame. In other words, normal vectors are transformed to normal vectors.

Parameters:
tuple - The normal to transform.
 o normalTransform
  public Tuple normalTransform(Tuple tuple)
Transform a normal vector according to the mapping defined by the AffineMap, but preserving the normal property of the vector in the new reference frame. In other words, normal vectors are transformed to normal vectors. Instead of returning the result by altering the parameter, a new tuple containing the result is returned and the parameter is left unaltered.

Parameters:
tuple - The normal to transform.
Returns:
The new transformed normal.
 o mapTransform
  public AffineMap mapTransform(AffineMap map)
Transforms an AffineMap, in effect returning the composition of the two maps.

Parameters:
map - The AffineMap to transform (i.e., with which to perform the composition)
Returns:
A new AffineMap containing the composition of the two maps.
 o invert
  public void invert()
Inverts the AffineMap. In other words, if the mapping is from Frame A to Frame B, it is changed to be from Frame B to Frame A.
 o invert
  public void invert(AffineMap map)
Inverts the AffineMap and stores the result in the passed parameter.

Parameters:
map - The AffineMap in which to store the inverse.
 o inverse
  public AffineMap inverse()
Returns the inverse of the AffineMap.

Returns:
The inverse of the AffineMap.
 o isInvertible
  public boolean isInvertible()
Tests whether or not the AffineMap is invertible. Only invertible AffineMaps should be inverted.

Returns:
True if the map is invertible, false ifnot.

All Packages  Class Hierarchy  This Package  Previous  Next  Index