|
||||||||||
| 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 |
|---|
collisionBits, cullHint, frustrumIntersects, geometricalControllers, 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,
int requiredOnBits)
checks this spatial against a second spatial, any collisions are stored in the results object. |
void |
findPick(Ray toTest,
PickResults results,
int requiredOnBits)
Check if this geometry 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,
int requiredOnBits)
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 Curvetime - 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 Curvetime - 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)
CurvegetPoint 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 Curvetime - 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 Curvetime - 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,
int requiredOnBits)
Spatial
findCollisions in class Spatialscene - the scene to test against.results - the results of the collisions.requiredOnBits - considered a collision only if these bits are 'on'
in both 'this' and the 'scene' spatial.
public boolean hasCollision(Spatial scene,
boolean checkTriangles,
int requiredOnBits)
Spatial
hasCollision in class Spatialscene - the scene to test against.checkTriangles - check for collisions on triangle accuracy levelrequiredOnBits - considered a collision only if these bits are 'on'
in both 'this' and the 'scene' spatial.
public void findPick(Ray toTest,
PickResults results,
int requiredOnBits)
Geometry
findPick in class GeometrytoTest - ray to check intersection with. The direction of the ray must
be normalized (length 1).results - result listrequiredOnBits - Collision will only be considered if 'this'
has these bits of its collision mask set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||