Drag[en]gine Script Module DragonScript Script API
1.0

Curve distance mapping. More...
Public Member Functions  
Constructors  
CurveDistanceMapping  new () 
Create curve distance mapping. More...  
CurveDistanceMapping  new (CurveDistanceMapping copy) 
Create curve distance mapping. More...  
Management  
float  getResolution () 
Resolution in meters used for sampling. More...  
float  getLength () 
Length of sampled curve in meters. More...  
float  map (float distance) 
Get evaluation parameter for distance. More...  
void  clear () 
Clear mapping. More...  
void  init (CurveBezier3D curve) 
Initialize mapping using a 3d bezier curve. More...  
void  init (CurveBezier3D curve, float resolution, int segmentSamples) 
Initialize mapping using a 3d bezier curve. More...  
Curve distance mapping.
Samples a curve by distance for evaluating curves on a distance basis instead of local coordinates.
void clear  (  ) 
Clear mapping.
float getLength  (  ) 
Length of sampled curve in meters.
float getResolution  (  ) 
Resolution in meters used for sampling.
void init  (  CurveBezier3D  curve  ) 
Initialize mapping using a 3d bezier curve.
Previous mapping parameters are overwritten. The method chooses resolution and segment sample count by examining the curve before sampling it.
void init  (  CurveBezier3D  curve, 
float  resolution,  
int  segmentSamples  
) 
Initialize mapping using a 3d bezier curve.
Previous mapping parameters are overwritten.
curve  Curve to sample from. 
resolution  Sample resolution in meters clamped to 1mm or larger. Smaller values increase memory consumption for the mapping table a lot for long curves. A good value is 0.1 resolution for curves less than 1m and larger for longer curves. Curves which are equally spaced already can use large resolution values while strongly not equally spaced curves require smaller resolution values to give good results. 
segmentSamples  Number of samples to take along curve segments. Higher sample counts increase accuracy of the mapping especially the estimated curve length. Higher sample counts increase processing time but do not increase memory consumption. Curves which are equally spaced can use small sample counts while strongly not equally spaced curves require higher sample counter to give good results. For curves which are mostly equally spaced or close to it a samples count of 10 is a good choice. For not so equally spaced curves higher values of 20 or more may be required. 
EInvalidParam  segmentSamples is less than 0. 
float map  (  float  distance  ) 
Get evaluation parameter for distance.
CurveDistanceMapping new  (  ) 
Create curve distance mapping.
CurveDistanceMapping new  (  CurveDistanceMapping  copy  ) 
Create curve distance mapping.