Class TCurve

Unit

Declaration

type TCurve = class(TObject)

Description

3D curve, a set of points defined by a continuous function Point for arguments within [TBegin, TEnd].

Hierarchy

Overview

Fields

Public nested const DefaultSegments = 32;

Methods

Protected procedure LoadFromElement(const E: TDOMElement); virtual;
Protected procedure SaveToStream(const Stream: TStream); virtual;
Public constructor Create;
Public function Point(const t: Float): TVector3; virtual; abstract;
Public function Point2D(const t: Float): TVector2;
Public function PointOfSegment(const i, Segments: Cardinal): TVector3;
Public class function LoadFromFile(const URL: string): TCurve;
Public function BoundingBox: TBox3D; virtual; abstract;
Public function GeometryNode(const Segments: Cardinal = DefaultSegments): TAbstractGeometryNode;

Properties

Public property TBegin: Single read FTBegin write FTBegin default 0;
Public property TEnd: Single read FTEnd write FTEnd default 1;

Description

Fields

Public nested const DefaultSegments = 32;
 

Methods

Protected procedure LoadFromElement(const E: TDOMElement); virtual;
 
Protected procedure SaveToStream(const Stream: TStream); virtual;
 
Public constructor Create;
 
Public function Point(const t: Float): TVector3; virtual; abstract;

Curve function, for each parameter value determine the 3D point. This determines the actual shape of the curve. This is the simplest approach to calculate points on a curve.

Public function Point2D(const t: Float): TVector2;
 
Public function PointOfSegment(const i, Segments: Cardinal): TVector3;

Curve function to work with rendered line segments begin/end points. This is simply a more specialized version of Point, it scales the argument such that you get Point(TBegin) for I = 0 and you get Point(TEnd) for I = Segments.

Public class function LoadFromFile(const URL: string): TCurve;

Load the first curve defined in given XML file. Hint: use https://castle-engine.io/curves_tool to design curves visually.

Public function BoundingBox: TBox3D; virtual; abstract;
 
Public function GeometryNode(const Segments: Cardinal = DefaultSegments): TAbstractGeometryNode;

Represent this curve as an X3D geometry node, that you can use to visualize this.

Properties

Public property TBegin: Single read FTBegin write FTBegin default 0;

The valid range of curve function argument. Must be TBegin <= TEnd.

Public property TEnd: Single read FTEnd write FTEnd default 1;
 

Generated by PasDoc 0.16.0.