jme.math
Class Rectangle

java.lang.Object
  extended byjme.math.Rectangle

public class Rectangle
extends java.lang.Object

Rectangle defines a finite plane with an origin point and two edge directions that defines it's extents.

Version:
$Id: Rectangle.java,v 1.2 2003/08/27 21:22:36 mojomonkey Exp $
Author:
Mark Powell

Constructor Summary
Rectangle()
          Constructor instantiates a new Rectangle object.
Rectangle(Vector origin, Vector firstEdge, Vector secondEdge)
          Constructor instantiates a new Rectangle object.
 
Method Summary
 Vector getFirstEdge()
          getFirstEdge returns the first extent vector.
 Vector getOrigin()
          getOrigin returns the origin point of the rectangle.
 Vector getSecondEdge()
          getSecondEdge returns the second extent vector.
 void setFirstEdge(Vector firstEdge)
          setFirstEdge sets the first extent vector.
 void setOrigin(Vector origin)
          setOrigin sets the origin point of the rectangle.
 void setSecondEdge(Vector secondEdge)
          setSecondEdge sets the second edge vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle()
Constructor instantiates a new Rectangle object. All values origin, firstEdge and secondEdge are (0, 0, 0).


Rectangle

public Rectangle(Vector origin,
                 Vector firstEdge,
                 Vector secondEdge)
Constructor instantiates a new Rectangle object. The attributes of the rectangle are defined during construction.

Parameters:
origin - the point defining the least point of the rectange.
firstEdge - the first extent.
secondEdge - the second extent.
Method Detail

getFirstEdge

public Vector getFirstEdge()
getFirstEdge returns the first extent vector.

Returns:
the first vector edge.

setFirstEdge

public void setFirstEdge(Vector firstEdge)
setFirstEdge sets the first extent vector.

Parameters:
firstEdge - the new first vector edge.

getOrigin

public Vector getOrigin()
getOrigin returns the origin point of the rectangle.

Returns:
the origin of the rectangle.

setOrigin

public void setOrigin(Vector origin)
setOrigin sets the origin point of the rectangle.

Parameters:
origin - the new origin of the rectangle.

getSecondEdge

public Vector getSecondEdge()
getSecondEdge returns the second extent vector.

Returns:
the second edge vector.

setSecondEdge

public void setSecondEdge(Vector secondEdge)
setSecondEdge sets the second edge vector.

Parameters:
secondEdge - the new second edge vector.