Class TCasScriptCurve

Unit

Declaration

type TCasScriptCurve = class(TCurve)

Description

Curve defined by explicitly giving functions for Point(t) = x(t), y(t), z(t) as CastleScript expressions.

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

Hierarchy

  • TObject
  • TCurve
  • TCasScriptCurve
Show Additional Members:

Overview

Constants

Public DefaultSegments = 32;

Methods

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 GeometryNode(const Segments: Cardinal = DefaultSegments): TAbstractGeometryNode;
Protected procedure LoadFromElement(const E: TDOMElement); override;
Protected procedure SaveToStream(const Stream: TStream); override;
Public function Point(const t: Float): TVector3; override;
Public function BoundingBox: TBox3D; override;
Public constructor Create;
Public destructor Destroy; override;

Properties

Public property TBegin: Single read FTBegin write FTBegin default 0;
Public property TEnd: Single read FTEnd write FTEnd default 1;
Public property XFunction: TCasScriptExpression index 0 read GetFunction write SetFunction;
Public property YFunction: TCasScriptExpression index 1 read GetFunction write SetFunction;
Public property ZFunction: TCasScriptExpression index 2 read GetFunction write SetFunction;
Public property TVariable: TCasScriptFloat read FTVariable write SetTVariable;
Public property SegmentsForBoundingBox: Cardinal read FSegmentsForBoundingBox write SetSegmentsForBoundingBox default 100;

Description

Constants

Public DefaultSegments = 32;

This item is declared in ancestor TCurve.

This item has no description.

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

Methods

Public function Point2D(const t: Float): TVector2;

This item is declared in ancestor TCurve.

This item has no description.

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

Public function PointOfSegment(const i, Segments: Cardinal): TVector3;

This item is declared in ancestor TCurve.

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.

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

Public class function LoadFromFile(const Url: String): TCurve;

This item is declared in ancestor TCurve.

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

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

Public function GeometryNode(const Segments: Cardinal = DefaultSegments): TAbstractGeometryNode;

This item is declared in ancestor TCurve.

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

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

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

This item has no description.

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

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

This item has no description.

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

Public function Point(const t: Float): TVector3; override;

This item has no description. Showing description inherited from TCurve.Point.

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.

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

Public function BoundingBox: TBox3D; override;

Simple bounding box. It is simply a BoundingBox of Point(i, SegmentsForBoundingBox) for i in [0 .. SegmentsForBoundingBox]. Subclasses may override this to calculate something more accurate.

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

Public constructor Create;

This item has no description.

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

Public destructor Destroy; override;

This item has no description.

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

Properties

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

This item is declared in ancestor TCurve.

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

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

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

This item is declared in ancestor TCurve.

This item has no description.

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

Public property XFunction: TCasScriptExpression index 0 read GetFunction write SetFunction;

XFunction, YFunction, ZFunction are functions based on variable 't'. Once set, these instances become owned by this class, do not free them yourself!

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

Public property YFunction: TCasScriptExpression index 1 read GetFunction write SetFunction;

This item has no description.

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

Public property ZFunction: TCasScriptExpression index 2 read GetFunction write SetFunction;

This item has no description.

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

Public property TVariable: TCasScriptFloat read FTVariable write SetTVariable;

This is the variable controlling 't' value, embedded also in XFunction, YFunction, ZFunction. This is NOT owned by this class, make sure to free it yourself!

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

Public property SegmentsForBoundingBox: Cardinal read FSegmentsForBoundingBox write SetSegmentsForBoundingBox default 100;

This item has no description.

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


Generated by PasDoc 0.17.0.snapshot.