|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
| 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(Body body)
Combines this Body with a bounding object. |
void |
combine(Body[] 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 |
getCenter()
Computes the x-, y-, and z-span of this Box and puts the values into out. |
Tuple3f |
getCenter(Tuple3f out)
Computes the x-, y-, and z-span of this Box and puts the values into out. |
float |
getCenterX()
Computes the xspan of this Box. |
float |
getCenterY()
Computes the xspan of this Box. |
float |
getCenterZ()
Computes the xspan of this Box. |
Point3f |
getLower()
|
void |
getLower(Tuple3f point)
|
float |
getLowerX()
|
float |
getLowerY()
|
float |
getLowerZ()
|
float |
getMaxDistance()
|
float |
getMaxSquaredDistance()
|
Tuple3f |
getSize()
Computes the x-, y-, and z-span of this Box and puts the values into out. |
void |
getSize(Tuple3f 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()
|
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 |
setCenter(Tuple3f point)
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. |
protected void |
setMaxSquaredDistance(float distSq)
Sets the largest distance (squared) from the center |
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 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 Bodypublic final boolean contains(Point3f point)
contains in interface Bodyprotected 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)
public final void setCenter(Tuple3f point)
public final float getCenterX()
public final float getCenterY()
public final float getCenterZ()
public final Tuple3f getCenter(Tuple3f out)
out.
out - public final Point3f getCenter()
out.
protected final void setMaxSquaredDistance(float distSq)
public final float getMaxSquaredDistance()
public final float getMaxDistance()
public final void setSize(float xSpan,
float ySpan,
float zSpan)
public final void setSize(Tuple3f span)
public final void getSize(Tuple3f out)
out.
out - public final Tuple3f getSize()
out.
public final void combine(Body body)
combine in interface Bodypublic final void combine(Body[] bodies)
combine in interface Body
protected final void combine_(float x,
float y,
float z)
public final void combine(float x,
float y,
float z)
combine in interface Bodyprotected final void combine_(Point3f p)
public final void combine(Point3f p)
combine in interface Bodypublic final void combine(Point3f[] points)
combine in interface Bodypublic 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 | |||||||||