Reference Source
public class | source

Path

Extends:

src/viewer/scene/paths/curve.js~Curve → Path

A complex curved path constructed from various Curve subtypes.

Constructor Summary

Public Constructor
public

constructor(owner: Component, cfg: *)

Member Summary

Public Members
public set

Sets the Curves in this Path.

public get

curves: *: *

Gets the Curves in this Path.

public get

Length of this Path, which is the cumulative length of all Curves currently in Path#curves.

public get

point: *: *

Gets point on this Path corresponding to the current value of Path#t.

public set

t(value: Number)

Sets the current point of progress along this Path.

public get

t: Number: *

Gets the current point of progress along this Path.

Method Summary

Public Methods
public

addCurve(curve: Curve)

Adds a Curve to this Path.

public

Destroys this Path.

public

getPoint(t: Number): *

Gets a point on this Path corresponding to the given progress position.

Public Constructors

public constructor(owner: Component, cfg: *) source

Params:

NameTypeAttributeDescription
owner Component
  • optional

Owner component. When destroyed, the owner will destroy this SectionPlane as well.

cfg *
  • optional

Path configuration

cfg.id String
  • optional

Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

cfg.paths String []
  • optional
  • default: []

IDs or instances of {{#crossLink "path"}}{{/crossLink}} subtypes to add to this Path.

cfg.t Number
  • optional
  • default: 0

Current position on this Path, in range between 0..1.

Public Members

public set curves source

Sets the Curves in this Path.

Default value is [].

public get curves: *: * source

Gets the Curves in this Path.

Return:

*

the Curves in this path.

public get length: Number: * source

Length of this Path, which is the cumulative length of all Curves currently in Path#curves.

Return:

Number

Length of this path.

public get point: *: * source

Gets point on this Path corresponding to the current value of Path#t.

Return:

*

The point.

public set t(value: Number) source

Sets the current point of progress along this Path.

Automatically clamps to range [0..1].

Default value is 0.

public get t: Number: * source

Gets the current point of progress along this Path.

Default value is 0.

Return:

Number

The current point of progress.

Public Methods

public addCurve(curve: Curve) source

Adds a Curve to this Path.

Params:

NameTypeAttributeDescription
curve Curve

The Curve to add.

public destroy() source

Destroys this Path.

public getPoint(t: Number): * source

Gets a point on this Path corresponding to the given progress position.

Params:

NameTypeAttributeDescription
t Number

Indicates point of progress along this curve, in the range [0..1].

Return:

*