Package com.ardor3d.scenegraph.shape
Class StripBox
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.scenegraph.shape.StripBox
- All Implemented Interfaces:
Pickable
,Hintable
,Renderable
,Savable
-
Field Summary
Fields inherited from class com.ardor3d.scenegraph.Mesh
_defaultColor, _isVisible, _lightState, _meshData, _modelBound, _states, RENDER_VERTEX_ONLY
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
ConstructorDescriptionStripBox()
instantiates a newStripBox
object.Constructor instantiates a newStripBox
object.Constructs a new box.Constructor instantiates a newStripBox
object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
clone
creates a new StripBox object containing the same data as this one.Vector3[]
Returns the current center of the box.void
read
(InputCapsule capsule) void
Changes the data of the box so that its center iscenter
and it extends in the x, y, and z directions by the given extent.void
Changes the data of the box so that the two opposite corners are minPoint and maxPoint.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.scenegraph.Mesh
applyWorldRenderStates, draw, getClassTag, getDefaultColor, getLightState, getMeshData, getModelBound, getModelBound, getWorldNormals, getWorldRenderState, getWorldVectors, intersectsPrimitivesWhere, intersectsWorldBound, intersectsWorldBoundsWhere, isVisible, makeCopy, makeInstanced, render, render, renderArrays, renderVBO, reorderIndices, reorderVertexData, reorderVertexData, setDefaultColor, setDefaultColor, setLightState, setMeshData, setModelBound, setModelBound, setRandomColors, setSolidColor, setVisible, sortLights, supportsBoundsIntersectionRecord, supportsPrimitivesIntersectionRecord, updateModelBound, updateWorldBound
Methods inherited from class com.ardor3d.scenegraph.Spatial
acceptVisitor, addController, addTranslation, addTranslation, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyDown, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateChildren, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, updateWorldRenderStates, updateWorldTransform, worldToLocal
-
Field Details
-
_xExtent
public double _xExtent -
_yExtent
public double _yExtent -
_zExtent
public double _zExtent -
_center
-
-
Constructor Details
-
StripBox
public StripBox()instantiates a newStripBox
object. All information must be applies later. For internal usage only -
StripBox
Constructor instantiates a newStripBox
object. Center and vertex information must be supplied later.- Parameters:
name
- the name of the scene element. This is required for identification and comparison purposes.
-
StripBox
Constructor instantiates a newStripBox
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 thesetTranslation
andsetLocalRotation
for those attributes.- Parameters:
name
- the name of the scene element. This is required for identification and comparison purposes.min
- the minimum point that defines the box.max
- the maximum point that defines the box.
-
StripBox
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 Details
-
setData
Changes the data of the box so that the two opposite corners are minPoint and maxPoint. The other corners are created from those two poitns. If update buffers is flagged as true, the vertex/normal/texture/color/index buffers are updated when the data is changed.- Parameters:
minPoint
- The new minPoint of the box.maxPoint
- The new maxPoint of the box.
-
setData
Changes the data of the box so that its center iscenter
and it extends in the x, y, and z directions by the given extent. Note that the actual sides will be 2x the given extent values because the box extends in + & - from the center for each extent.- Parameters:
center
- The 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.
-
clone
clone
creates a new StripBox object containing the same data as this one. -
computeVertices
- Returns:
- a size 8 array of Vectors representing the 8 points of the box.
-
getCenter
Returns the current center of the box.- Returns:
- The box's center.
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classMesh
- Parameters:
capsule
- the capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classMesh
- Parameters:
capsule
- the input capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-