|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.math3D.Rectangle3D
A Rectangle3D is a rectangle in 3D space, defined as an origin and vectors pointing in the directions of the base (width) and side (height).
Constructor Summary | |
Rectangle3D()
Creates a rectangle at the origin with a width and height of zero. |
|
Rectangle3D(Vector3D origin,
Vector3D directionU,
Vector3D directionV,
float width,
float height)
Creates a new Rectangle3D with the specified origin, direction of the base (directionU) and direction of the side (directionV). |
Method Summary | |
void |
add(Transform3D xform)
|
void |
add(Vector3D u)
|
void |
addRotation(Transform3D xform)
|
Vector3D |
getDirectionU()
Gets the direction of the base of this Rectangle3D. |
Vector3D |
getDirectionV()
Gets the direction of the side of this Rectangle3D. |
float |
getHeight()
Gets the height of this Rectangle3D. |
Vector3D |
getNormal()
Gets the normal of this Rectangle3D. |
Vector3D |
getOrigin()
Gets the origin of this Rectangle3D. |
float |
getWidth()
Gets the width of this Rectangle3D. |
void |
setHeight(float height)
Sets the height of this Rectangle3D. |
void |
setNormal(Vector3D n)
Sets the normal of this Rectangle3D. |
void |
setTo(Rectangle3D rect)
Sets the values of this Rectangle3D to the specified Rectangle3D. |
void |
setWidth(float width)
Sets the width of this Rectangle3D. |
void |
subtract(Transform3D xform)
|
void |
subtract(Vector3D u)
|
void |
subtractRotation(Transform3D xform)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Rectangle3D()
public Rectangle3D(Vector3D origin, Vector3D directionU, Vector3D directionV, float width, float height)
Method Detail |
public void setTo(Rectangle3D rect)
public Vector3D getOrigin()
public Vector3D getDirectionU()
public Vector3D getDirectionV()
public float getWidth()
public void setWidth(float width)
public float getHeight()
public void setHeight(float height)
public Vector3D getNormal()
public void setNormal(Vector3D n)
public void add(Vector3D u)
add
in interface Transformable
public void subtract(Vector3D u)
subtract
in interface Transformable
public void add(Transform3D xform)
add
in interface Transformable
public void subtract(Transform3D xform)
subtract
in interface Transformable
public void addRotation(Transform3D xform)
addRotation
in interface Transformable
public void subtractRotation(Transform3D xform)
subtractRotation
in interface Transformable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |