Class TRationalBezierCurve

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TRationalBezierCurve = class(TControlPointsCurve)

Description

Rational Bezier curve (Bezier curve with weights). Note: for Bezier Curve ControlPoints.Count MAY be 1. (For TControlPointsCurve it must be >= 2)

Hierarchy

Overview

Fields

Public Weights: TFloatList;

Methods

Public procedure Split(const Proportion: Float; var B1, B2: TRationalBezierCurve);
Public function Point(const t: Float): TVector3Single; override;
Public class function NiceClassName: string; override;
Public procedure UpdateControlPoints; override;
Public constructor Create(const ATBegin, ATEnd: Float); override;
Public destructor Destroy; override;

Description

Fields

Public Weights: TFloatList;

Curve weights. Must always be Weights.Count = ControlPoints.Count. After changing Weights you also have to call UpdateControlPoints.

Methods

Public procedure Split(const Proportion: Float; var B1, B2: TRationalBezierCurve);

Splits this curve using Casteljau algorithm.

Under B1 and B2 returns two new, freshly created, bezier curves, such that if you concatenate them - they will create this curve. Proportion is something from (0; 1). B1 will be equal to Self for T in TBegin .. TMiddle, B2 will be equal to Self for T in TMiddle .. TEnd, where TMiddle = TBegin + Proportion * (TEnd - TBegin).

B1.ControlPoints.Count = B2.ControlPoints.Count = Self.ControlPoints.Count.

Public function Point(const t: Float): TVector3Single; override;
 
Public class function NiceClassName: string; override;
 
Public procedure UpdateControlPoints; override;
 
Public constructor Create(const ATBegin, ATEnd: Float); override;
 
Public destructor Destroy; override;