Iray SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::ICurve Class Referenceabstract

A curve used by freeform surfaces. More...

#include <ifreeform_surface.h>

Inheritance diagram for mi::neuraylib::ICurve:

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_segmentadd_curve_segment ()=0
 Adds and returns a new curve segment. More...
 
virtual const ICurve_segmentaccess_curve_segment (Curve_segment_handle_struct s) const =0
 Returns a curve segment (const). More...
 
virtual ICurve_segmentedit_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...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0xa4e79414, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0xa4e79414, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. 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::neuraylib::Curve_segment_handle instead of plain integers.

See also
mi::neuraylib::ISurface
mi::neuraylib::ICurve_segment
mi::neuraylib::Curve_type

Member Function Documentation

 access_curve_segment()

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

Returns a curve segment (const).

 add_curve_segment()

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

Adds and returns a new curve segment.

 edit_curve_segment()

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

Returns a curve segment (mutable).

 get_curve_segments_size()

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

Returns the number of curve segments.

 get_type()

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

Returns the curve type.

 remove_curve_segment()

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.

 set_type()

virtual Sint32 mi::neuraylib::ICurve::set_type ( Curve_type  curve_type)
pure virtual

Sets the curve type.

Parameters
curve_typeThe desired curve type.
Returns
  • 0: Success.
  • -1: Invalid curve type.