Package com.ardor3d.scenegraph.shape
Class Extrusion
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.scenegraph.shape.Extrusion
- All Implemented Interfaces:
Pickable
,Hintable
,Renderable
,Savable
An extrusion of a 2D object (
Line
) along a path (List of Vector3). Either a convenience constructor can be
used or the updateGeometry
method. It is also capable of doing a
cubic spline interpolation for a list of supporting points-
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
ConstructorDescriptionDefault Constructor.Extrusion
(Line shape, List<ReadOnlyVector3> path, ReadOnlyVector3 up) Convenience constructor.Creates an empty named Extrusion.Extrusion
(String name, Line shape, List<ReadOnlyVector3> path, ReadOnlyVector3 up) Convenience constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateGeometry
(Line shape, List<ReadOnlyVector3> path, boolean closed, ReadOnlyVector3 up) Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.void
updateGeometry
(Line shape, List<ReadOnlyVector3> points, int segments, boolean closed, ReadOnlyVector3 up) Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero.void
updateGeometry
(Line shape, List<ReadOnlyVector3> points, int segments, ReadOnlyVector3 up) Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero.void
updateGeometry
(Line shape, List<ReadOnlyVector3> path, ReadOnlyVector3 up) Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.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, read, render, render, renderArrays, renderVBO, reorderIndices, reorderVertexData, reorderVertexData, setDefaultColor, setDefaultColor, setLightState, setMeshData, setModelBound, setModelBound, setRandomColors, setSolidColor, setVisible, sortLights, supportsBoundsIntersectionRecord, supportsPrimitivesIntersectionRecord, updateModelBound, updateWorldBound, write
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
-
Constructor Details
-
Extrusion
public Extrusion()Default Constructor. Creates an empty Extrusion. -
Extrusion
Creates an empty named Extrusion.- Parameters:
name
- name
-
Extrusion
Convenience constructor. CallsupdateGeometry
.- Parameters:
shape
- seeupdateGeometry
path
- seeupdateGeometry
up
- up vector
-
Extrusion
Convenience constructor. Sets the name and callsupdateGeometry
.- Parameters:
name
- nameshape
- seeupdateGeometry
path
- seeupdateGeometry
up
- up vector
-
-
Method Details
-
updateGeometry
Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.- Parameters:
shape
- an instance of Line that describes the 2D shapepath
- a list of vectors that describe the path the shape should be extrudedup
- up vector
-
updateGeometry
public void updateGeometry(Line shape, List<ReadOnlyVector3> path, boolean closed, ReadOnlyVector3 up) Update vertex, color, index and texture buffers (0) to contain an extrusion of shape along path.- Parameters:
shape
- an instance of Line that describes the 2D shapepath
- a list of vectors that describe the path the shape should be extrudedclosed
- true to connect first and last pointup
- up vector
-
updateGeometry
public void updateGeometry(Line shape, List<ReadOnlyVector3> points, int segments, ReadOnlyVector3 up) Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero. Then callsupdateGeometry(Line, List, ReadOnlyVector3)
with this path.- Parameters:
shape
- an instance of Line that describes the 2D shapepoints
- a list of supporting points for the spline interpolationsegments
- number of resulting path segments per supporting pointup
- up vector
-
updateGeometry
public void updateGeometry(Line shape, List<ReadOnlyVector3> points, int segments, boolean closed, ReadOnlyVector3 up) Performs cubic spline interpolation to find a path through the supporting points where the second derivative is zero. Then callsupdateGeometry(Line, List, boolean, ReadOnlyVector3)
with this path.- Parameters:
shape
- an instance of Line that describes the 2D shapepoints
- a list of supporting points for the spline interpolationsegments
- number of resulting path segments per supporting pointclosed
- true to close the shape (connect last and first point)up
- up vector
-