|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jreality.util.Rectangle3D
public class Rectangle3D
A Rectangle3D represents a rectangular parallelopiped in three dimensional space: a "box".
It exists primarily to provide bounding boxes for 3D geometry.
TODO: add dirty flag to avoid unnecessary recalculation of extent and center
Field Summary | |
---|---|
static Rectangle3D |
EMPTY_BOX
|
static Rectangle3D |
unitCube
|
Constructor Summary | |
---|---|
Rectangle3D()
|
|
Rectangle3D(double[][] vlist)
|
|
Rectangle3D(double w,
double h,
double d)
|
Method Summary | |
---|---|
void |
add(double d)
|
Rectangle3D |
computeFromVectorList(double[][] vlist)
Receiver configures himself as bounding box of the vertices in the list vlist. |
Rectangle2D |
convertToRectangle2D(Rectangle2D rec)
Project this box onto its first two dimensions |
void |
copyInto(Rectangle3D bb)
|
double[][] |
getBounds()
Get the two opposite corners of this box (min(x,y,z) and max(x,y,z)). |
double[][] |
getBounds(double[][] store)
|
double[] |
getCenter()
Get the center of this box. |
double[] |
getCenter(double[] store)
|
double[] |
getExtent()
Get the dimensions of the box (length, width, depth). |
double[] |
getExtent(double[] store)
|
double |
getMaxExtent()
|
double |
getMaxX()
|
double |
getMaxY()
|
double |
getMaxZ()
|
double |
getMinX()
|
double |
getMinY()
|
double |
getMinZ()
|
void |
initialize()
|
boolean |
isEmpty()
|
void |
scale(double d)
|
void |
setBounds(double[][] b)
Get the two opposite corners of this box (min(x,y,z) and max(x,y,z)). |
String |
toString()
|
Rectangle3D |
transformByMatrix(Rectangle3D target,
double[] aTransform)
Transform a bounding box by a matrix. |
Rectangle3D |
unionWith(Rectangle3D aBound,
Rectangle3D target)
Finds the union of the receiver and aBound, places result in target and returns it. |
void |
update()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Rectangle3D EMPTY_BOX
public static final Rectangle3D unitCube
Constructor Detail |
---|
public Rectangle3D()
public Rectangle3D(double w, double h, double d)
public Rectangle3D(double[][] vlist)
Method Detail |
---|
public void initialize()
public void copyInto(Rectangle3D bb)
public String toString()
toString
in class Object
public boolean isEmpty()
public void update()
public Rectangle3D transformByMatrix(Rectangle3D target, double[] aTransform)
true
, then return a new instance containing the result,
else overwrite this
.
aTransform
- copyflag
-
public Rectangle3D computeFromVectorList(double[][] vlist)
vlist
-
public Rectangle3D unionWith(Rectangle3D aBound, Rectangle3D target)
aBound
- target
-
public double[] getCenter()
public double[] getExtent()
public double getMaxExtent()
public Rectangle2D convertToRectangle2D(Rectangle2D rec)
rec
-
public double[][] getBounds()
public void setBounds(double[][] b)
public double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double getMinZ()
public double getMaxZ()
public double[] getCenter(double[] store)
public double[] getExtent(double[] store)
public double[][] getBounds(double[][] store)
store
- double[2][3]
public void scale(double d)
public void add(double d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |