|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opengl.math.geom.AABBox
public class AABBox
Axis Aligned Bounding Box. Defined by two 3D coordinates (low and high) The low being the the lower left corner of the box, and the high being the upper right corner of the box.
Constructor Summary | |
---|---|
AABBox()
Create a Axis Aligned bounding box (AABBox) where the low and and high MAX float Values. |
|
AABBox(float[] low,
float[] high)
Create a AABBox defining the low and high |
|
AABBox(float lx,
float ly,
float lz,
float hx,
float hy,
float hz)
Create an AABBox specifying the coordinates of the low and high |
Method Summary | |
---|---|
AABBox |
clone()
|
boolean |
contains(float x,
float y)
Check if the x & y coordinates are bounded/contained by this AABBox |
boolean |
contains(float x,
float y,
float z)
Check if the xyz coordinates are bounded/contained by this AABBox. |
boolean |
equals(Object obj)
|
float[] |
getCenter()
Get the Center of the AABBox |
float |
getDepth()
|
float |
getHeight()
|
float[] |
getHigh()
Get the max xyz-coordinates |
float[] |
getLow()
Get the min xyz-coordinates |
float |
getMaxX()
|
float |
getMaxY()
|
float |
getMaxZ()
|
float |
getMinX()
|
float |
getMinY()
|
float |
getMinZ()
|
float |
getSize()
Get the size of the Box where the size is represented by the length of the vector between low and high. |
float |
getWidth()
|
boolean |
intersects(float x,
float y,
float w,
float h)
Check if there is a common region between this AABBox and the passed 2D region irrespective of z range |
void |
reset()
resets this box to the inverse low/high, allowing the next resize(float, float, float) command to hit. |
void |
resize(AABBox newBox)
Resize the AABBox to encapsulate another AABox |
void |
resize(float[] xyz,
int offset)
Resize the AABBox to encapsulate the passed xyz-coordinates. |
void |
resize(float x,
float y,
float z)
Resize the AABBox to encapsulate the passed xyz-coordinates. |
void |
scale(float size)
Scale the AABBox by a constant |
void |
setSize(float lx,
float ly,
float lz,
float hx,
float hy,
float hz)
Set size of the AABBox specifying the coordinates of the low and high. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AABBox()
public AABBox(float lx, float ly, float lz, float hx, float hy, float hz)
lx
- min x-coordinately
- min y-coordnatelz
- min z-coordinatehx
- max x-coordinatehy
- max y-coordinatehz
- max z-coordinatepublic AABBox(float[] low, float[] high)
low
- min xyz-coordinateshigh
- max xyz-coordinatesMethod Detail |
---|
public final void reset()
resize(float, float, float)
command to hit.
public final float[] getHigh()
public final float[] getLow()
public final void setSize(float lx, float ly, float lz, float hx, float hy, float hz)
lx
- min x-coordinately
- min y-coordnatelz
- min z-coordinatehx
- max x-coordinatehy
- max y-coordinatehz
- max z-coordinatepublic final void resize(AABBox newBox)
newBox
- AABBox to be encapsulated inpublic final void resize(float x, float y, float z)
x
- x-axis coordinate valuey
- y-axis coordinate valuez
- z-axis coordinate valuepublic final void resize(float[] xyz, int offset)
xyz
- xyz-axis coordinate valuesoffset
- of the arraypublic final boolean contains(float x, float y)
x
- x-axis coordinate valuey
- y-axis coordinate value
public final boolean contains(float x, float y, float z)
x
- x-axis coordinate valuey
- y-axis coordinate valuez
- z-axis coordinate value
public final boolean intersects(float x, float y, float w, float h)
x
- lower left x-coordy
- lower left y-coordw
- widthh
- hight
public final float getSize()
public final float[] getCenter()
public final void scale(float size)
size
- a constant float valuepublic final float getMinX()
public final float getMinY()
public final float getMinZ()
public final float getMaxX()
public final float getMaxY()
public final float getMaxZ()
public final float getWidth()
public final float getHeight()
public final float getDepth()
public final AABBox clone()
clone
in class Object
public final boolean equals(Object obj)
equals
in class Object
public final String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |