Package com.jme3.scene.shape
Class Curve
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Curve
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
A
Curve
is a visual, line-based representation of a Spline
.
The underlying Spline will be sampled N times, where N is the number of
segments as specified in the constructor. Each segment will represent one
line in the generated mesh.-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class com.jme3.scene.Mesh
addMorphTarget, clearBuffer, clearCollisionData, clone, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTarget, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, read, removeMorphTarget, removeMorphTarget, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setStatic, setStreamed, updateBound, updateCounts, write
-
Constructor Details
-
Curve
protected Curve()Serialization only. Do not use. -
Curve
Create a curve mesh. Use a CatmullRom spline model that does not cycle.- Parameters:
controlPoints
- the control points to use to create this curvenbSubSegments
- the number of subsegments between the control points
-
Curve
Create a curve mesh from a Spline- Parameters:
spline
- the spline to usenbSubSegments
- the number of subsegments between the control points
-
-
Method Details
-
getLength
public float getLength()This method returns the length of the curve.- Returns:
- the length of the curve
-