rprContextCreateCurve
Creates a set of curves.
A curve is a set of segments. A segment is always composed of four 3D points.
rpr_status rprContextCreateCurve( |
rpr_context context, |
rpr_curve * out_curve, |
|
size_t num_controlPoints, |
|
rpr_float const * controlPointsData, |
|
rpr_int controlPointsStride, |
|
size_t num_indices, |
|
rpr_uint curveCount, |
|
rpr_uint const * indicesData, |
|
rpr_float const * radius, |
|
rpr_float const * textureUV, |
|
rpr_int const * segmentPerCurve, |
|
rpr_uint creationFlag_tapered); |
Parameters
Parameter |
Description |
---|---|
context |
The context to use. |
out_curve |
rpr_curve object that will be created by this call. Note that an rpr_curve object holds multiple curves, for example a set of hairs on a character’s head. |
num_controlPoints |
Number of points in the curves. |
controlPointsData |
Float (X,Y,Z) points data for curve points. |
controlPointsStride |
Number of bytes per control point. In most of cases, for contiguous |
num_indices |
Number of indices in the list of point indices. Should be set at : 4 * (number of segments). |
curveCount |
Number of distinct curves. |
indicesData |
List of indices, refers to control points for each curve. Array of |
radius |
Radius of curves. All curves in this rpr_curve object must have the same radius. |
textureUV |
Per curve texture UV coordinates. This is useful for doing per curve color, for example a texture that gives leopard fur color with spots. |
segmentPerCurve |
Segments per disctint curve. Curves in this object must have the same number of segments. |
creationFlag_tapered |
Set it to 0 by default. Set to 1 if using tapered radius. |
Notes
Note that you can create any number of curves with this call.
Output
A pointer to a curve object.
Return
Returns RPR_SUCCESS in case of success, or RPR_ERROR code if a problem was encountered.
To learn how to handle errors in AMD Radeon ProRender SDK, see Error Handling.