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

Class com.oroinc.math.geometry.Frame

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

public class Frame
extends Object
A class representing a coordinate frame of reference with an origin and set of basis vectors. The class isn't named GeometricFrame, ReferenceFrame, CoordinateFrame, or something other than Frame because we feel this class will typically not be used at the same time as the java.awt package and java.awt.Frame are used.

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

Author:
Daniel F. Savarese

Constructor Index

 o Frame(int)
Creates a reference Frame of a given dimension.

Method Index

 o commit()
Called to commit the changes made by previous calls to setOrigin() and setBasisVector().
 o convertFromStandardFrame(GeometricVector)
Converts a vector from the standard reference frame to the reference frame defined by the Frame.
 o convertFromStandardFrame(Point)
Converts a point from the standard reference frame to the reference frame defined by the Frame.
 o convertPointFromStandardFrame(Point)
Converts a point from the the standard reference frame to the reference frame defined by the Frame.
 o convertPointToStandardFrame(Point)
Converts a point from the reference frame defined by the Frame to the standard reference frame.
 o convertToStandardFrame(GeometricVector)
Converts a vector from the reference frame defined by the Frame to the standard reference frame.
 o convertToStandardFrame(Point)
Converts a point from the reference frame defined by the Frame to the standard reference frame.
 o convertVectorFromStandardFrame(GeometricVector)
Converts a vector from the the standard reference frame to the reference frame defined by the Frame.
 o convertVectorToStandardFrame(GeometricVector)
Converts a vector from the reference frame defined by the Frame to the standard reference frame.
 o setBasisVector(int, GeometricVector)
Sets the basis vector for a particular dimension of the frame.
 o setOrigin(Point)
Sets the origin of the reference frame.

Constructors

 o Frame
  public Frame(int dimension)
Creates a reference Frame of a given dimension. Only dimensions 1 to 3 are permitted. The origin of the created frame is a point whose coordinates are all 0. The basis vectors of the created Frame compose the identity matrix.

Parameters:
dimension - The dimension of the reference frame.

Methods

 o setOrigin
  public void setOrigin(Point origin)
Sets the origin of the reference frame.

Parameters:
origin - A Point to use as the origin of the reference frame.
 o setBasisVector
  public void setBasisVector(int dimension,
                             GeometricVector vector)
Sets the basis vector for a particular dimension of the frame.

Parameters:
dimension - The dimension of the basis vector to set (1 through 3).
vector - The new basis vector for the dimension.
 o commit
  public void commit()
Called to commit the changes made by previous calls to setOrigin() and setBasisVector(). This is necessary to create the matrices that convert between the Frame and the standard reference frame.
 o convertToStandardFrame
  public void convertToStandardFrame(Point point)
Converts a point from the reference frame defined by the Frame to the standard reference frame.

Parameters:
point - The point to convert.
 o convertToStandardFrame
  public void convertToStandardFrame(GeometricVector vector)
Converts a vector from the reference frame defined by the Frame to the standard reference frame.

Parameters:
vector - The vector to convert.
 o convertFromStandardFrame
  public void convertFromStandardFrame(Point point)
Converts a point from the standard reference frame to the reference frame defined by the Frame.

Parameters:
point - The point to convert.
 o convertFromStandardFrame
  public void convertFromStandardFrame(GeometricVector vector)
Converts a vector from the standard reference frame to the reference frame defined by the Frame.

Parameters:
vector - The vector to convert.
 o convertPointToStandardFrame
  public Point convertPointToStandardFrame(Point point)
Converts a point from the reference frame defined by the Frame to the standard reference frame. Instead of returning the new point by altering the parameter, the method returns the new converted point and leaves the parameter unchanged.

Parameters:
point - The point to convert.
Returns:
The converted point.
 o convertPointFromStandardFrame
  public Point convertPointFromStandardFrame(Point point)
Converts a point from the the standard reference frame to the reference frame defined by the Frame. Instead of returning the new point by altering the parameter, the method returns the new converted point and leaves the parameter unchanged.

Parameters:
point - The point to convert.
Returns:
The converted point.
 o convertVectorToStandardFrame
  public GeometricVector convertVectorToStandardFrame(GeometricVector vector)
Converts a vector from the reference frame defined by the Frame to the standard reference frame. Instead of returning the new vector by altering the parameter, the method returns the new converted vector and leaves the parameter unchanged.

Parameters:
vector - The vector to convert.
Returns:
The converted vector.
 o convertVectorFromStandardFrame
  public GeometricVector convertVectorFromStandardFrame(GeometricVector vector)
Converts a vector from the the standard reference frame to the reference frame defined by the Frame. Instead of returning the new vector by altering the parameter, the method returns the new converted vector and leaves the parameter unchanged.

Parameters:
vector - The vector to convert.
Returns:
The converted vector.

All Packages  Class Hierarchy  This Package  Previous  Next  Index