public class Box extends AbstractBox
center, xExtent, yExtent, zExtent| Modifier | Constructor and Description |
|---|---|
protected |
Box()
Empty constructor for serialization only.
|
|
Box(float x,
float y,
float z)
Creates a new box.
|
|
Box(Vector3f center,
float x,
float y,
float z)
Deprecated.
Due to constant confusion of geometry centers and the center
of the box mesh this method has been deprecated.
|
|
Box(Vector3f min,
Vector3f max)
Constructor instantiates a new
Box object. |
| Modifier and Type | Method and Description |
|---|---|
Box |
clone()
Creates a clone of this box.
|
protected void |
doUpdateGeometryIndices()
Convert the indices into the list of vertices that define the box's geometry.
|
protected void |
doUpdateGeometryNormals()
Update the normals of each of the box's planes.
|
protected void |
doUpdateGeometryTextures()
Update the points that define the texture of the box.
|
protected void |
doUpdateGeometryVertices()
Update the position of the vertices that define the box.
|
computeVertices, getCenter, getXExtent, getYExtent, getZExtent, read, updateGeometry, updateGeometry, updateGeometry, writeaddMorphTarget, clearBuffer, clearCollisionData, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setPointSize, setStatic, setStreamed, updateBound, updateCountspublic Box(float x,
float y,
float z)
The box has a center of 0,0,0 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.
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.@Deprecated public Box(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.
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(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 its orientation or position. You should
use the Spatial.setLocalTranslation(com.jme3.math.Vector3f)
and Spatial.setLocalRotation(com.jme3.math.Quaternion)
methods to define those properties.
min - the minimum point that defines the box.max - the maximum point that defines the box.protected Box()
public Box clone()
The cloned box will have '_clone' appended to its name, but all other properties will be the same as this box.
protected void doUpdateGeometryIndices()
AbstractBoxdoUpdateGeometryIndices in class AbstractBoxprotected void doUpdateGeometryNormals()
AbstractBoxdoUpdateGeometryNormals in class AbstractBoxprotected void doUpdateGeometryTextures()
AbstractBoxIt's a one-to-one ratio, where each plane of the box has its own copy of the texture. That is, the texture is repeated one time for each face.
doUpdateGeometryTextures in class AbstractBoxprotected void doUpdateGeometryVertices()
AbstractBoxThese eight points are determined from the minimum and maximum point.
doUpdateGeometryVertices in class AbstractBox