Drag[en]gine Script Module DragonScript Script API  1.0
CurveDistanceMapping Class Reference

Curve distance mapping. More...

Inheritance diagram for CurveDistanceMapping:

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...
 

Detailed Description

Curve distance mapping.

Samples a curve by distance for evaluating curves on a distance basis instead of local coordinates.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ clear()

void clear ( )

Clear mapping.

§ getLength()

float getLength ( )

Length of sampled curve in meters.

§ getResolution()

float getResolution ( )

Resolution in meters used for sampling.

§ init() [1/2]

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.

§ init() [2/2]

void init ( CurveBezier3D  curve,
float  resolution,
int  segmentSamples 
)

Initialize mapping using a 3d bezier curve.

Previous mapping parameters are overwritten.

Parameters
curveCurve to sample from.
resolutionSample 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.
segmentSamplesNumber 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.
Exceptions
EInvalidParamsegmentSamples is less than 0.

§ map()

float map ( float  distance)

Get evaluation parameter for distance.

§ new() [1/2]

Create curve distance mapping.

§ new() [2/2]

Create curve distance mapping.


The documentation for this class was generated from the following file: