Unigine::WorldTransformPath Class
This class is used to create a frame-based succession of transformations from a loaded path. For other nodes to move along with these transformations, they should be assigned as WorldTransformPath children.
The path is a spline along which an object can be moved.
See Also
- Article on UnigineScript Migration
Unigine::WorldTransformPath Class
Members
static int type ()
WorldTransformPath type.Return value
WorldTransformPath type identifier.static Ptr< WorldTransformPath > create (const NodePtr & node)
WorldTransformPath constructor.Arguments
- const NodePtr & node - Node smart pointer.
static Ptr< WorldTransformPath > create (const char * name, int dynamic = 0)
WorldTransformPath constructor.virtual Ptr< Node > getNode () const =0
Returns a node pointer.Return value
Node pointer.virtual PathPtr getPath () const =0
Returns the path, by which the transformation is defined. By using this function, you can edit the current path or change velocity or transformation of the object moving along the path.Return value
Instance of the Path class.virtual void setPathName (const char * name, int dynamic = 0) =0
Reloads the internal path transformation.Arguments
- const char * name - The path name to be set.
- int dynamic - The dynamic flag:
- 0 - If the reloaded path is changed, paths loaded from the same file will be also changed.
- 1 - If the reloaded path is changed, paths loaded from the same file won't be changed.
virtual const char * getPathName () const =0
Returns the name of the path, by which the transformation is defined.Return value
The path name.virtual void setRadius (float radius) =0
Sets the radius for applying the transformer defined by the path (valid only outside the view frustum). If the child object transformed according to the path gets outside the view frustum, but stays in the radius range, the playback of the transformation sequence does not stop.Arguments
- float radius - Radius of the sphere in units.
virtual float getRadius () const =0
Returns the radius of applying the transformer defined by the path (valid only outside the view frustum). If the child object transformed according to the path gets outside the view frustum, but stays in the radius range, the playback of the transformation sequence does not stop.Return value
Radius in units.virtual void setOrientation (int orientation) =0
Sets a value indicating if an object should be oriented along the path.Arguments
- int orientation - 1 to orient an object along the path; 0 to keep the initial orientation of the object.
virtual int getOrientation () const =0
Returns a value indicating if an object is oriented along the path.Return value
1 if an object is oriented along the path; 0 if the object initial orientation is kept.virtual void setLoop (int loop) =0
Sets a value indicating if the transformation defined by the path should be looped.Arguments
- int loop - 1 to loop the transformation defined by the path; 0 to play it only once.
virtual int getLoop () const =0
Returns a value indicating if the transformation defined by the path is looped.Return value
1 if the transformation is looped; otherwise, 0.virtual void setTime (float time) =0
Sets the time, from which the playback of the transformation defined by the path starts. If the object is oriented along the path, its transformation will be correspond to the path transformation at the specified time. Otherwise, only position of the object will change.Arguments
- float time - The playback time to be set.
virtual float getTime () const =0
Returns the time from which the playback of the transformation defined by the path starts.Return value
The playback time.virtual void setSpeed (float speed) =0
Sets the speed of playback of the transformation defined by the path.Arguments
- float speed - Speed of the transformation playback. Negative value controls reverse playback.
virtual float getSpeed () const =0
Returns the speed of playback of the transformation defined by the path.Return value
The playback speed.virtual void play () =0
Continues playback of the transformation defined by the path, if it is paused, or starts playback if it is stopped.virtual void stop () =0
Stops playback of the transformation defined by the path. This function saves the playback position so that playing of the transformation defined by the path can be resumed from the same point.virtual int isPlaying () const =0
Returns a value indicating if the transformation defined by the path is played.Return value
1 if the transformation is played; otherwise, 0.virtual int isStopped () const =0
Returns a value indicating if the transformation defined by the path is stopped.Return value
1 if the transformation is stopped; otherwise, 0.Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter