AICurveFittingSuite Struct Reference
[API Suite List]
This suite provides functions to fit a vector of sample points to a cubic Bezier curve.
More...
#include <AICurveFittingSuite.h>
List of all members.
Public Attributes |
AIAPI AIErr(* | FitTrajectoryWithPreset )(AICurveFittingTrajectorySampleVector *trajectory, AICurveFittingPreset preset, AIBoolean close, AIBoolean zoomAware, AICurveFittingPathSegmentVector *path) |
| Fits a vector of sample points to a cubic Bezier curve using a preset, as opposed to the more general function FitTrajectory(.
|
AIAPI AIErr(* | FitTrajectory )(AICurveFittingTrajectorySampleVector *trajectory, ai::int32 noiseFilterDegree, AIReal cornerAngleTolerance, AIReal smoothnessTolerance, AIReal fidelityTolerance, AICurveFittingPathSegmentVector *path) |
| Fits a vector of sample points to a cubic Bezier curve.
|
Detailed Description
This suite provides functions to fit a vector of sample points to a cubic Bezier curve.
Member Data Documentation
Fits a vector of sample points to a cubic Bezier curve.
- Parameters:
-
| trajectory | The vector of sample points. It is the client's responsibility to manage this vector. |
| noiseFilterDegree | An even integer [0, 2, 4, ...] that determines the amount of noise filtering to apply. 4 is typically used, 0 means no filtering. |
| cornerAngleTolerance | A real number [-1 1] equal to -cos(angle A in radians) such that if an angle less than A occurs in the trajectory, a corner is formed there. |
| smoothnessTolerance | A percentage [0 100] for the amount of smoothing to perform on the samples. 0 means no smoothing, 100 is the maximum amount of smoothing. |
| fidelityTolerance | A positive number for the constant that determines the maximum amount by which a fitting is allowed to deviate from the sample points. |
| path | [out] A buffer in which to return the vector of fitted path segments. Memory for this buffer is allocated internally using SPBasic->AllocateBlock. It is the client's responsibility to free it using SPBasic->FreeBlock. |
Fits a vector of sample points to a cubic Bezier curve using a preset, as opposed to the more general function FitTrajectory(.
..) below. Some, and not all, of the presets are equivalent to sets of parameters of the general function. There are no equivalent sets for presets towards the smoother end of the spectrum that use a different algorithm to give better results. Use the general function only when none of the provided presets give the required fit.
- Parameters:
-
| trajectory | The vector of sample points. It is the client's responsibility to manage this vector. |
| preset | The preset for fitting. |
| close | Whether the fitted path will be closed (true) or open (false). |
| zoomAware | True to take the the zoom factor of the document into account during the fitting. |
| path | [out] A buffer in which to return the vector of fitted path segments. Memory for this buffer is allocated internally using SPBasic->AllocateBlock. It is the client's responsibility to free it using SPBasic->FreeBlock. |
The documentation for this struct was generated from the following file: