Castle Game Engine: CastleCurves: Class TCasScriptCurve

# Class TCasScriptCurve
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleCurves ## Declaration `type TCasScriptCurve = class(TCurve)` ## Description Curve defined by explicitly giving functions for Point(t) = x(t), y(t), z(t) as CastleScript expressions. ## Hierarchy TComponent T3D TCurve TCasScriptCurve ## Overview ### Fields
| `FTVariable: TCasScriptFloat;`
| `FFunction: array [0..2] of TCasScriptExpression;`
| `FBoundingBox: TBox3D;`
### Methods
| `function GetFunction(const Index: Integer): TCasScriptExpression;`
| `procedure SetFunction(const Index: Integer; const Value: TCasScriptExpression);`
| `procedure UpdateBoundingBox;`
| `function Point(const t: Float): TVector3Single; override;`
| `function BoundingBox: TBox3D; override;`
| `constructor Create(AOwner: TComponent); override;`
| `destructor Destroy; override;`
### Properties
| `property XFunction: TCasScriptExpression index 0 read GetFunction write SetFunction;`
| `property YFunction: TCasScriptExpression index 1 read GetFunction write SetFunction;`
| `property ZFunction: TCasScriptExpression index 2 read GetFunction write SetFunction;`
| `property TVariable: TCasScriptFloat read FTVariable write SetTVariable;`
| `property SegmentsForBoundingBox: Cardinal read FSegmentsForBoundingBox write SetSegmentsForBoundingBox default 100;`
## Description ### Fields
| `FTVariable: TCasScriptFloat;`
| `FFunction: array [0..2] of TCasScriptExpression;`
| `FBoundingBox: TBox3D;`
### Methods
| `function GetFunction(const Index: Integer): TCasScriptExpression;`
| `procedure SetFunction(const Index: Integer; const Value: TCasScriptExpression);`
| `procedure UpdateBoundingBox;`
| `function Point(const t: Float): TVector3Single; override;`
| `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.
| `constructor Create(AOwner: TComponent); override;`
| `destructor Destroy; override;`
### Properties
| `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!
| `property YFunction: TCasScriptExpression index 1 read GetFunction write SetFunction;`
| `property ZFunction: TCasScriptExpression index 2 read GetFunction write SetFunction;`
| `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!
| `property SegmentsForBoundingBox: Cardinal read FSegmentsForBoundingBox write SetSegmentsForBoundingBox default 100;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09