NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::ICurve Class Referenceabstract

A curve used by freeform surfaces. More...

Inheritance diagram for mi::ICurve:
Inheritance graph
[legend]

Public Member Functions

Methods related to curve types
virtual Sint32  set_type (Curve_type curve_type)=0
  Sets the curve type. More...
 
virtual Curve_type  get_type () const =0
  Returns the curve type. More...
 
Methods related to curve segments
virtual Uint32  get_curve_segments_size () const =0
  Returns the number of curve segments. More...
 
virtual ICurve_segment add_curve_segment ()=0
  Adds and returns a new curve segment. More...
 
virtual const ICurve_segment access_curve_segment (Curve_segment_handle_struct s) const =0
  Returns a curve segment (const). More...
 
virtual ICurve_segment edit_curve_segment (Curve_segment_handle_struct s)=0
  Returns a curve segment (mutable). More...
 
virtual Sint32  remove_curve_segment (Curve_segment_handle_struct s)=0
  Removes a curve segment. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa4e79414, 0x6b74, 0x422c, 0x93, 0x83, 0x8a, 0x08, 0x41, 0xf9, 0x0a, 0x27 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xa4e79414, 0x6b74, 0x422c, 0x93, 0x83, 0x8a, 0x08, 0x41, 0xf9, 0x0a, 0x27 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed 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::Curve_segment_handle instead of plain integers.

See Also
mi::ISurface
mi::ICurve_segment
mi::Curve_type

Member Function Documentation

virtual const ICurve_segment* mi::ICurve::access_curve_segment ( Curve_segment_handle_struct  s) const
pure virtual

Returns a curve segment (const).

virtual ICurve_segment* mi::ICurve::add_curve_segment ( )
pure virtual

Adds and returns a new curve segment.

virtual ICurve_segment* mi::ICurve::edit_curve_segment ( Curve_segment_handle_struct  s)
pure virtual

Returns a curve segment (mutable).

virtual Uint32 mi::ICurve::get_curve_segments_size ( ) const
pure virtual

Returns the number of curve segments.

virtual Curve_type mi::ICurve::get_type ( ) const
pure virtual

Returns the curve type.

virtual Sint32 mi::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::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.