Class ViewPlane

java.lang.Object
  |
  +--CoorSys
        |
        +--ViewPlane

public class ViewPlane
extends CoorSys


Field Summary
protected  Vector3D VPN
           
protected  Point3D VRP
          the View Reference Point of the view plane.
 Vector3D VUP
           
 
Fields inherited from class CoorSys
children, forwardMatrix, name, parent, REAL_WORLD, reverseMatrix
 
Constructor Summary
ViewPlane(Point3D VRP, Vector3D VUP, Vector3D VPN)
          Constructs the viewplane.
 
Method Summary
protected  void calculateVectors(Point3D VRP, Vector3D VUP, Vector3D VPN)
          Calculate the n,u,v vectors and create world-to-viewing coordinate transformation matrix.
 Vector3D getVPN()
          Returns the view-point normal of the view plane.
 Point3D getVRP()
          Returns the view reference point of the viewplane.
 void rotateX(double degs)
          Rotates the viewplane by it's X axis.
 void rotateY(double degs)
          Rotates the viewplane by it's Y axis.
 void rotateZ(double degs)
          Rotates the viewplane by it's Z axis.
 void translate(double dx, double dy, double dz)
          Translates the viewplane.
 
Methods inherited from class CoorSys
attachChild, children, clone, fromRealWorld, fromRealWorld, getAllowsChildren, getChildAt, getChildCount, getForwardMatrix, getIndex, getName, getParent, getReverseMatrix, isLeaf, setForwardMatrix, setReverseMatrix, toRealWorld, toRealWorld, toString
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

VRP

protected Point3D VRP
the View Reference Point of the view plane.

VUP

public Vector3D VUP

VPN

protected Vector3D VPN
Constructor Detail

ViewPlane

public ViewPlane(Point3D VRP,
                 Vector3D VUP,
                 Vector3D VPN)
Constructs the viewplane. The parameter objects passed are assumed to be owned by this object, thus must not be changed afterwards.
Parameters:
VRP - the view reference point.
VUP - the view-up vector.
VPN - the view-plane normal.
Method Detail

translate

public void translate(double dx,
                      double dy,
                      double dz)
Translates the viewplane.
Parameters:
dx - x-delta.
dy - y-delta.
dz - z-delta.

rotateX

public void rotateX(double degs)
Rotates the viewplane by it's X axis.
Parameters:
degs - the rotation angle, in degrees.

rotateY

public void rotateY(double degs)
Rotates the viewplane by it's Y axis.
Parameters:
degs - the rotation angle, in degrees.

rotateZ

public void rotateZ(double degs)
Rotates the viewplane by it's Z axis.
Parameters:
degs - the rotation angle, in degrees.

calculateVectors

protected void calculateVectors(Point3D VRP,
                                Vector3D VUP,
                                Vector3D VPN)
Calculate the n,u,v vectors and create world-to-viewing coordinate transformation matrix.

getVRP

public Point3D getVRP()
Returns the view reference point of the viewplane.

getVPN

public Vector3D getVPN()
Returns the view-point normal of the view plane.