This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

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.

Notice
The path is a spline along which an object can be moved.

See Also

WorldTransformPath Class

This class inherits from Node

Members


WorldTransformPath (string name, int dynamic = 0)

Constructor. Creates a transformer defined by a path in world coordinates.

Arguments

  • string name - Path to the *.path file.
  • int dynamic - The dynamic flag:
    • 0 - If the path is changed in run-time, paths loaded from the same file will be also changed.
    • 1 - If the path is changed in run-time, paths loaded from the same file won't be changed

int getLoop ()

Returns a value indicating if the transformation defined by the path is looped.

Return value

1 if the transformation is looped; otherwise, 0.

int getOrientation ()

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.

string getPathName ()

Returns the name of the path, by which the transformation is defined.

Return value

The path name.

Path getPath ()

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.

float getRadius ()

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.

float getSpeed ()

Returns the speed of playback of the transformation defined by the path.

Return value

The playback speed.

float getTime ()

Returns the time from which the playback of the transformation defined by the path starts.

Return value

The playback time.

int isPlaying ()

Returns a value indicating if the transformation defined by the path is played.

Return value

1 if the transformation is played; otherwise, 0.

int isStopped ()

Returns a value indicating if the transformation defined by the path is stopped.

Return value

1 if the transformation is stopped; otherwise, 0.

void play ()

Continues playback of the transformation defined by the path, if it is paused, or starts playback if it is stopped.

void setLoop (int loop)

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.

void setOrientation (int orientation)

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.

void setPathName (string name, int dynamic = 0)

Reloads the internal path transformation.

Arguments

  • string 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.

void setRadius (float radius)

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.

void setSpeed (float speed)

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.

void setTime (float time)

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.

void stop ()

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.
Last update: 2017-07-03
Build: ()