This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WorldTransformPath Class

Header: #include <UnigineWorlds.h>
Inherits from: Node

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#

  • UnigineScript API sample <UnigineSDK>/data/samples/worlds/path_00
  • UnigineScript API sample <UnigineSDK>/data/samples/physics/car_02

WorldTransformPath Class

Members


static WorldTransformPathPtr create ( const char * name, int unique = 0 ) #

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

Arguments

  • const char * name - Path to the *.path file.
  • int unique - 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

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.

int getLoop ( ) const#

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

Return value

1 if the transformation is looped; otherwise, 0.

void setOrientation ( int orientation ) #

Sets a value indicating if an object should be oriented along the path. When this option is enabled the complete transformation matrix (position, rotation, and scale) is taken into account when calculating intermediate transformation between the frames. When disabled - only the intermediate position between the frames is used, while keeping object's scale and rotation.

Arguments

  • int orientation - 1 to orient an object along the path; 0 to keep the initial orientation of the object. The default value is 1.

int getOrientation ( ) const#

Returns a value indicating if an object is oriented along the path. When this option is enabled the complete transformation matrix (position, rotation, and scale) is taken into account when calculating intermediate transformation between the frames. When disabled - only the intermediate position between the frames is used, while keeping object's scale and rotation.

Return value

1 if an object is oriented along the path; 0 if the object initial orientation is kept. The default value is 1.

Ptr<Path> getPath ( ) const#

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.

void setPathName ( const char * name, int unique = 0 ) #

Reloads the internal path transformation.

Arguments

  • const char * name - The path name to be set.
  • int unique - 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.

const char * getPathName ( ) const#

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

Return value

The path name.

bool isPlaying ( ) const#

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

Return value

true if the transformation is played; otherwise, false.

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.

float getSpeed ( ) const#

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

Return value

The playback speed.

bool isStopped ( ) const#

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

Return value

true if the transformation is stopped; otherwise, false.

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.

float getTime ( ) const#

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

Return value

The playback time.

void play ( ) #

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

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.

static int type ( ) #

Returns the type of the node.

Return value

World type identifier.

void setUpdateDistanceLimit ( float limit ) #

Sets the distance from the camera within which the object should be updated.

Arguments

  • float limit - Distance from the camera within which the object should be updated.

float getUpdateDistanceLimit ( ) const#

Returns the distance from the camera within which the object should be updated.

Return value

Distance from the camera within which the object should be updated.
Last update: 2024-08-16
Build: ()