Unit CastleCurves
Description
3D curves (TCurve and basic descendants).
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
function CubicBezier1D(T: Single; const Points: TVector4): Single; |
Cubic (4 control points) Bezier curve (with all weights equal) in 1D.
|
function CubicBezier2D(T: Single; const Points: TCubicBezier2DPoints): TVector2; |
Cubic (4 control points) Bezier curve (with all weights equal) in 2D.
|
function CubicBezier3D(T: Single; const Points: TCubicBezier3DPoints): TVector3; |
Cubic (4 control points) Bezier curve (with all weights equal) in 3D.
|
function CatmullRomSpline(const X: Single; const Loop: boolean; const Arguments: TSingleList; const Values: TSingleList): Single; |
Catmull-Rom spline. Nice way to have a function that for certain arguments reaches certain values, and between interpolates smoothly.
Catmull-Rom splines are a special case of cubic Hermite splines, see https://en.wikipedia.org/wiki/Cubic_Hermite_spline .
|
function CatmullRom(const V0, V1, V2, V3, X: Single): Single; |
Catmull-Rom spline low-level function. For X in [0..1], the curve values change from V1 to V2. V0 and V3 are curve values outside the [0..1] range, used to calculate tangents.
See http://www.mvps.org/directx/articles/catmull/.
See also
- CatmullRomSpline
- Catmull-Rom spline.
|
function HermiteSpline(const X: Single; const Loop: boolean; const Arguments, Values, Tangents: TSingleList): Single; |
Hermite spline. Nice way to have a function that for certain arguments reaches certain values, and between interpolates smoothly. Requires specifying tangent values (use CatmullRomSpline or HermiteTenseSpline to use automatic tangents).
|
function HermiteTenseSpline(const X: Single; const Loop: boolean; const Arguments, Values: TSingleList): Single; |
Hermite spline with tangents zero (it will be horizontal at control points). Nice way to have a function that for certain arguments reaches certain values, and between interpolates smoothly.
This is equivalent (for faster) to using HermiteSpline with all tangents equal to zero.
This is called a "cardinal spline", a special case of Hermite spline, with all tangents calculated with "tension" parameter equal to 1 (maximum), which means that all tangents are simply zero (horizontal). See https://en.wikipedia.org/wiki/Cubic_Hermite_spline for math behind this.
|
Types
TCubicBezier2DPoints = array [0..3] of TVector2; |
|
TCubicBezier3DPoints = array [0..3] of TVector3; |
|
Generated by PasDoc 0.16.0.