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

  • TObject
  • TCurve

Overview

Methods

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

Properties

Public property TBegin: Single read FTBegin write FTBegin default 0;
Public property TEnd: Single read FTEnd write FTEnd default 1;
Public property DefaultSegments: Cardinal read FDefaultSegments write FDefaultSegments default 10;

Description

Methods

Protected procedure LoadFromElement(const E: TDOMElement); virtual;
 
Protected procedure SaveToStream(const Stream: TStream); virtual;
 
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.

Public function Point2D(const t: Float): TVector2;
 
Public function PointOfSegment(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 constructor Create;
 
Public class function LoadFromFile(const URL: string): TCurve;

Load the first curve defined in given XML file. Hint: use https://github.com/castle-engine/castle-engine/wiki/Curves-tool to design curves visually.

Public function BoundingBox: TBox3D; virtual; abstract;
 

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;
 
Public property DefaultSegments: Cardinal read FDefaultSegments write FDefaultSegments default 10;

Default number of segments, used when rendering by T3D interface (that is, Render(Frustum, TransparentGroup...) method.)


Generated by PasDoc 0.15.0.