com.jme.scene.shape
Class StripBox

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.AbstractBox
                  extended by com.jme.scene.shape.StripBox
All Implemented Interfaces:
Savable, java.io.Serializable

public class StripBox
extends AbstractBox

A box made from a strip mode tri-mesh.

Version:
$Revision: 4131 $, $Date: 2009-03-19 20:15:28 +0000 (Thu, 19 Mar 2009) $
Author:
Mark Powell, Joshua Slack (conversion from Box to StripBox)
See Also:
Serialized Form

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
StripBox()
          NOT API: for internal use, do not call from user code.
StripBox(java.lang.String name)
          Constructor instantiates a new StripBox object.
StripBox(java.lang.String name, Vector3f center, float xExtent, float yExtent, float zExtent)
          Constructs a new box.
StripBox(java.lang.String name, Vector3f min, Vector3f max)
          Constructor instantiates a new StripBox object.
 
Method Summary
 StripBox clone()
          Creates a new StripBox object containing the same data as this one.
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 com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal
 
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

StripBox

public StripBox()
NOT API: for internal use, do not call from user code.


StripBox

public StripBox(java.lang.String name)
Constructor instantiates a new StripBox object. Center and vertice information must be supplied later.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.

StripBox

public StripBox(java.lang.String name,
                Vector3f min,
                Vector3f max)
Constructor instantiates a new StripBox 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 for those attributes.

Parameters:
name - the name of the scene element. This is required for identification and comparision purposes.
min - the minimum point that defines the box.
max - the maximum point that defines the box.

StripBox

public StripBox(java.lang.String name,
                Vector3f center,
                float xExtent,
                float yExtent,
                float zExtent)
Constructs a new box. The box has the given center and extends in the x, y, and z out from the center (+ and -) by the given amounts. So, for example, a box with extent of .5 would be the unit cube.

Parameters:
name - Name of the box.
center - Center of the box.
xExtent - x extent of the box, in both directions.
yExtent - y extent of the box, in both directions.
zExtent - z extent of the box, in both directions.
Method Detail

duUpdateGeometryVertices

protected void duUpdateGeometryVertices()
Description copied from class: AbstractBox
Update the position of the vertices that define the box.

These eight points are determined from the minimum and maximum point.

Specified by:
duUpdateGeometryVertices in class AbstractBox

duUpdateGeometryNormals

protected void duUpdateGeometryNormals()
Description copied from class: AbstractBox
Update the normals of each of the box's planes.

Specified by:
duUpdateGeometryNormals in class AbstractBox

duUpdateGeometryTextures

protected void duUpdateGeometryTextures()
Description copied from class: AbstractBox
Update the points that define the texture of the box.

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.

Specified by:
duUpdateGeometryTextures in class AbstractBox

duUpdateGeometryIndices

protected void duUpdateGeometryIndices()
Description copied from class: AbstractBox
Convert the indices into the list of vertices that define the box's tri-mesh.

Specified by:
duUpdateGeometryIndices in class AbstractBox

clone

public StripBox clone()
Creates a new StripBox object containing the same data as this one.

Overrides:
clone in class java.lang.Object
Returns:
the new StripBox