BodyRail Class
This class represents a spline along which an arbitrary rigid body can be moved. For example, it allows to create a physically simulated train moving along the railtrack. BodyRigid and BodyRail should be connected together with JointRail.
BodyRail Class
This class inherits from BodyMembers
BodyRail ()
Constructor. Creates a rail body with default properties.BodyRail (Object object)
Constructor. Creates a rail body with default properties for a given object.Arguments
- Object object - Object represented with the new rail body.
quat getClosestOrientation (vec3 position)
Finds the point on the spline which is the closest to the given reference point and returns orientation set by the spline in it.Arguments
- vec3 position - Coordinates of the reference point.
Return value
Orientation set by the spline in the found point.vec3 getClosestPosition (vec3 position)
Finds the point on the spline which is the closest to the given reference point.Arguments
- vec3 position - Coordinates of the reference point.
Return value
World coordinates of the found point on the spline.string getSplineName ()
Returns a name of the spline along which physical objects are moving.Return value
Path to the spline file.void setSplineName (string name)
Sets a spline along which physical objects will be moving.Arguments
- string name - Path to the spline file.
Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter