|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.OrientedBox
public class OrientedBox
Started Date: Aug 22, 2004
This primitive represents a box that has options to orient it acording to its
X/Y/Z axis. It is used to create an OrientedBoundingBox mostly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
protected Vector3f |
center
Center of the Oriented Box. |
boolean |
correctCorners
Have the corners of the box (as stored in the #vectorStore array)
been set to correctly represent the box’s corners or not. |
protected Vector3f |
extent
Extents of the box along the x,y,z axis. |
protected Vector2f |
texBotLeft
Texture coordintae values for the corners of the box. |
protected Vector2f |
texBotRight
Texture coordintae values for the corners of the box. |
protected Vector2f |
texTopLeft
Texture coordintae values for the corners of the box. |
protected Vector2f |
texTopRight
Texture coordintae values for the corners of the box. |
Vector3f[] |
vectorStore
Vector array used to store the array of 8 corners the box has. |
protected Vector3f |
xAxis
X axis of the Oriented Box. |
protected Vector3f |
yAxis
Y axis of the Oriented Box. |
protected Vector3f |
zAxis
Z axis of the Oriented Box. |
Fields inherited from class com.jme.scene.TriMesh |
---|
indexBuffer, mode, triangleQuantity |
Fields inherited from class com.jme.scene.Geometry |
---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
Constructor Summary | |
---|---|
OrientedBox(java.lang.String name)
Creates a new OrientedBox with the given name. |
|
OrientedBox(java.lang.String name,
Vector3f center,
Vector2f topRight,
Vector2f topLeft,
Vector2f bottomRight,
Vector2f bottomLeft)
Create a new oriented box. |
Method Summary | |
---|---|
void |
computeCorners()
Deprecated. will be made private. |
void |
computeInformation()
Deprecated. will be made private. |
Vector3f |
getCenter()
Returns the center of the box. |
Vector3f |
getExtent()
Returns the box's extent vector along the x,y,z. |
Vector3f |
getxAxis()
Deprecated. Use getXAxis() instead |
Vector3f |
getXAxis()
|
Vector3f |
getyAxis()
Deprecated. Use getYAxis() instead |
Vector3f |
getYAxis()
|
Vector3f |
getzAxis()
Deprecated. Use getZAxis() instead |
Vector3f |
getZAxis()
|
boolean |
isCorrectCorners()
Have the corners of the box been set correctly. |
void |
read(JMEImporter e)
|
void |
setCenter(Vector3f center)
Deprecated. use #updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean) instead. |
void |
setExtent(Vector3f extent)
Deprecated. use #updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean) instead. |
void |
setxAxis(Vector3f xAxis)
Deprecated. use #updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean) instead. |
void |
setyAxis(Vector3f yAxis)
Deprecated. use #updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean) instead. |
void |
setzAxis(Vector3f zAxis)
Deprecated. use #updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean) instead. |
void |
updateGeometry()
Update the box’s geometry after a property has been altered directly. |
void |
updateGeometry(Vector3f center,
Vector2f topRight,
Vector2f topLeft,
Vector2f bottomRight,
Vector2f bottomLeft)
|
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.TriMesh |
---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Field Detail |
---|
protected Vector3f center
public boolean correctCorners
#vectorStore
array)
been set to correctly represent the box’s corners or not.
protected Vector3f extent
protected Vector2f texTopRight
protected Vector2f texTopLeft
protected Vector2f texBotRight
protected Vector2f texBotLeft
public Vector3f[] vectorStore
protected Vector3f xAxis
protected Vector3f yAxis
protected Vector3f zAxis
Constructor Detail |
---|
public OrientedBox(java.lang.String name)
name
- The name of the new box.public OrientedBox(java.lang.String name, Vector3f center, Vector2f topRight, Vector2f topLeft, Vector2f bottomRight, Vector2f bottomLeft)
The box is initially configured based on the supplied texture co-ordinate points.
name
- the name of the box.center
- point at the center of the box.topRight
- the top right hand corner of the box.topLeft
- the top left hand corner of the box.bottomRight
- the bottom right hand corner of the box.bottomLeft
- the bottom left hand corner of the box.Method Detail |
---|
public void computeCorners()
public void computeInformation()
public Vector3f getCenter()
public Vector3f getExtent()
public Vector3f getxAxis()
getXAxis()
instead
public Vector3f getXAxis()
public Vector3f getyAxis()
getYAxis()
instead
public Vector3f getYAxis()
public Vector3f getzAxis()
getZAxis()
instead
public Vector3f getZAxis()
public boolean isCorrectCorners()
true
if the vector store is correct,
false
otherwise.public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class TriMesh
java.io.IOException
public void setCenter(Vector3f center)
#updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean)
instead.
public void setExtent(Vector3f extent)
#updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean)
instead.
public void setxAxis(Vector3f xAxis)
#updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean)
instead.
public void setyAxis(Vector3f yAxis)
#updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean)
instead.
public void setzAxis(Vector3f zAxis)
#updateGeometry(Vector3f, Vector2f, Vector2f, Vector2f, Vector2f, boolean)
instead.
public void updateGeometry()
public void updateGeometry(Vector3f center, Vector2f topRight, Vector2f topLeft, Vector2f bottomRight, Vector2f bottomLeft)
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class TriMesh
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |