|
||||||||||
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.AbstractBox
com.jme.scene.shape.Box
public class Box
A box with solid (filled) faces.
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 |
---|
Fields inherited from class com.jme.scene.shape.AbstractBox |
---|
center, xExtent, yExtent, zExtent |
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 | |
---|---|
Box()
|
|
Box(java.lang.String name)
Creates a new box. |
|
Box(java.lang.String name,
Vector3f center,
float x,
float y,
float z)
Creates a new box. |
|
Box(java.lang.String name,
Vector3f min,
Vector3f max)
Constructor instantiates a new Box object. |
Method Summary | |
---|---|
Box |
clone()
Creates a clone of this box. |
protected void |
duUpdateGeometryIndices()
Convert the indices into the list of vertices that define the box's tri-mesh. |
protected void |
duUpdateGeometryNormals()
Update the normals of each of the box's planes. |
protected void |
duUpdateGeometryTextures()
Update the points that define the texture of the box. |
protected void |
duUpdateGeometryVertices()
Update the position of the vertices that define the box. |
Methods inherited from class com.jme.scene.shape.AbstractBox |
---|
computeVertices, getCenter, getXExtent, getYExtent, getZExtent, read, setCenter, setData, setData, updateGeometry, updateGeometry, updateGeometry, write |
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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Constructor Detail |
---|
public Box()
public Box(java.lang.String name)
Center and vertices information must be supplied later.
name
- the name of the box.public Box(java.lang.String name, Vector3f center, float x, float y, float z)
The box has the given center and extends in the out from the center by the given amount in each direction. So, for example, a box with extent of 0.5 would be the unit cube.
name
- the name of the box.center
- the center of the box.x
- the size of the box along the x axis, in both directions.y
- the size of the box along the y axis, in both directions.z
- the size of the box along the z axis, in both directions.public Box(java.lang.String name, Vector3f min, Vector3f max)
Box
object.
The minimum and maximum point are provided, these two points define the
shape and size of the box but not it’s orientation or position. You should
use the #setLocalTranslation()
and #setLocalRotation()
methods to define those properties.
name
- the name of the box.min
- the minimum point that defines the box.max
- the maximum point that defines the box.Method Detail |
---|
public Box clone()
The cloned box will have ‘_clone’ appended to it’s name, but all other properties will be the same as this box.
clone
in class java.lang.Object
protected void duUpdateGeometryIndices()
AbstractBox
duUpdateGeometryIndices
in class AbstractBox
protected void duUpdateGeometryNormals()
AbstractBox
duUpdateGeometryNormals
in class AbstractBox
protected void duUpdateGeometryTextures()
AbstractBox
It's a one-to-one ratio, where each plane of the box has it's own copy of the texture. That is, the texture is repeated one time for each face.
duUpdateGeometryTextures
in class AbstractBox
protected void duUpdateGeometryVertices()
AbstractBox
These eight points are determined from the minimum and maximum point.
duUpdateGeometryVertices
in class AbstractBox
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |