Adobe.com
Contents Suites Classes Class Index Member Index

AIPathConstructionSuite Struct Reference
[API Suite List]

Utilities to convert paths to and from line segments. More...

#include <AIPathConstruction.h>

List of all members.

Public Attributes

AIAPI AIErr(* CurvesToPoints )(ai::int32 segmentCount, AIPathSegment *segments, ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal maxPointDistance, AIReal flatness, AIPathConstructionMemoryObject *memory)
 Converts a sequence of path segments describing a single open path to a sequence of points that describe an open polygon approximating the path.
AIAPI AIErr(* CurveToPointsT )(AIPathSegment *startSegment, AIPathSegment *endSegment, ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal **tArray, AIReal maxPointDistance, AIReal flatness, AIPathConstructionMemoryObject *memory)
 Converts a single curve to a sequence of points and corresponding T values that describe an open polygon approximating the curve.
AIAPI AIErr(* PointsToCurves )(ai::int32 *pointCount, AIPathConstructionPoint *points, ai::int32 *segmentCount, AIPathSegment **segments, AIReal *tolerance, AIReal *threshold, ai::int16 *cornerRadius, AIReal *scale, AIPathConstructionMemoryObject *memory)
 Converts a sequence of points describing a single open polygon to a sequence of path segments describing an open path approximating the polygon.
AIAPI AIErr(* ReducePathSegments )(AIArtHandle path, AIReal flatness, AIPathConstructionMemoryObject *memory)
 Modifies the segments of a path by converting them to a series of points and then re-fitting curves to the points.

Detailed Description

Utilities to convert paths to and from line segments.


Member Data Documentation

AIAPI AIErr(* AIPathConstructionSuite::CurvesToPoints)(ai::int32 segmentCount, AIPathSegment *segments, ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal maxPointDistance, AIReal flatness, AIPathConstructionMemoryObject *memory)

Converts a sequence of path segments describing a single open path to a sequence of points that describe an open polygon approximating the path.

A corner segment corresponds to a corner point. For intermediate points, the corner state depends on how your memory allocator fills the block that it allocates.

Parameters:
segmentCount The number of segments in the path.
segments The segments, an array of size segmentCount.
pointCount [out] A buffer in which to return the number of points in the polygon.
points [out] A buffer in which to return a pointer to the point set, an array of size pointCount.
maxPointDistance An upper bound on the distance between successive point samples.
flatness An upper bound on the error between the line segments and the true curve.
memory A developer-defined memory management object to use for the conversion.
AIAPI AIErr(* AIPathConstructionSuite::CurveToPointsT)(AIPathSegment *startSegment, AIPathSegment *endSegment, ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal **tArray, AIReal maxPointDistance, AIReal flatness, AIPathConstructionMemoryObject *memory)

Converts a single curve to a sequence of points and corresponding T values that describe an open polygon approximating the curve.

A corner segment corresponds to a corner point. For intermediate points, the corner state depends on how your memory allocator fills the block that it allocates.

Parameters:
startSegment The pointer to first segment of the curve.
endSegment The pointer to second segment of the curve.
pointCount [out] A buffer in which to return the number of points in the polygon.
points [out] A buffer in which to return a pointer to the point set, an array of size pointCount.
tArray [out] A buffer in which to return a pointer to the T values corresponding to each point in points, an array of size pointCount.
maxPointDistance An upper bound on the distance between successive point samples.
flatness An upper bound on the error between the line segments and the true curve.
memory A developer-defined memory management object to use for the conversion.
AIAPI AIErr(* AIPathConstructionSuite::PointsToCurves)(ai::int32 *pointCount, AIPathConstructionPoint *points, ai::int32 *segmentCount, AIPathSegment **segments, AIReal *tolerance, AIReal *threshold, ai::int16 *cornerRadius, AIReal *scale, AIPathConstructionMemoryObject *memory)

Converts a sequence of points describing a single open polygon to a sequence of path segments describing an open path approximating the polygon.

The algorithm used is best suited to generating curves from points that were produced by sampling a path. It is not well suited for samples of hand drawn points.

Parameters:
pointCount The number of points in the polygon.
points The point set, an array of size pointCount.
segmentCount [out] A buffer in which to return the number of segments in the path.
segments [out] A buffer in which to return a pointer to the segments, an array of size segmentCount.
tolerance [in] Optional. A pointer to the fit factor. Default is 1.0. A smaller factor gives a more exact fit and more segments, a larger factor gives a less exact fit and fewer segments.
threshold Not used. Pass NULL.
cornerRadius [in] Optional. A pointer to the corner radius value. Default is 4. If, at any point in the fitted curve, the radius of an inscribed circle that has the same tangent and curvature is less than this radius, a corner point is generated there; otherwise the path is smooth at that point. Note that this is not the same as the corner-or-smooth attribute that controls whether direction handles are permanently linked together when they are later edited. Rather, it is whether the direction handles are allowed to differ in the generated curve. For an illustration of the radius of curvature of a path at a point, see http://mathworld.wolfram.com/OsculatingCircle.html
scale [in] Optional. A pointer to the scale factor. Default is 1.0. Input points and other input units (such as the corner radius) are multiplied by this factor.
memory A developer-defined memory management object to use for the conversion.

Modifies the segments of a path by converting them to a series of points and then re-fitting curves to the points.

In some cases this can reduce the total number of path segments, especially if many are redundant. Any corner segments are preserved.

Parameters:
path The path object.
flatness An upper bound on the error between the line segments and the true curve.
memory A developer-defined memory management object to use for the conversion.

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


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks