mi::neuraylib::ICurve Class Reference
[Leaf nodes]
Description
A curve used by freeform surfaces. Surfaces allow the definition of parametric curves that cut away parts of the surface. Curves need to be closed and may not intersect themselves or other curves on the same surface. The curves are called parametric because they are defined in the surface's UV space - all curve control points have only two coordinates (U and V). The UV coordinates must be in the parameter space of the surface (which might be restricted by its range parameters).
There are two types of curves, trim curves and hole curves. A trim curve cuts away all parts of the surface outside the curve. A hole curve cuts away all parts inside the curve. Curves can be nested: a trim curve inside a hole curve "restores" the surface area inside the inner trim curve. Nested curves need to have alternating types and must be specified in the correct order from the outermost to the innermost. Non-nested curves can be specified in any order. Clockwise/counterclockwise ordering is not significant.
A curve consists of one or more curve segments. Segments are similar to surfaces, except that they are only 1-dimensional (and as the curve, are defined not in 3D space, but in the UV parameter space of the surface).
Curve segments are stored with consecutive indices, starting with the index 0. For type safety, indices of curve segments are represented using mi::neuraylib::Curve_segment_handle instead of plain integers.
See also:
mi::neuraylib::Curve_type
Methods related to curve types
- virtual Curve_type get_type() const =0
- Returns the curve type.
- virtual Sint32 set_type( Curve_type curve_type) =0
- Sets the curve type. More...
Methods related to curve segments
- virtual const ICurve_segment* access_curve_segment( Curve_segment_handle_struct s) const =0
- Returns a curve segment (const).
- virtual ICurve_segment* add_curve_segment() =0
- Adds and returns a new curve segment.
- virtual ICurve_segment* edit_curve_segment( Curve_segment_handle_struct s) =0
- Returns a curve segment (mutable).
- virtual Uint32 get_curve_segments_size() const =0
- Returns the number of curve segments.
- virtual Sint32 remove_curve_segment( Curve_segment_handle_struct s) =0
- Removes a curve segment. More...
Member Functions
- virtual const ICurve_segment* mi::neuraylib::ICurve::access_curve_segment( Curve_segment_handle_struct s) const [pure virtual]
-
Returns a curve segment (const).
- virtual ICurve_segment* mi::neuraylib::ICurve::add_curve_segment() [pure virtual]
-
Adds and returns a new curve segment.
- virtual ICurve_segment* mi::neuraylib::ICurve::edit_curve_segment( Curve_segment_handle_struct s) [pure virtual]
-
Returns a curve segment (mutable).
- virtual Uint32 mi::neuraylib::ICurve::get_curve_segments_size() const [pure virtual]
-
Returns the number of curve segments.
- virtual Curve_type mi::neuraylib::ICurve::get_type() const [pure virtual]
-
Returns the curve type.
- virtual Sint32 mi::neuraylib::ICurve::remove_curve_segment( Curve_segment_handle_struct s) [pure virtual]
-
Removes a curve segment. Note that the curve segment IDs of the following curve segments are decreased by 1.
- virtual Sint32 mi::neuraylib::ICurve::set_type( Curve_type curve_type) [pure virtual]
-
Sets the curve type.
Parameters
- curve_type
- The desired curve type.
Returns
- 0: Success.
- -1: Invalid curve type.