|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.curve.Curve
com.jme.curve.CatmullRomCurve
public class CatmullRomCurve
CatmullRomCurve
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary |
---|
Fields inherited from class com.jme.curve.Curve |
---|
steps |
Fields inherited from class com.jme.scene.Geometry |
---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
Constructor Summary | |
---|---|
CatmullRomCurve()
|
|
CatmullRomCurve(java.lang.String name)
Constructor instantiates a new CatmullRomCurve object. |
|
CatmullRomCurve(java.lang.String name,
Vector3f[] controlPoints)
Constructor instantiates a new CatmullRomCurve object. |
Method Summary | |
---|---|
void |
findCollisions(Spatial scene,
CollisionResults results)
checks this spatial against a second spatial, any collisions are stored in the results object. |
void |
findPick(Ray toTest,
PickResults results)
Check if this geom intersects the ray if yes add it to the results. |
Matrix3f |
getOrientation(float time,
float precision)
getOrientation calculates the rotation matrix for any given
point along to the line to still be facing in the direction of the line. |
Matrix3f |
getOrientation(float time,
float precision,
Vector3f up)
getOrientation calculates the rotation matrix for any given
point along to the line to still be facing in the direction of the line. |
Vector3f |
getPoint(float time)
getPoint calculates a point on the curve based on
the time, where time is [0, 1]. |
Vector3f |
getPoint(float time,
Vector3f point)
getPoint calculates a point on a Catmull-Rom curve from a
given time value within the interval [0, 1]. |
boolean |
hasCollision(Spatial scene,
boolean checkTriangles)
Checks this spatial against a second spatial for collisions. |
Methods inherited from class com.jme.curve.Curve |
---|
applyRenderState, draw, getSteps, read, setSteps, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Constructor Detail |
---|
public CatmullRomCurve()
public CatmullRomCurve(java.lang.String name)
CatmullRomCurve
object.
name
- the name of the scene element. This is required for identification
and comparision purposes.public CatmullRomCurve(java.lang.String name, Vector3f[] controlPoints)
CatmullRomCurve
object. The
control points that define the curve are supplied.
name
- the name of the scene element. This is required for identification
and comparision purposes.controlPoints
- the points that define the curve.Method Detail |
---|
public Matrix3f getOrientation(float time, float precision)
getOrientation
calculates the rotation matrix for any given
point along to the line to still be facing in the direction of the line.
getOrientation
in class Curve
time
- the current time (between 0 and 1)precision
- how accurate to (i.e. the next time) to check against.
Curve.getOrientation(float, float)
public Matrix3f getOrientation(float time, float precision, Vector3f up)
getOrientation
calculates the rotation matrix for any given
point along to the line to still be facing in the direction of the line. A
up vector is supplied, this keep the rotation matrix following the line,
but insures the object's up vector is not drastically changed.
getOrientation
in class Curve
time
- the current time (between 0 and 1)precision
- how accurate to (i.e. the next time) to check against.up
- the up vector to lock.
Curve.getOrientation(float, float)
public Vector3f getPoint(float time)
Curve
getPoint
calculates a point on the curve based on
the time, where time is [0, 1]. How the point is calculated is
defined by the subclass.
getPoint
in class Curve
time
- the time frame on the curve, [0, 1].
public Vector3f getPoint(float time, Vector3f point)
getPoint
calculates a point on a Catmull-Rom curve from a
given time value within the interval [0, 1]. If the value is zero or less,
the first control point is returned. If the value is one or more, the last
control point is returned. Using the equation of a Catmull-Rom Curve, the
point at the interval is calculated and returned.
getPoint
in class Curve
time
- the time frame on the curve: [0, 1].point
- the vector3f object to store the point in.
Curve.getPoint(float)
public void findCollisions(Spatial scene, CollisionResults results)
Spatial
findCollisions
in class Spatial
scene
- the scene to test against.results
- the results of the collisions.public boolean hasCollision(Spatial scene, boolean checkTriangles)
Spatial
hasCollision
in class Spatial
scene
- the scene to test against.checkTriangles
- check for collisions on triangle accuracy level
public void findPick(Ray toTest, PickResults results)
Geometry
findPick
in class Geometry
toTest
- ray to check intersection with. The direction of the ray must
be normalized (length 1).results
- result list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |