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

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

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

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...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x1aae0632, 0xcac0, 0x4cab, 0xb7, 0xb4, 0x26, 0x6c, 0x8a, 0xf5, 0x44, 0x4e >
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< 0x1aae0632, 0xcac0, 0x4cab, 0xb7, 0xb4, 0x26, 0x6c, 0x8a, 0xf5, 0x44, 0x4e >
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 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::ISurface for the general concepts of basis, patches, control points and weights.

See Also
mi::ICurve

Member Function Documentation

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

Returns the basis type.

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

Returns a control point.

Parameters
index The index of the control point.
p The current value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Sint32 mi::ICurve_segment::get_control_point ( Uint32  index,
Float64_2_struct p 
) const
pure virtual

Returns a control point.

Parameters
index The index of the control point.
p The current value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Uint32 mi::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.
virtual Uint32 mi::ICurve_segment::get_degree ( ) const
pure virtual

Returns the basis degree.

Returns
The basis degree.
virtual Float64 mi::ICurve_segment::get_parameter ( Uint32  index) const
pure virtual

Returns a parameter.

Parameters
index The index of the requested parameter.
Returns
The parameter, or 0.0f in case of invalid index.
virtual Uint32 mi::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.
virtual Uint32 mi::ICurve_segment::get_patches_size ( ) const
pure virtual

Returns the number of patches.

Returns
The number of patches.
virtual void mi::ICurve_segment::get_range ( Float64 range_min,
Float64 range_max 
) const
pure virtual

Returns the parameter range.

Parameters
range_min The lower bound of the parameter range.
range_max The upper bound of the parameter range.
Returns
  • 0: Success.
virtual bool mi::ICurve_segment::get_rational ( ) const
pure virtual

Returns the rational flag.

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

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

Returns a weight.

Parameters
index The index of the weight.
weight The current value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Sint32 mi::ICurve_segment::get_weight ( Uint32  index,
Float64 weight 
) const
pure virtual

Returns a weight.

Parameters
index The index of the weight.
weight The current value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Sint32 mi::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
type The desired basis type.
Returns
  • 0: Success.
  • -1: Invalid basis type.
virtual Sint32 mi::ICurve_segment::set_control_point ( Uint32  index,
Float32_2_struct  p 
)
pure virtual

Sets a control point.

Parameters
index The index of the control point.
p The new value of the control point.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Sint32 mi::ICurve_segment::set_control_point ( Uint32  index,
Float64_2_struct  p 
)
pure virtual

Sets a control point.

Parameters
index The index of the control point.
p The new value of the control point.
Returns
  • 0: Success.
  • -1: index_u or index_v is out of bounds.
virtual Sint32 mi::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
degree The desired basis degree.
Returns
  • 0: Success.
  • -1: Invalid degree (zero).
virtual Sint32 mi::ICurve_segment::set_parameter ( Uint32  index,
Float64  value 
)
pure virtual

Sets a parameter.

Parameters
index The index of the parameter to update.
value The new value of the parameter.
Returns
  • 0: Success.
  • -1: index is out of bounds.
virtual Sint32 mi::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
count The desired number of patches.
Returns
  • 0: Success.
  • -1: Invalid count (zero).
virtual Sint32 mi::ICurve_segment::set_range ( Float64  range_min,
Float64  range_max 
)
pure virtual

Sets the parameter range.

Parameters
range_min The lower bound of the parameter range.
range_max The upper bound of the parameter range.
Returns
  • 0: Success.
  • -1: range_min is larger than range_max.
virtual void mi::ICurve_segment::set_rational ( bool  rational)
pure virtual

Sets the rational flag.

Parameters
rational Indicates 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).
virtual Sint32 mi::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
index The index of the weight.
weight The new value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
  • -2: weight has an invalid value (0.0f).
virtual Sint32 mi::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
index The index of the weight.
weight The new value of the weight.
Returns
  • 0: Success.
  • -1: index is out of bounds.
  • -2: weight has an invalid value (0.0f).