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

A curve segment used by freeform surfaces. More...

#include <ifreeform_surface.h>

Inheritance diagram for mi::neuraylib::ICurve_segment:

Public Member Functions

Methods related to the basis
virtual Sint32 set_basis_type (Basis_type type)=0
 Sets the basis type. More...
 
virtual Basis_type get_basis_type () const =0
 Returns the basis type. More...
 
virtual Sint32 set_degree (Uint32 degree)=0
 Sets the basis degree. More...
 
virtual Uint32 get_degree () const =0
 Returns the basis degree. More...
 
Methods related to the patches
virtual Sint32 set_patches_size (Uint32 count)=0
 Sets the number of patches. More...
 
virtual Uint32 get_patches_size () const =0
 Returns the number of patches. More...
 
Methods related to the parameter vector
virtual Uint32 get_parameters_size () const =0
 Returns the size of the parameter vector. More...
 
virtual Sint32 set_parameter (Uint32 index, Float64 value)=0
 Sets a parameter. More...
 
virtual Float64 get_parameter (Uint32 index) const =0
 Returns a parameter. More...
 
Methods related to control points and weights
virtual Uint32 get_control_points_size () const =0
 Returns the number of control points. More...
 
virtual Sint32 set_control_point (Uint32 index, Float32_2_struct p)=0
 Sets a control point. More...
 
virtual Sint32 get_control_point (Uint32 index, Float32_2_struct &p) const =0
 Returns a control point. More...
 
virtual Sint32 set_control_point (Uint32 index, Float64_2_struct p)=0
 Sets a control point. More...
 
virtual Sint32 get_control_point (Uint32 index, Float64_2_struct &p) const =0
 Returns a control point. More...
 
virtual Sint32 set_weight (Uint32 index, Float32 weight)=0
 Sets a weight. More...
 
virtual Sint32 get_weight (Uint32 index, Float32 &weight) const =0
 Returns a weight. More...
 
virtual Sint32 set_weight (Uint32 index, Float64 weight)=0
 Sets a weight. More...
 
virtual Sint32 get_weight (Uint32 index, Float64 &weight) const =0
 Returns a weight. More...
 
virtual void set_rational (bool rational)=0
 Sets the rational flag. More...
 
virtual bool get_rational () const =0
 Returns the rational flag. More...
 
Methods related to the range
virtual Sint32 set_range (Float64 range_min, Float64 range_max)=0
 Sets the parameter range. More...
 
virtual void get_range (Float64 &range_min, Float64 &range_max) const =0
 Returns the parameter range. 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< 0x1aae0632, ... >
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< 0x1aae0632, ... >
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 segment used by freeform surfaces.

Curve segments are similar to surfaces, except that they are only 1-dimensional. A sequence of curve segments forms a curve which can be used to trim the surface. Note that the control points of a curve segment are not defined in 3D space, but in the UV parameter space of the surface.

See the documentation of mi::neuraylib::ISurface for the general concepts of basis, patches, control points and weights.

See also
mi::neuraylib::ICurve

Member Function Documentation

 get_basis_type()

virtual Basis_type mi::neuraylib::ICurve_segment::get_basis_type ( ) const
pure virtual

Returns the basis type.

 get_control_point() [1/2]

virtual Sint32 mi::neuraylib::ICurve_segment::get_control_point ( Uint32  index,
Float32_2_struct p 
) const
pure virtual

Returns a control point.

Parameters
indexThe index of the control point.
pThe current value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 get_control_point() [2/2]

virtual Sint32 mi::neuraylib::ICurve_segment::get_control_point ( Uint32  index,
Float64_2_struct p 
) const
pure virtual

Returns a control point.

Parameters
indexThe index of the control point.
pThe current value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 get_control_points_size()

virtual Uint32 mi::neuraylib::ICurve_segment::get_control_points_size ( ) const
pure virtual

Returns the number of control points.

Note
The number of control points is determined by the basis degree and the number of patches.
Returns
The number of control points, or 0 in case of an invalid dimension.

 get_degree()

virtual Uint32 mi::neuraylib::ICurve_segment::get_degree ( ) const
pure virtual

Returns the basis degree.

Returns
The basis degree.

 get_parameter()

virtual Float64 mi::neuraylib::ICurve_segment::get_parameter ( Uint32  index) const
pure virtual

Returns a parameter.

Parameters
indexThe index of the requested parameter.
Returns
The parameter, or 0.0f in case of invalid index.

 get_parameters_size()

virtual Uint32 mi::neuraylib::ICurve_segment::get_parameters_size ( ) const
pure virtual

Returns the size of the parameter vector.

Note
The size of the parameter vector is determined by the basis degree and the number of patches.
Returns
The number of parameters.

 get_patches_size()

virtual Uint32 mi::neuraylib::ICurve_segment::get_patches_size ( ) const
pure virtual

Returns the number of patches.

Returns
The number of patches.

 get_range()

virtual void mi::neuraylib::ICurve_segment::get_range ( Float64 range_min,
Float64 range_max 
) const
pure virtual

Returns the parameter range.

Parameters
range_minThe lower bound of the parameter range.
range_maxThe upper bound of the parameter range.

 get_rational()

virtual bool mi::neuraylib::ICurve_segment::get_rational ( ) const
pure virtual

Returns the rational flag.

The rational flag indicates whether the weights are taken into account.

 get_weight() [1/2]

virtual Sint32 mi::neuraylib::ICurve_segment::get_weight ( Uint32  index,
Float32 weight 
) const
pure virtual

Returns a weight.

Parameters
indexThe index of the weight.
weightThe current value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 get_weight() [2/2]

virtual Sint32 mi::neuraylib::ICurve_segment::get_weight ( Uint32  index,
Float64 weight 
) const
pure virtual

Returns a weight.

Parameters
indexThe index of the weight.
weightThe current value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 set_basis_type()

virtual Sint32 mi::neuraylib::ICurve_segment::set_basis_type ( Basis_type  type)
pure virtual

Sets the basis type.

Note
This method resets the parameter vector, and all control points and weights.
Parameters
typeThe desired basis type.
Returns
  • 0: Success.
  • -1: Invalid basis type.

 set_control_point() [1/2]

virtual Sint32 mi::neuraylib::ICurve_segment::set_control_point ( Uint32  index,
Float32_2_struct  p 
)
pure virtual

Sets a control point.

Parameters
indexThe index of the control point.
pThe new value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 set_control_point() [2/2]

virtual Sint32 mi::neuraylib::ICurve_segment::set_control_point ( Uint32  index,
Float64_2_struct  p 
)
pure virtual

Sets a control point.

Parameters
indexThe index of the control point.
pThe new value of the control point.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.

 set_degree()

virtual Sint32 mi::neuraylib::ICurve_segment::set_degree ( Uint32  degree)
pure virtual

Sets the basis degree.

Note
This method resets the parameter vector, and all control points and weights.
Parameters
degreeThe desired basis degree.
Returns
  • 0: Success.
  • -1: Invalid degree (zero).

 set_parameter()

virtual Sint32 mi::neuraylib::ICurve_segment::set_parameter ( Uint32  index,
Float64  value 
)
pure virtual

Sets a parameter.

Parameters
indexThe index of the parameter to update.
valueThe new value of the parameter.
Returns
  • 0: Success.
  • -1: index is out of bounds.

 set_patches_size()

virtual Sint32 mi::neuraylib::ICurve_segment::set_patches_size ( Uint32  count)
pure virtual

Sets the number of patches.

Note
This method resets the parameter vector, and all control points and weights.
Parameters
countThe desired number of patches.
Returns
  • 0: Success.
  • -1: Invalid count (zero).

 set_range()

virtual Sint32 mi::neuraylib::ICurve_segment::set_range ( Float64  range_min,
Float64  range_max 
)
pure virtual

Sets the parameter range.

Parameters
range_minThe lower bound of the parameter range.
range_maxThe upper bound of the parameter range.
Returns
  • 0: Success.
  • -1: range_min is larger than range_max.

 set_rational()

virtual void mi::neuraylib::ICurve_segment::set_rational ( bool  rational)
pure virtual

Sets the rational flag.

Parameters
rationalIndicates whether weights should be used (rational curves) or not (non-rational curves). If false, all weights are removed. If true, all weights are set to 1.0f (if they did not already exist).

 set_weight() [1/2]

virtual Sint32 mi::neuraylib::ICurve_segment::set_weight ( Uint32  index,
Float32  weight 
)
pure virtual

Sets a weight.

Note
This method implicitly calls set_rational() with true as argument.
Parameters
indexThe index of the weight.
weightThe new value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
  • -2: weight has an invalid value (0.0f).

 set_weight() [2/2]

virtual Sint32 mi::neuraylib::ICurve_segment::set_weight ( Uint32  index,
Float64  weight 
)
pure virtual

Sets a weight.

Note
This method implicitly calls set_rational() with true as argument.
Parameters
indexThe index of the weight.
weightThe new value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
  • -2: weight has an invalid value (0.0f).