Class TControlPointsCurve

Unit

Declaration

type TControlPointsCurve = class(TCurve)

Description

A basic abstract class for curves determined my some set of ControlPoints. Note: it is not defined in this class any correspondence between values of T (argument for Point function) and ControlPoints.

Source: castlescript/castlecurves.pas (line 141).

Hierarchy

  • TObject
  • TCurve
  • TControlPointsCurve

Overview

Fields

Public ControlPoints: TVector3List;

Methods

Protected procedure LoadFromElement(const E: TDOMElement); override;
Protected procedure SaveToStream(const Stream: TStream); override;
Public function BoundingBox: TBox3D; override;
Public procedure UpdateControlPoints; virtual;
Public constructor Create;
Public constructor CreateFromEquation(CasScriptCurve: TCasScriptCurve; ControlPointsCount: Cardinal);
Public destructor Destroy; override;
Public function ConvexHull: TVector3List;

Description

Fields

Public ControlPoints: TVector3List;

This item has no description.

Source: castlescript/castlecurves.pas (line 164).

Methods

Protected procedure LoadFromElement(const E: TDOMElement); override;

This item has no description.

Source: castlescript/castlecurves.pas (line 161).

Protected procedure SaveToStream(const Stream: TStream); override;

This item has no description.

Source: castlescript/castlecurves.pas (line 162).

Public function BoundingBox: TBox3D; override;

Bounding box of the curve. In this class, it is simply a BoundingBox of ControlPoints.

Source: castlescript/castlecurves.pas (line 168).

Public procedure UpdateControlPoints; virtual;

Always after changing ControlPoints or TBegin or TEnd and before calling Point (or anything that uses Point, like BoundingBox) call this method. It recalculates necessary things. ControlPoints.Count must be >= 2.

When overriding: always call inherited first.

Source: castlescript/castlecurves.pas (line 176).

Public constructor Create;

Constructor.

Source: castlescript/castlecurves.pas (line 179).

Public constructor CreateFromEquation(CasScriptCurve: TCasScriptCurve; ControlPointsCount: Cardinal);

Calculate initial control points by sampling given TCasScriptCurve, with analytical curve equation. TBegin and TEnd are copied from CasScriptCurve.

Source: castlescript/castlecurves.pas (line 184).

Public destructor Destroy; override;

This item has no description.

Source: castlescript/castlecurves.pas (line 187).

Public function ConvexHull: TVector3List;

Calculate the convex hull. Caller is responsible for freeing the result.

Source: castlescript/castlecurves.pas (line 190).


Generated by PasDoc 0.17.0.snapshot.