Castle Game Engine: CastleCurves: Class TControlPointsCurve

# Class TControlPointsCurve
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleCurves ## 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 TComponent T3D TCurve TControlPointsCurve ## Overview ### Fields
| `ControlPoints: TVector3SingleList;`
### Methods
| `procedure RenderControlPoints;`
| `function BoundingBox: TBox3D; override;`
| `procedure UpdateControlPoints; virtual;`
| `class function NiceClassName: string; virtual; abstract;`
| `procedure RenderConvexHull;`
| `constructor Create(const ATBegin, ATEnd: Float); virtual;`
| `constructor CreateDivideCasScriptCurve(CasScriptCurve: TCasScriptCurve; ControlPointsCount: Cardinal);`
| `destructor Destroy; override;`
## Description ### Fields
| `ControlPoints: TVector3SingleList;`
### Methods
| `procedure RenderControlPoints;`
glBegin(GL_POINTS) + glVertex fo each ControlPoints[i] + glEnd.
| `function BoundingBox: TBox3D; override;`
This class provides implementation for `BoundingBox`: it is simply a `BoundingBox` of ControlPoints. Subclasses may (but don't have to) override this to calculate better (more accurate) `BoundingBox`.
| `procedure UpdateControlPoints; virtual;`
Always after changing ControlPoints and before calling Point, BoundingBox (and anything that calls them, e.g. Render calls Point) call this method. It recalculates necessary things. ControlPoints.Count must be >= 2. When overriding: always call inherited first.
| `class function NiceClassName: string; virtual; abstract;`
Nice class name, with spaces, starts with a capital letter. Much better than ClassName. Especially under FPC 1.0.x where ClassName is always uppercased.
| `procedure RenderConvexHull;`
do glBegin(GL_POLYGON), glVertex(v)..., glEnd, where glVertex are points of Convex Hull of ControlPoints (ignoring Z-coord of ControlPoints).
| `constructor Create(const ATBegin, ATEnd: Float); virtual;`
Constructor. This is virtual because it's called by CreateDivideCasScriptCurve. It's also useful in many places in curves.lpr.
| `constructor CreateDivideCasScriptCurve(CasScriptCurve: TCasScriptCurve; ControlPointsCount: Cardinal);`
Calculates ControlPoints taking Point(i, ControlPointsCount-1) for i in [0 .. ControlPointsCount-1] from CasScriptCurve. TBegin and TEnd are copied from CasScriptCurve.
| `destructor Destroy; override;`
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:12