|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.cinematic.events.AbstractCinematicEvent
com.jme3.cinematic.events.MotionTrack
public class MotionTrack
A MotionTrack is a control over the spatial that manage the position and direction of the spatial while following a motion Path You must first create a MotionPath and then create a MotionTrack to associate a spatial and the path.
入れ子のクラスの概要 | |
---|---|
static class |
MotionTrack.Direction
Enum for the different type of target direction behavior |
コンストラクタの概要 | |
---|---|
MotionTrack()
Create MotionTrack, when using this constructor don't forget to assign spatial and path |
|
MotionTrack(Spatial spatial,
MotionPath path)
Creates a MotionPath for the given spatial on the given motion path |
|
MotionTrack(Spatial spatial,
MotionPath path,
float initialDuration)
Creates a MotionPath for the given spatial on the given motion path |
|
MotionTrack(Spatial spatial,
MotionPath path,
float initialDuration,
LoopMode loopMode)
Creates a MotionPath for the given spatial on the given motion path |
|
MotionTrack(Spatial spatial,
MotionPath path,
LoopMode loopMode)
Creates a MotionPath for the given spatial on the given motion path |
メソッドの概要 | |
---|---|
Control |
cloneForSpatial(Spatial spatial)
Clone this control for the given spatial |
float |
getCurrentValue()
this method is meant to be called by the motion path only |
int |
getCurrentWayPoint()
this method is meant to be called by the motion path only |
Vector3f |
getDirection()
returns the direction the spatial is moving |
MotionTrack.Direction |
getDirectionType()
returns the direction type of the target |
MotionPath |
getPath()
retun the motion path this control follows |
Quaternion |
getRotation()
returns the rotation of the target |
Spatial |
getSpatial()
|
void |
initEvent(Application app,
Cinematic cinematic)
|
boolean |
isEnabled()
|
boolean |
needsDirection()
this method is meant to be called by the motion path only |
void |
onPause()
|
void |
onPlay()
|
void |
onStop()
|
void |
onUpdate(float tpf)
|
void |
read(JmeImporter im)
|
void |
render(RenderManager rm,
ViewPort vp)
Should be called prior to queuing the spatial by the RenderManager. |
void |
setCurrentValue(float currentValue)
this method is meant to be called by the motion path only |
void |
setCurrentWayPoint(int currentWayPoint)
this method is meant to be called by the motion path only |
void |
setDirection(Vector3f direction)
Sets the direction of the spatial This method is used by the motion path. |
void |
setDirectionType(MotionTrack.Direction directionType)
Sets the direction type of the target On each update the direction given to the target can have different behavior See the Direction Enum for explanations |
void |
setEnabled(boolean enabled)
|
void |
setLookAt(Vector3f lookAt,
Vector3f upVector)
Set the lookAt for the target This can be used only if direction Type is Direction.LookAt |
void |
setPath(MotionPath path)
Sets the motion path to follow |
void |
setRotation(Quaternion rotation)
sets the rotation of the target This can be used only if direction Type is Direction.PathAndRotation or Direction.Rotation With PathAndRotation the target will face the direction of the path multiplied by the given Quaternion. |
void |
setSpatial(Spatial spatial)
|
void |
update(float tpf)
Updates the control. |
void |
write(JmeExporter ex)
|
クラス com.jme3.cinematic.events.AbstractCinematicEvent から継承されたメソッド |
---|
addListener, getDuration, getInitalDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, internalUpdate, pause, play, removeListener, setInitalDuration, setInitialDuration, setLoopMode, setSpeed, stop |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public MotionTrack()
public MotionTrack(Spatial spatial, MotionPath path)
spatial
- path
- public MotionTrack(Spatial spatial, MotionPath path, float initialDuration)
spatial
- path
- public MotionTrack(Spatial spatial, MotionPath path, LoopMode loopMode)
spatial
- path
- public MotionTrack(Spatial spatial, MotionPath path, float initialDuration, LoopMode loopMode)
spatial
- path
- メソッドの詳細 |
---|
public void update(float tpf)
Control
の記述:
Control
内の update
tpf
- Time per frame.public void initEvent(Application app, Cinematic cinematic)
CinematicEvent
内の initEvent
AbstractCinematicEvent
内の initEvent
public void onUpdate(float tpf)
AbstractCinematicEvent
内の onUpdate
public void write(JmeExporter ex) throws java.io.IOException
Savable
内の write
AbstractCinematicEvent
内の write
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
Savable
内の read
AbstractCinematicEvent
内の read
java.io.IOException
public boolean needsDirection()
public Control cloneForSpatial(Spatial spatial)
Control
内の cloneForSpatial
spatial
-
public void onPlay()
AbstractCinematicEvent
内の onPlay
public void onStop()
AbstractCinematicEvent
内の onStop
public void onPause()
AbstractCinematicEvent
内の onPause
public float getCurrentValue()
public void setCurrentValue(float currentValue)
public int getCurrentWayPoint()
public void setCurrentWayPoint(int currentWayPoint)
public Vector3f getDirection()
public void setDirection(Vector3f direction)
direction
- public MotionTrack.Direction getDirectionType()
public void setDirectionType(MotionTrack.Direction directionType)
directionType
- the direction typepublic void setLookAt(Vector3f lookAt, Vector3f upVector)
lookAt
- the position to look atupVector
- the up vectorpublic Quaternion getRotation()
public void setRotation(Quaternion rotation)
rotation
- the rotation quaternionpublic MotionPath getPath()
public void setPath(MotionPath path)
path
- public void setEnabled(boolean enabled)
Control
内の setEnabled
enabled
- Enable or disable the control. If disabled, update()
should do nothing.public boolean isEnabled()
Control
内の isEnabled
Control.setEnabled(boolean)
public void render(RenderManager rm, ViewPort vp)
Control
の記述:
Control
内の render
public void setSpatial(Spatial spatial)
Control
内の setSpatial
spatial
- the spatial to be controlled. This should not be called
from user code.public Spatial getSpatial()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |