|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmali.spatial.bodies.Body
org.openmali.spatial.bodies.Box
public class Box
An Axis-Aligned Box.
| Field Summary | |
|---|---|
protected Point3f |
lower
The lower corner of this bounding box |
protected Point3f |
upper
The upper corner of this bounding box |
| Fields inherited from class org.openmali.spatial.bodies.Body |
|---|
centerX, centerY, centerZ, distComputed, maxCenterDist, maxCenterDistSquared |
| Constructor Summary | |
|---|---|
Box()
Creates a new Box |
|
Box(float lowerX,
float lowerY,
float lowerZ,
float upperX,
float upperY,
float upperZ)
Creates a new Box |
|
Box(Tuple3f lower,
Tuple3f upper)
Creates a new Box |
|
| Method Summary | ||
|---|---|---|
protected void |
calcCenter()
|
|
protected void |
combine_(float x,
float y,
float z)
|
|
protected void |
combine_(Point3f p)
|
|
void |
combine(BodyInterface body)
Combines this Body with a bounding object. |
|
void |
combine(BodyInterface[] bodies)
Combines this Body with an array of bounding objects. |
|
void |
combine(float x,
float y,
float z)
Combines this Body with a point. |
|
void |
combine(Point3f p)
Combines this Body with a point. |
|
void |
combine(Point3f[] points)
Combine this Body with an array of points. |
|
boolean |
contains(float px,
float py,
float pz)
Tests, if the given point is inside of this Body. |
|
boolean |
contains(Point3f point)
Tests, if the given point is inside of this Body. |
|
Point3f |
getLower()
|
|
void |
getLower(Tuple3f point)
|
|
float |
getLowerX()
|
|
float |
getLowerY()
|
|
float |
getLowerZ()
|
|
Tuple3f |
getSize()
Computes the x-, y-, and z-span of this Box and puts the values into out. |
|
|
getSize(T out)
Computes the x-, y-, and z-span of this Box and puts the values into out. |
|
Point3f |
getUpper()
|
|
void |
getUpper(Tuple3f point)
|
|
float |
getUpperX()
|
|
float |
getUpperY()
|
|
float |
getUpperZ()
|
|
float |
getXSpan()
|
|
float |
getYSpan()
|
|
float |
getZSpan()
|
|
protected void |
onBoundsChanged()
|
|
void |
set(float lowerX,
float lowerY,
float lowerZ,
float upperX,
float upperY,
float upperZ)
|
|
void |
set(Tuple3f lower,
Tuple3f upper)
|
|
void |
setCenter(float x,
float y,
float z)
Moves this Box to a position, where it's center is at the given location. |
|
void |
setLower(float x,
float y,
float z)
|
|
void |
setLower(Tuple3f point)
Sets the lower corner of this bounding box |
|
void |
setLowerX(float x)
Sets the x coordinate of the lower corner of this Box. |
|
void |
setLowerY(float y)
Sets the y coordinate of the lower corner of this Box. |
|
void |
setLowerZ(float z)
Sets the z coordinate of the lower corner of this Box. |
|
void |
setSize(float xSpan,
float ySpan,
float zSpan)
Resizes this Box to the given size. |
|
void |
setSize(Tuple3f span)
Resizes this Box to the given size. |
|
void |
setUpper(float x,
float y,
float z)
|
|
void |
setUpper(Tuple3f point)
Sets the upper corner of this box |
|
void |
setUpperX(float x)
Sets the x coordinate of the upper corner of this Box. |
|
void |
setUpperY(float y)
Sets the y coordinate of the upper corner of this Box. |
|
void |
setUpperZ(float z)
Sets the z coordinate of the upper corner of this Box. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class org.openmali.spatial.bodies.Body |
|---|
getCenter, getCenterX, getCenterY, getCenterZ, getMaxCenterDistance, getMaxCenterDistanceSquared, setCenter, setMaxCenterDistanceSquared |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Point3f lower
protected Point3f upper
| Constructor Detail |
|---|
public Box(float lowerX,
float lowerY,
float lowerZ,
float upperX,
float upperY,
float upperZ)
public Box(Tuple3f lower,
Tuple3f upper)
public Box()
| Method Detail |
|---|
public final boolean contains(float px,
float py,
float pz)
contains in interface BodyInterfacepublic final boolean contains(Point3f point)
contains in interface BodyInterfaceprotected void onBoundsChanged()
protected final void calcCenter()
public final void set(float lowerX,
float lowerY,
float lowerZ,
float upperX,
float upperY,
float upperZ)
public final void set(Tuple3f lower,
Tuple3f upper)
public final void setLower(float x,
float y,
float z)
public final void setLower(Tuple3f point)
public final void setLowerX(float x)
x - public final void setLowerY(float y)
y - public final void setLowerZ(float z)
z - public final Point3f getLower()
public final void getLower(Tuple3f point)
public final float getLowerX()
public final float getLowerY()
public final float getLowerZ()
public final void setUpper(float x,
float y,
float z)
public final void setUpper(Tuple3f point)
public final void setUpperX(float x)
x - public final void setUpperY(float y)
y - public final void setUpperZ(float z)
z - public final Point3f getUpper()
public final void getUpper(Tuple3f point)
public final float getUpperX()
public final float getUpperY()
public final float getUpperZ()
public final float getXSpan()
public final float getYSpan()
public final float getZSpan()
public final void setCenter(float x,
float y,
float z)
setCenter in class Bodyx - y - z -
public void setSize(float xSpan,
float ySpan,
float zSpan)
xSpan - ySpan - zSpan - public final void setSize(Tuple3f span)
public final <T extends Tuple3f> T getSize(T out)
out.
out - public final Tuple3f getSize()
out.
public final void combine(BodyInterface body)
combine in interface BodyInterfacepublic final void combine(BodyInterface[] bodies)
combine in interface BodyInterface
protected final void combine_(float x,
float y,
float z)
public final void combine(float x,
float y,
float z)
combine in interface BodyInterfaceprotected final void combine_(Point3f p)
public final void combine(Point3f p)
combine in interface BodyInterfacepublic final void combine(Point3f[] points)
combine in interface BodyInterfacepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||