Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Path3

Represents a 3D path made up of multiple 3D points

Hierarchy

  • Path3

Index

Constructors

constructor

  • 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

    Parameters

    • path: Vector3[]

      an array of Vector3, the curve axis of the Path3D

    • Optional firstNormal: Vector3
    • Optional raw: boolean

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

    Returns Path3

Methods

getBinormals

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

    Returns Vector3[]

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

getCurve

  • Returns the Path3D array of successive Vector3 designing its curve.

    Returns Vector3[]

    the Path3D array of successive Vector3 designing its curve.

getDistances

  • getDistances(): number[]
  • Returns an array populated with distances (float) of the i-th point from the first curve point.

    Returns number[]

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

getNormals

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

    Returns Vector3[]

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

getTangents

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

    Returns Vector3[]

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

update

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

    Parameters

    • path: Vector3[]

      path which all values are copied into the curves points

    • Optional firstNormal: Vector3

      which should be projected onto the curve

    Returns Path3

    the same object updated.