Options
All
• Public
• Public/Protected
• All

Class Curve3

A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space. A Curve3 is designed from a series of successive Vector3.

see

https://doc.babylonjs.com/how_to/how_to_use_curve3

• Curve3

Constructors

constructor

• A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space. A Curve3 is designed from a series of successive Vector3. Tuto : https://doc.babylonjs.com/how_to/how_to_use_curve3#curve3-object

Parameters

• points: Vector3[]

points which make up the curve

Methods

continueSearch playground for continue

• Returns a new instance of Curve3 object : var curve = curveA.continue(curveB); This new Curve3 is built by translating and sticking the curveB at the end of the curveA. curveA and curveB keep unchanged.

Parameters

• curve: DeepImmutable<Curve3>

the curve to continue from this curve

Returns Curve3

the newly constructed curve

getPointsSearch playground for getPoints

• Returns Vector3[]

the Curve3 stored array of successive Vector3

lengthSearch playground for length

• length(): number
• Returns number

the computed length (float) of the curve.

Static CreateCatmullRomSplineSearch playground for CreateCatmullRomSpline

• Returns a Curve3 object along a CatmullRom Spline curve :

Parameters

• points: DeepImmutable<Vector3[]>

(array of Vector3) the points the spline must pass through. At least, four points required

• nbPoints: number

(integer) the wanted number of points between each curve control points

• Optional closed: boolean

(boolean) optional with default false, when true forms a closed loop from the points

Returns Curve3

the created Curve3

Static CreateCubicBezierSearch playground for CreateCubicBezier

• Returns a Curve3 object along a Cubic Bezier curve : https://doc.babylonjs.com/how_to/how_to_use_curve3#cubic-bezier-curve

Parameters

• v0: DeepImmutable<Vector3>

(Vector3) the origin point of the Cubic Bezier

• v1: DeepImmutable<Vector3>

(Vector3) the first control point

• v2: DeepImmutable<Vector3>

(Vector3) the second control point

• v3: DeepImmutable<Vector3>

(Vector3) the end point of the Cubic Bezier

• nbPoints: number

(integer) the wanted number of points in the curve

Returns Curve3

the created Curve3

Static CreateHermiteSplineSearch playground for CreateHermiteSpline

• Returns a Curve3 object along a Hermite Spline curve : https://doc.babylonjs.com/how_to/how_to_use_curve3#hermite-spline

Parameters

• p1: DeepImmutable<Vector3>

(Vector3) the origin point of the Hermite Spline

• t1: DeepImmutable<Vector3>

(Vector3) the tangent vector at the origin point

• p2: DeepImmutable<Vector3>

(Vector3) the end point of the Hermite Spline

• t2: DeepImmutable<Vector3>

(Vector3) the tangent vector at the end point

• nbPoints: number

(integer) the wanted number of points in the curve

Returns Curve3

the created Curve3

• Returns a Curve3 object along a Quadratic Bezier curve : https://doc.babylonjs.com/how_to/how_to_use_curve3#quadratic-bezier-curve

Parameters

• v0: DeepImmutable<Vector3>

(Vector3) the origin point of the Quadratic Bezier

• v1: DeepImmutable<Vector3>

(Vector3) the control point

• v2: DeepImmutable<Vector3>

(Vector3) the end point of the Quadratic Bezier

• nbPoints: number

(integer) the wanted number of points in the curve

Returns Curve3

the created Curve3

Legend

• Constructor
• Property
• Method
• Property
• Method
• Inherited property
• Inherited method
• Static property
• Static method