Package com.ardorcraft.objects
Class QuadBox
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardorcraft.objects.QuadBox
- All Implemented Interfaces:
- Pickable,- Hintable,- Renderable,- Savable
QuadBox is an axis-aligned rectangular prism defined by a center point and x, y, and z extents from that
 center (essentially radii.)- 
Field SummaryFields inherited from class com.ardor3d.scenegraph.Mesh_defaultColor, _isVisible, _lightState, _meshData, _modelBound, _states, RENDER_VERTEX_ONLYFields 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 SummaryConstructorsConstructorDescriptionQuadBox()Constructs a new 1x1x1QuadBox.Constructs a new 1x1x1QuadBoxwith the given name.QuadBox(String name, ReadOnlyVector3 center, double xExtent, double yExtent, double zExtent) Constructs a newQuadBoxobject using the given center and extents.QuadBox(String name, ReadOnlyVector3 pntA, ReadOnlyVector3 pntB) Constructs a newQuadBoxobject using the given two points as opposite corners of the box.
- 
Method SummaryModifier and TypeMethodDescriptionclone()clonecreates a new QuadBox object containing the same data as this one.Vector3[]doubledoubledoublevoidread(InputCapsule capsule) voidsetData(ReadOnlyVector3 center, double xExtent, double yExtent, double zExtent) Updates the center point and extents of this box using the defined values.voidsetData(ReadOnlyVector3 pntA, ReadOnlyVector3 pntB) Updates the center point and extents of this box to match an axis-aligned box defined by the two given opposite corners.protected voidsetVertexDatasets the vertex positions that define the box using the center point and defined extents.voidwrite(OutputCapsule capsule) Methods inherited from class com.ardor3d.scenegraph.MeshapplyWorldRenderStates, 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, updateWorldBoundMethods inherited from class com.ardor3d.scenegraph.SpatialacceptVisitor, 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
- 
Constructor Details- 
QuadBoxpublic QuadBox()Constructs a new 1x1x1QuadBox.
- 
QuadBoxConstructs a new 1x1x1QuadBoxwith the given name.- Parameters:
- name- the name to give this new box. This is required for identification and comparison purposes.
 
- 
QuadBoxConstructs a newQuadBoxobject using the given two points as opposite corners of the box. These two points may be in any order.- Parameters:
- name- the name to give this new box. This is required for identification and comparison purposes.
- pntA- the first point
- pntB- the second point.
 
- 
QuadBoxConstructs a newQuadBoxobject using the given center and extents. Since the extents represent the distance from the center of the box to the edge, the full length of a side is actually 2 * extent.- Parameters:
- name- the name to give this new box. This is required for identification and comparison purposes.
- center- Center of the box.
- xExtent- x extent of the box
- yExtent- y extent of the box
- zExtent- z extent of the box
 
 
- 
- 
Method Details- 
getCenter- Returns:
- the current center of this box.
 
- 
getXExtentpublic double getXExtent()- Returns:
- the current X extent of this box.
 
- 
getYExtentpublic double getYExtent()- Returns:
- the current Y extent of this box.
 
- 
getZExtentpublic double getZExtent()- Returns:
- the current Z extent of this box.
 
- 
setDataUpdates the center point and extents of this box to match an axis-aligned box defined by the two given opposite corners.- Parameters:
- pntA- the first point
- pntB- the second point.
 
- 
setDataUpdates the center point and extents of this box using the defined values.- Parameters:
- center- The center of the box.
- xExtent- x extent of the box
- yExtent- y extent of the box
- zExtent- z extent of the box
 
- 
setVertexDataprotected void setVertexData()setVertexDatasets the vertex positions that define the box using the center point and defined extents.
- 
cloneclonecreates a new QuadBox object containing the same data as this one.
- 
computeVertices- Returns:
- a size 8 array of Vectors representing the 8 points of the box.
 
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- Mesh
- Parameters:
- capsule- the capsule
- Throws:
- IOException- Signals that an I/O exception has occurred.
- See Also:
 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- Mesh
- Parameters:
- capsule- the input capsule
- Throws:
- IOException- Signals that an I/O exception has occurred.
- See Also:
 
 
-