Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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() |
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-coordinatespublic 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 valuepublic final boolean contains(float x, float y, float z)
x
- x-axis coordinate valuey
- y-axis coordinate valuez
- z-axis coordinate valuepublic final boolean intersects(float x, float y, float w, float h)
x
- lower left x-coordy
- lower left y-coordw
- widthh
- hightpublic 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()
Copyright 2010 JogAmp Community.