com.jme3.cinematic
クラス MotionPath

java.lang.Object
  上位を拡張 com.jme3.cinematic.MotionPath
すべての実装されたインタフェース:
Savable

public class MotionPath
extends java.lang.Object
implements Savable

Motion path is used to create a path between way points.


コンストラクタの概要
MotionPath()
          Create a motion Path
 
メソッドの概要
 void addListener(MotionPathListener listener)
          Adds a motion pathListener to the path
 void addWayPoint(Vector3f wayPoint)
          Addsa waypoint to the path
 void disableDebugShape()
          disable the display of the path and the waypoints
 void enableDebugShape(AssetManager manager, Node rootNode)
          enable the display of the path and the waypoints
 float getCurveTension()
          Returns the curve tension
 float getLength()
          retruns the length of the path in world units
 int getNbWayPoints()
          return the number of waypoints of this path
 Spline.SplineType getPathSplineType()
          return the type of spline used for the path interpolation for this path
 Vector3f getWayPoint(int i)
          returns the waypoint at the given index
 Vector3f interpolatePath(float tpf, MotionTrack control)
          interpolate the path giving the tpf and the motionControl
 boolean isCycle()
          returns true if the path is a cycle
 java.util.Iterator<Vector3f> iterator()
          returns an iterator on the waypoints collection
 void read(JmeImporter im)
           
 void removeListener(MotionPathListener listener)
          remove the given listener
 void removeWayPoint(int i)
          remove the waypoint at the given index from the path
 void removeWayPoint(Vector3f wayPoint)
          remove the waypoint from the path
 void setCurveTension(float curveTension)
          sets the tension of the curve (only for catmull rom) 0.0 will give a linear curve, 1.0 a round curve
 void setCycle(boolean cycle)
          Sets the path to be a cycle
 void setPathSplineType(Spline.SplineType pathSplineType)
          sets the type of spline used for the path interpolation for this path
 void triggerWayPointReach(int wayPointIndex, MotionTrack control)
           
 void write(JmeExporter ex)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

MotionPath

public MotionPath()
Create a motion Path

メソッドの詳細

interpolatePath

public Vector3f interpolatePath(float tpf,
                                MotionTrack control)
interpolate the path giving the tpf and the motionControl

パラメータ:
tpf -
control -
戻り値:

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException

addWayPoint

public void addWayPoint(Vector3f wayPoint)
Addsa waypoint to the path

パラメータ:
wayPoint - a position in world space

getLength

public float getLength()
retruns the length of the path in world units

戻り値:
the length

getWayPoint

public Vector3f getWayPoint(int i)
returns the waypoint at the given index

パラメータ:
i - the index
戻り値:
returns the waypoint position

removeWayPoint

public void removeWayPoint(Vector3f wayPoint)
remove the waypoint from the path

パラメータ:
wayPoint - the waypoint to remove

removeWayPoint

public void removeWayPoint(int i)
remove the waypoint at the given index from the path

パラメータ:
i - the index of the waypoint to remove

iterator

public java.util.Iterator<Vector3f> iterator()
returns an iterator on the waypoints collection

戻り値:

getPathSplineType

public Spline.SplineType getPathSplineType()
return the type of spline used for the path interpolation for this path

戻り値:
the path interpolation spline type

setPathSplineType

public void setPathSplineType(Spline.SplineType pathSplineType)
sets the type of spline used for the path interpolation for this path

パラメータ:
pathSplineType -

disableDebugShape

public void disableDebugShape()
disable the display of the path and the waypoints


enableDebugShape

public void enableDebugShape(AssetManager manager,
                             Node rootNode)
enable the display of the path and the waypoints

パラメータ:
manager - the assetManager
rootNode - the node where the debug shapes must be attached

addListener

public void addListener(MotionPathListener listener)
Adds a motion pathListener to the path

パラメータ:
listener - the MotionPathListener to attach

removeListener

public void removeListener(MotionPathListener listener)
remove the given listener

パラメータ:
listener - the listener to remove

getNbWayPoints

public int getNbWayPoints()
return the number of waypoints of this path

戻り値:

triggerWayPointReach

public void triggerWayPointReach(int wayPointIndex,
                                 MotionTrack control)

getCurveTension

public float getCurveTension()
Returns the curve tension

戻り値:

setCurveTension

public void setCurveTension(float curveTension)
sets the tension of the curve (only for catmull rom) 0.0 will give a linear curve, 1.0 a round curve

パラメータ:
curveTension -

setCycle

public void setCycle(boolean cycle)
Sets the path to be a cycle

パラメータ:
cycle -

isCycle

public boolean isCycle()
returns true if the path is a cycle

戻り値: