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.

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;
 

Methods

Protected procedure LoadFromElement(const E: TDOMElement); override;
 
Protected procedure SaveToStream(const Stream: TStream); override;
 
Public function BoundingBox: TBox3D; override;

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

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.

Public constructor Create;

Constructor.

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.

Public destructor Destroy; override;
 
Public function ConvexHull: TVector3List;

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


Generated by PasDoc 0.16.0.