|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.widget.bounds.WidgetBoundingRectangle
| Field Summary | |
protected Vector2f |
center
|
int[] |
checkPlanes
|
protected boolean |
lockMin
|
protected Vector2f |
max
|
protected Vector2f |
min
|
protected Vector2f[] |
points
|
| Constructor Summary | |
|
WidgetBoundingRectangle()
Constructor instantiates a new BoundingBox object. |
|
WidgetBoundingRectangle(boolean lockMin)
|
protected |
WidgetBoundingRectangle(Vector2f min,
Vector2f max,
Vector2f center)
Constructor instantiates a new BoundingBox object. |
|
WidgetBoundingRectangle(WidgetBoundingRectangle r)
|
|
WidgetBoundingRectangle(WidgetBoundingRectangle r,
boolean lockMin)
|
| Method Summary | |
void |
addHeight(float height)
|
void |
addMaxX(float x)
|
void |
addMaxY(float y)
|
void |
addMinX(float x)
|
void |
addMinY(float y)
|
void |
addWidth(float width)
|
void |
axisAligned(Vector2f[] points)
axisAligned creates a minimal box around all supplied
points. |
static WidgetBoundingRectangle |
clip(WidgetBoundingRectangle clip,
WidgetBoundingRectangle clipTo)
|
java.lang.Object |
clone(BoundingVolume store)
clone creates a new BoundingSphere object containing the
same data as this one. |
protected void |
computeFromPoints()
|
void |
computeFromPoints(Vector2f[] points)
computeFromPoints creates a new BoundingBox from a given
set of points. |
void |
computeFromPoints(Vector3f[] points)
computeFromPoints generates a bounding volume that
encompasses a collection of points. |
boolean |
contains(WidgetBoundingRectangle rect)
|
float |
distanceTo(Vector3f point)
Find the distance from the center of this Bounding Volume to the given point. |
Vector2f |
getCenter()
|
Vector3f |
getCenter(Vector3f store)
Stores the current center of this BoundingRectangle into the store vector. |
int |
getCheckPlane(int index)
get the value for a given index in the checkplanes |
float |
getHeight()
|
Vector2f |
getMax()
|
float |
getMaxX()
|
float |
getMaxY()
|
Vector2f |
getMin()
|
float |
getMinX()
|
float |
getMinY()
|
Vector2f |
getSize()
|
float |
getWidth()
|
void |
initCheckPlanes()
initCheckPlanes resets the checkplanes to their standard
order. |
boolean |
inside(int x,
int y)
|
boolean |
insideX(float x)
|
boolean |
insideY(float y)
|
boolean |
intersects(BoundingVolume bv)
determines if this bounding volume and a second given volume are intersecting. |
boolean |
intersects(Ray ray)
determines if a ray intersects this bounding volume. |
static boolean |
intersects(WidgetBoundingRectangle r1,
WidgetBoundingRectangle r2)
|
boolean |
intersectsBoundingBox(BoundingBox bb)
determines if this bounding volume and a given bounding box are intersecting. |
boolean |
intersectsOBB2(OBB2 obb)
determines if this bounding volume and a given oriented bounding box are intersecting. |
boolean |
intersectsOrientedBoundingBox(OrientedBoundingBox obb)
determines if this bounding volume and a given oriented bounding box are intersecting. |
boolean |
intersectsSphere(BoundingSphere bs)
determines if this bounding volume and a given bounding sphere are intersecting. |
boolean |
isLockMin()
|
BoundingVolume |
merge(BoundingVolume bound)
merge combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume. |
BoundingVolume |
mergeLocal(BoundingVolume bound)
mergeLocal combines two bounding volumes into a single
bounding volume that contains both this bounding volume and the parameter
volume. |
void |
recomputeMesh()
Reconstruct a visible mesh for the bound. |
void |
set(WidgetBoundingRectangle r)
|
void |
setCheckPlane(int index,
int value)
set the value for a given index in the checkplanes |
void |
setHeight(float height)
|
void |
setLockMin(boolean b)
|
void |
setMax(float x,
float y)
|
void |
setMax(Vector2f max)
|
void |
setMaxX(float x)
|
void |
setMaxY(float y)
|
void |
setMin(float x,
float y)
|
void |
setMin(Vector2f min)
|
void |
setMinPreserveSize(float x,
float y)
|
void |
setMinPreserveSize(Vector2f at)
|
void |
setMinX(float x)
|
void |
setMinXPreserveSize(float x)
|
void |
setMinY(float y)
|
void |
setMinYPreserveSize(float y)
|
void |
setSize(Vector2f size)
|
void |
setWidth(float width)
|
void |
setWidthHeight(float width,
float height)
|
void |
subtractHeight(float height)
|
void |
subtractMaxX(float x)
|
void |
subtractMaxY(float y)
|
void |
subtractMinX(float x)
|
void |
subtractMinY(float y)
|
void |
subtractWidth(float width)
|
java.lang.String |
toString()
|
BoundingVolume |
transform(Quaternion rotate,
Vector3f translate,
Vector3f scale)
transform alters the location of the bounding volume by a
rotation, translation and a scalar. |
BoundingVolume |
transform(Quaternion rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume bv)
transform alters the location of the bounding volume by a
rotation, translation and a scalar. |
int |
whichSide(Plane plane)
whichSide returns the side on which the bounding volume
lies on a plane. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int[] checkPlanes
protected Vector2f min
protected Vector2f max
protected Vector2f center
protected Vector2f[] points
protected boolean lockMin
| Constructor Detail |
public WidgetBoundingRectangle()
BoundingBox object.
public WidgetBoundingRectangle(boolean lockMin)
public WidgetBoundingRectangle(WidgetBoundingRectangle r)
public WidgetBoundingRectangle(WidgetBoundingRectangle r,
boolean lockMin)
protected WidgetBoundingRectangle(Vector2f min,
Vector2f max,
Vector2f center)
BoundingBox object. The box
is defined by a minimum and maximum point.
center - the center of the box.min - the minimum point of the box.max - the maximum point of the box.| Method Detail |
public void initCheckPlanes()
BoundingVolumeinitCheckPlanes resets the checkplanes to their standard
order.
initCheckPlanes in interface BoundingVolumepublic void set(WidgetBoundingRectangle r)
public Vector2f getMin()
public float getMinX()
public void setMinX(float x)
public float getMinY()
public void setMinY(float y)
public Vector2f getMax()
public void setMaxX(float x)
public float getMaxX()
public float getMaxY()
public void setMaxY(float y)
public Vector2f getCenter()
public void computeFromPoints(Vector2f[] points)
computeFromPoints creates a new BoundingBox from a given
set of points. It uses the axisAligned method as default.
points - the points to contain.public void axisAligned(Vector2f[] points)
axisAligned creates a minimal box around all supplied
points. The orientation is always aligned with the local entity's
coordinate system and therefore is axis aligned.
points - the list of points to contain.public boolean contains(WidgetBoundingRectangle rect)
public BoundingVolume merge(BoundingVolume bound)
BoundingVolumemerge combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume.
merge in interface BoundingVolumebound - the volume to combine.
public BoundingVolume mergeLocal(BoundingVolume bound)
BoundingVolumemergeLocal combines two bounding volumes into a single
bounding volume that contains both this bounding volume and the parameter
volume. The result is stored locally.
mergeLocal in interface BoundingVolumebound - the volume to combine.
public java.lang.Object clone(BoundingVolume store)
clone creates a new BoundingSphere object containing the
same data as this one.
clone in interface BoundingVolumestore - where to store the cloned information. if null or wrong class,
a new store is created.
public void setMin(Vector2f min)
public void setMin(float x,
float y)
public void setMinPreserveSize(float x,
float y)
public void setMinPreserveSize(Vector2f at)
public void setMinXPreserveSize(float x)
public void setMinYPreserveSize(float y)
public void addMinX(float x)
public void subtractMinX(float x)
public void addMinY(float y)
public void subtractMinY(float y)
public void setMax(Vector2f max)
public void setMax(float x,
float y)
public void addMaxX(float x)
public void subtractMaxX(float x)
public void addMaxY(float y)
public void subtractMaxY(float y)
public void setSize(Vector2f size)
public Vector2f getSize()
public void setWidthHeight(float width,
float height)
public void setWidth(float width)
public float getWidth()
public void setHeight(float height)
public float getHeight()
public void addWidth(float width)
public void subtractWidth(float width)
public void addHeight(float height)
public void subtractHeight(float height)
public boolean inside(int x,
int y)
public boolean insideX(float x)
public boolean insideY(float y)
protected void computeFromPoints()
public static boolean intersects(WidgetBoundingRectangle r1,
WidgetBoundingRectangle r2)
public static WidgetBoundingRectangle clip(WidgetBoundingRectangle clip,
WidgetBoundingRectangle clipTo)
public boolean isLockMin()
public void setLockMin(boolean b)
public BoundingVolume transform(Quaternion rotate,
Vector3f translate,
Vector3f scale)
BoundingVolumetransform alters the location of the bounding volume by a
rotation, translation and a scalar.
transform in interface BoundingVolumerotate - the rotation to affect the bound.translate - the translation to affect the bound.scale - the scale to resize the bound.
public BoundingVolume transform(Quaternion rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume bv)
BoundingVolumetransform alters the location of the bounding volume by a
rotation, translation and a scalar.
transform in interface BoundingVolumerotate - the rotation to affect the bound.translate - the translation to affect the bound.scale - the scale to resize the bound.bv - sphere to store result in
public int whichSide(Plane plane)
BoundingVolumewhichSide returns the side on which the bounding volume
lies on a plane. Possible values are POSITIVE_SIDE, NEGATIVE_SIDE, and
NO_SIDE.
whichSide in interface BoundingVolumeplane - the plane to check against this bounding volume.
Pointpublic void computeFromPoints(Vector3f[] points)
BoundingVolumecomputeFromPoints generates a bounding volume that
encompasses a collection of points.
computeFromPoints in interface BoundingVolumepoints - the points to contain.public int getCheckPlane(int index)
BoundingVolume
getCheckPlane in interface BoundingVolumeindex -
public void setCheckPlane(int index,
int value)
BoundingVolume
setCheckPlane in interface BoundingVolumeindex - value - public void recomputeMesh()
BoundingVolume
recomputeMesh in interface BoundingVolumepublic float distanceTo(Vector3f point)
distanceTo in interface BoundingVolumepoint - The point to get the distance to
public Vector3f getCenter(Vector3f store)
getCenter in interface BoundingVolumestore - The vector to store the center into.
public java.lang.String toString()
public boolean intersects(BoundingVolume bv)
BoundingVolume
intersects in interface BoundingVolumebv - the second volume to test against.
public boolean intersectsSphere(BoundingSphere bs)
BoundingVolume
intersectsSphere in interface BoundingVolumebs - the bounding sphere to test against.
public boolean intersectsBoundingBox(BoundingBox bb)
BoundingVolume
intersectsBoundingBox in interface BoundingVolumebb - the bounding box to test against.
public boolean intersectsOrientedBoundingBox(OrientedBoundingBox obb)
BoundingVolume
intersectsOrientedBoundingBox in interface BoundingVolumeobb - the bounding box to test against.
public boolean intersectsOBB2(OBB2 obb)
BoundingVolume
intersectsOBB2 in interface BoundingVolumeobb - the bounding box to test against.
public boolean intersects(Ray ray)
BoundingVolume
intersects in interface BoundingVolumeray - the ray to test.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||