Path3D

Description

class Path3D

Constructor

new Path3D(path, firstNormal, raw)

new Path3D(path, normal, raw)

Creates a Path3D. A Path3D is a logical math object, so not a mesh.

please read the description in the tutorial : http://doc.babylonjs.com/tutorials/How_to_use_Path3D

path : an array of Vector3, the curve axis of the Path3D

normal (optional) : Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.

raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.

Parameters

Name Type Description
path Vector3[]
optional firstNormal Nullable<Vector3>
optional raw boolean

Members

path : Vector3[]

Methods

getCurve() Vector3[]

Returns the Path3D array of successive Vector3 designing its curve.

getTangents() Vector3[]

Returns an array populated with tangent vectors on each Path3D curve point.

getNormals() Vector3[]

Returns an array populated with normal vectors on each Path3D curve point.

getBinormals() Vector3[]

Returns an array populated with binormal vectors on each Path3D curve point.

getDistances() number[]

Returns an array populated with distances (float) of the i-th point from the first curve point.

update(path, firstNormal) Path3D

Forces the Path3D tangent, normal, binormal and distance recomputation.

Returns the same object updated.

Parameters

Name Type Description
path Vector3[]
optional firstNormal Nullable<Vector3>