Unit CastleNURBS
Description
Warning: this symbol is deprecated: soon this unit will be renamed to CastleInternalNurbs; you should use NURBS only through the X3D nodes, like TNurbsCurveNode or TNurbsPatchSurfaceNode
Common utilities for NURBS curves and surfaces.
Uses
Overview
Classes, Interfaces, Objects and Records
Name  Description 

Class TNurbsBasisCalculator 
Calculate NURBS basis functions. 
Class TNurbsCurveCalculator 
Calculate point on a NURBS curve. 
Class TNurbsSurfaceCalculator 
Calculate point on a NURBS surface. 
Class EInvalidPiecewiseBezierCount 
Functions and Procedures
function ActualTessellation(const Tessellation: Integer; const Dimension: Cardinal): Cardinal; 
function NurbsCurvePoint(const Points: TVector3List; const U: Single; const Order: Cardinal; const Knot, Weight: TDoubleList; const Tangent: PVector3): TVector3; 
function NurbsSurfacePoint(const Points: TVector3List; const UDimension, VDimension: Cardinal; const U, V: Single; const UOrder, VOrder: Cardinal; const UKnot, VKnot, Weight: TDoubleList; const Normal: PVector3): TVector3; 
procedure NurbsKnotIfNeeded(Knot: TDoubleList; const Dimension, Order: Cardinal; const Kind: TNurbsKnotKind); 
function NurbsBoundingBox(Point: TVector3List; Weight: TDoubleList): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TSingleList): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TDoubleList; const Transform: TMatrix4): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TSingleList; const Transform: TMatrix4): TBox3D; overload; 
Types
TDoubleArray = array of Double; 
TNurbsKnotKind = (...); 
Description
Functions and Procedures
function ActualTessellation(const Tessellation: Integer; const Dimension: Cardinal): Cardinal; 
Calculate the tessellation (number of NURBS points generated). This follows X3D spec for "an implementation subdividing the surface into an equal number of subdivision steps". Give value of tessellation field, and count of controlPoints. Returned value is for sure > 0 (never exactly 0). 
function NurbsCurvePoint(const Points: TVector3List; const U: Single; const Order: Cardinal; const Knot, Weight: TDoubleList; const Tangent: PVector3): TVector3; 
Return point on NURBS curve. Requires:
Weight will be used only if it has the same length as Points.Count. Otherwise, weight = 1.0 (that is, defining nonrational curve) will be used (this follows X3D spec). Tangent, if nonnil, will be set to the direction at given point of the curve, pointing from the smaller to larger knot values. It will be normalized. This can be directly useful to generate orientations by X3D NurbsOrientationInterpolator node. 
function NurbsSurfacePoint(const Points: TVector3List; const UDimension, VDimension: Cardinal; const U, V: Single; const UOrder, VOrder: Cardinal; const UKnot, VKnot, Weight: TDoubleList; const Normal: PVector3): TVector3; 
Return point on NURBS surface. Requires:
Weight will be used only if it has the same length as UDimension * VDimension. Otherwise, weight = 1.0 (that is, defining nonrational curve) will be used (this follows X3D spec). Normal, if nonnil, will be set to the normal at given point of the surface. It will be normalized. You can use this to pass these normals to rendering. Or to generate normals for X3D NurbsSurfaceInterpolator node. 
procedure NurbsKnotIfNeeded(Knot: TDoubleList; const Dimension, Order: Cardinal; const Kind: TNurbsKnotKind); 
Calculate a default knot, if Knot doesn't already have required number of items. After this, it's guaranteed that Knot.Count is Dimension + Order (just as required by NurbsCurvePoint, NurbsSurfacePoint). Exceptions raised

function NurbsBoundingBox(Point: TVector3List; Weight: TDoubleList): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TSingleList): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TDoubleList; const Transform: TMatrix4): TBox3D; overload; 
function NurbsBoundingBox(Point: TVector3List; Weight: TSingleList; const Transform: TMatrix4): TBox3D; overload; 
Types
TDoubleArray = array of Double; 
TNurbsKnotKind = (...); 
Type of NURBS knot vector to generate. Values

Generated by PasDoc 0.15.0.