Class InteractRing
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.extension.interact.widget.InteractRing
- All Implemented Interfaces:
Pickable
,Hintable
,Renderable
,Savable
Textured ring geometry, intended for use as a rotational handle.
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
protected float
protected float
protected int
protected int
protected float
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
ConstructorDescriptionInteractRing
(String name, int tessRings, int tessSteps, float radius, float width) InteractRing
(String name, int tessRings, int tessSteps, float radius, float width, float concaveValue) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
calculateVertexData
(int numStrips, int numPairs, int totalVerts, FloatBuffer crdBuf, FloatBuffer nrmBuf, FloatBuffer txcBuf) protected void
normalize
(int i, float[] nrm) void
read
(InputCapsule capsule) void
setConcaveValue
(float value) void
setRadius
(float radius, float width) void
setTexture
(Texture2D texture) Convenience method for setting texture without managing TextureState.void
setTextureMultiplier
(float vMult) void
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
-
_innerRadius
protected float _innerRadius -
_outerRadius
protected float _outerRadius -
_tessRings
protected int _tessRings -
_tessSteps
protected int _tessSteps -
_texMul
protected float _texMul -
_concaveValue
protected float _concaveValue
-
-
Constructor Details
-
InteractRing
public InteractRing() -
InteractRing
-
InteractRing
public InteractRing(String name, int tessRings, int tessSteps, float radius, float width, float concaveValue)
-
-
Method Details
-
setRadius
public void setRadius(float radius, float width) -
setTextureMultiplier
public void setTextureMultiplier(float vMult) - Parameters:
vMult
- new multiplier for v direction of texture coords (around ring)
-
setConcaveValue
public void setConcaveValue(float value) -
setTexture
Convenience method for setting texture without managing TextureState.- Parameters:
texture
- the new texture to set on unit 0.
-
updateGeometry
public void updateGeometry() -
normalize
protected void normalize(int i, float[] nrm) -
calculateVertexData
protected void calculateVertexData(int numStrips, int numPairs, int totalVerts, FloatBuffer crdBuf, FloatBuffer nrmBuf, FloatBuffer txcBuf) -
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:
-