|
|||||||||||
| 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
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.
| Field Summary | |
protected Vector3f |
center
Center of the Oriented Box. |
boolean |
correctCorners
If true, the box's vectorStore array correctly represnts the box's corners. |
protected Vector3f |
extent
Extents of the box along the x,y,z axis. |
protected ColorRGBA |
meshColor
Per vertex color of the drawn OrientedBox on computeInformation calls |
protected Vector3f[] |
normalStore
Vector array used to store the box's normals. |
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 |
indices, triangleQuantity |
| Fields inherited from class com.jme.scene.Geometry |
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity |
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, 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. |
|
| Method Summary | |
void |
computeCorners()
Sets the vectorStore information to the 8 corners of the box. |
void |
computeInformation()
Takes the plane and center information and creates the correct vertex,normal,color,texture,index information to represent the OrientedBox. |
Vector3f |
getCenter()
Returns the center of the box. |
Vector3f |
getExtent()
Returns the box's extent vector along the x,y,z. |
ColorRGBA |
getMeshColor()
Returns this OB's per vertex color. |
Vector3f |
getxAxis()
Returns the x axis of this box. |
Vector3f |
getyAxis()
Gets the Y axis of this OB. |
Vector3f |
getzAxis()
Returns the Z axis of this OB. |
boolean |
isCorrectCorners()
Returns if the corners are set corectly. |
void |
setCenter(Vector3f center)
Sets the box's center to the given value. |
void |
setExtent(Vector3f extent)
Sets the box's extent vector to the given value. |
void |
setMeshColor(ColorRGBA meshColor)
Sets the per vertex color of this OB. |
void |
setxAxis(Vector3f xAxis)
Sets the x axis of this OB. |
void |
setyAxis(Vector3f yAxis)
Sets the Y axis of this OB. |
void |
setzAxis(Vector3f zAxis)
Sets the Z axis of this OB. |
| Methods inherited from class com.jme.scene.TriMesh |
clearBuffers, draw, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Vector3f center
protected Vector3f xAxis
protected Vector3f yAxis
protected Vector3f zAxis
protected Vector3f extent
protected ColorRGBA meshColor
protected Vector2f texTopRight
protected Vector2f texTopLeft
protected Vector2f texBotRight
protected Vector2f texBotLeft
public Vector3f[] vectorStore
protected Vector3f[] normalStore
public boolean correctCorners
| Constructor Detail |
public OrientedBox(java.lang.String name)
name - The name of the new box.| Method Detail |
public void computeInformation()
public void computeCorners()
public Vector3f getCenter()
public void setCenter(Vector3f center)
center - The box's new center.public Vector3f getExtent()
public void setExtent(Vector3f extent)
extent - The box's new extent.public Vector3f getxAxis()
public void setxAxis(Vector3f xAxis)
xAxis - The new x axis.public Vector3f getyAxis()
public void setyAxis(Vector3f yAxis)
yAxis - The new Y axis.public Vector3f getzAxis()
public void setzAxis(Vector3f zAxis)
zAxis - The new Z axis.public ColorRGBA getMeshColor()
public void setMeshColor(ColorRGBA meshColor)
meshColor - The new per vertex color.public boolean isCorrectCorners()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||