Package com.ardor3d.scenegraph.shape
Class Torus
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.scenegraph.shape.Torus
- All Implemented Interfaces:
Pickable
,Hintable
,Renderable
,Savable
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected int
protected int
protected double
protected boolean
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
read
(InputCapsule capsule) void
setViewFromInside
(boolean viewInside) 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
-
_circleSamples
protected int _circleSamples -
_radialSamples
protected int _radialSamples -
_tubeRadius
protected double _tubeRadius -
_centerRadius
protected double _centerRadius -
_viewInside
protected boolean _viewInside
-
-
Constructor Details
-
Torus
public Torus()private constructor for Savable use only. -
Torus
public Torus(String name, int circleSamples, int radialSamples, double tubeRadius, double centerRadius) Constructs a new Torus. Center is the origin, but the Torus may be transformed.- Parameters:
name
- The name of the Torus.circleSamples
- The number of samples along the circles.radialSamples
- The number of samples along the radial.tubeRadius
- the radius of the torus tube.centerRadius
- The distance from the center of the torus hole to the center of the torus tube.
-
-
Method Details
-
isViewFromInside
public boolean isViewFromInside()- Returns:
- true if the normals are inverted to point into the torus so that the face is oriented for a viewer inside the torus. false (the default) for exterior viewing.
-
setViewFromInside
public void setViewFromInside(boolean viewInside) - Parameters:
viewInside
- if true, the normals are inverted to point into the torus so that the face is oriented for a viewer inside the torus. Default is false (for outside viewing)
-
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:
-