Iray SDK API nvidia_logo_transpbg.gif Up
ifreeform_surface.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IFREEFORM_SURFACE_H
8#define MI_NEURAYLIB_IFREEFORM_SURFACE_H
9
14#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
15
16namespace mi {
17
18namespace neuraylib {
19
20class ISurface;
21class ICurve;
22class ICurve_segment;
23class ITexture_surface;
24
31{
34
37 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(BASIS_TYPE_FORCE_32_BIT, 0xffffffffU)
38};
39
42{
45
47 DIMENSION_V = 1
48 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(DIMENSION_FORCE_32_BIT, 0xffffffffU)
49};
50
53{
56
58 HOLE_CURVE = 1
59 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(CURVE_TYPE_FORCE_32_BIT, 0xffffffffU)
60};
61
86 public base::Interface_declare<0x5b54fda0,0x1034,0x48a2,0x9d,0xd1,0x4d,0x14,0xaa,0xba,0xa2,0xa7,
87 neuraylib::IScene_element>
88{
89public:
90
92
93
95 virtual Uint32 get_surfaces_size() const = 0;
96
100 virtual ISurface* add_surface() = 0;
101
103 virtual const ISurface* access_surface( Surface_handle_struct s) const = 0;
104
107
112
114
116
121 virtual bool has_attribute( Mesh_attribute_name name) const = 0;
122
143 Mesh_attribute_name name, Uint32 dim = 1) = 0;
144
153 Mesh_attribute_name name) const = 0;
154
167
184 virtual Sint32 attach_attribute_vector( IAttribute_vector* attribute_vector) = 0;
185
194
196
198
200 virtual Bbox3_struct get_bbox() const = 0;
201
207 const Float64_4_4_struct& transformation_matrix) const = 0;
208
210
212
217 virtual void set_maximum_displacement( Float32 displacement) = 0;
218
223
225};
226
281class ISurface :
282 public base::Interface_declare<0x8bc55fb4,0x91cb,0x4b0c,0xa2,0x3a,0x1a,0x67,0x71,0x61,0x73,0xf0>
283{
284public:
285
287
288
297 virtual Sint32 set_basis_type( Basis_type type) = 0;
298
300 virtual Basis_type get_basis_type() const = 0;
301
313
319
321
323
335
341
343
345
354
365
372
374
376
385
394 virtual Sint32 set_control_point( Uint32 index_u, Uint32 index_v, Float32_3_struct p) = 0;
395
405 Uint32 index_u, Uint32 index_v, Float32_3_struct& p) const = 0;
406
415 virtual Sint32 set_control_point( Uint32 index_u, Uint32 index_v, Float64_3_struct p) = 0;
416
426 Uint32 index_u, Uint32 index_v, Float64_3_struct& p) const = 0;
427
439 virtual Sint32 set_weight( Uint32 index_u, Uint32 index_v, Float32 weight) = 0;
440
449 virtual Sint32 get_weight( Uint32 index_u, Uint32 index_v, Float32& weight) const = 0;
450
462 virtual Sint32 set_weight( Uint32 index_u, Uint32 index_v, Float64 weight) = 0;
463
472 virtual Sint32 get_weight( Uint32 index_u, Uint32 index_v, Float64& weight) const = 0;
473
479 virtual void set_rational( bool rational) = 0;
480
482 virtual bool get_rational() const = 0;
483
485
487
501 Parameter_space_dimension dim, Float64 range_min, Float64 range_max) = 0;
502
515 Parameter_space_dimension dim, Float64& range_min, Float64& range_max) const = 0;
516
518
520
522 virtual Uint32 curves_size() const = 0;
523
525 virtual ICurve* add_curve() = 0;
526
528 virtual const ICurve* access_curve( Curve_handle_struct c) const = 0;
529
532
537
539
541
543 virtual Uint32 texture_surfaces_size() const = 0;
544
547
551
554
559
561};
562
589class ICurve :
590 public base::Interface_declare<0xa4e79414,0x6b74,0x422c,0x93,0x83,0x8a,0x08,0x41,0xf9,0x0a,0x27>
591{
592public:
593
595
596
603 virtual Sint32 set_type( Curve_type curve_type) = 0;
604
606 virtual Curve_type get_type() const = 0;
607
609
611
613 virtual Uint32 get_curve_segments_size() const = 0;
614
617
620
623
628
630};
631
644 public base::Interface_declare<0x1aae0632,0xcac0,0x4cab,0xb7,0xb4,0x26,0x6c,0x8a,0xf5,0x44,0x4e>
645{
646public:
647
649
650
659 virtual Sint32 set_basis_type( Basis_type type) = 0;
660
662 virtual Basis_type get_basis_type() const = 0;
663
672 virtual Sint32 set_degree( Uint32 degree) = 0;
673
677 virtual Uint32 get_degree() const = 0;
678
680
682
691 virtual Sint32 set_patches_size( Uint32 count) = 0;
692
696 virtual Uint32 get_patches_size() const = 0;
697
699
701
708 virtual Uint32 get_parameters_size() const = 0;
709
717 virtual Sint32 set_parameter( Uint32 index, Float64 value) = 0;
718
723 virtual Float64 get_parameter( Uint32 index) const = 0;
724
726
728
735 virtual Uint32 get_control_points_size() const = 0;
736
745
753 virtual Sint32 get_control_point( Uint32 index, Float32_2_struct& p) const = 0;
754
763
771 virtual Sint32 get_control_point( Uint32 index, Float64_2_struct& p) const = 0;
772
783 virtual Sint32 set_weight( Uint32 index, Float32 weight) = 0;
784
792 virtual Sint32 get_weight( Uint32 index, Float32& weight) const = 0;
793
804 virtual Sint32 set_weight( Uint32 index, Float64 weight) = 0;
805
813 virtual Sint32 get_weight( Uint32 index, Float64& weight) const = 0;
814
820 virtual void set_rational( bool rational) = 0;
821
825 virtual bool get_rational() const = 0;
826
828
830
838 virtual Sint32 set_range( Float64 range_min, Float64 range_max) = 0;
839
844 virtual void get_range( Float64& range_min, Float64& range_max) const = 0;
845
847};
848
863 public base::Interface_declare<0x5d39fdcb,0x9a3d,0x42ed,0xb3,0x90,0xc3,0x20,0x3d,0x31,0xa9,0x9d>
864{
865public:
866
876
882
890
895
908 Uint32 index_u, Uint32 index_v, const Float32* f, Uint32 n) = 0;
909
922 Uint32 index_u, Uint32 index_v, Float32* f, Uint32 n) const = 0;
923
936 Uint32 index_u, Uint32 index_v, const Float64* d, Uint32 n) = 0;
937
950 Uint32 index_u, Uint32 index_v, Float64* d, Uint32 n) const = 0;
951};
952 // end group mi_neuray_leaf_nodes
954
955} // namespace neuraylib
956
957} // namespace mi
958
959#endif // MI_NEURAYLIB_IFREEFORM_SURFACE_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Interface representing an attribute vector for triangle meshes, polygon meshes, and subdivision surfa...
Definition: iattribute_vector.h:176
A curve segment used by freeform surfaces.
Definition: ifreeform_surface.h:645
virtual Sint32 set_degree(Uint32 degree)=0
Sets the basis degree.
virtual Sint32 set_control_point(Uint32 index, Float64_2_struct p)=0
Sets a control point.
virtual Uint32 get_control_points_size() const =0
Returns the number of control points.
virtual Sint32 set_basis_type(Basis_type type)=0
Sets the basis type.
virtual Uint32 get_parameters_size() const =0
Returns the size of the parameter vector.
virtual Sint32 get_control_point(Uint32 index, Float64_2_struct &p) const =0
Returns a control point.
virtual Sint32 get_weight(Uint32 index, Float32 &weight) const =0
Returns a weight.
virtual void get_range(Float64 &range_min, Float64 &range_max) const =0
Returns the parameter range.
virtual Sint32 set_parameter(Uint32 index, Float64 value)=0
Sets a parameter.
virtual Sint32 set_weight(Uint32 index, Float32 weight)=0
Sets a weight.
virtual Uint32 get_degree() const =0
Returns the basis degree.
virtual void set_rational(bool rational)=0
Sets the rational flag.
virtual Uint32 get_patches_size() const =0
Returns the number of patches.
virtual Sint32 set_control_point(Uint32 index, Float32_2_struct p)=0
Sets a control point.
virtual bool get_rational() const =0
Returns the rational flag.
virtual Sint32 get_weight(Uint32 index, Float64 &weight) const =0
Returns a weight.
virtual Basis_type get_basis_type() const =0
Returns the basis type.
virtual Sint32 set_weight(Uint32 index, Float64 weight)=0
Sets a weight.
virtual Sint32 set_patches_size(Uint32 count)=0
Sets the number of patches.
virtual Sint32 set_range(Float64 range_min, Float64 range_max)=0
Sets the parameter range.
virtual Float64 get_parameter(Uint32 index) const =0
Returns a parameter.
virtual Sint32 get_control_point(Uint32 index, Float32_2_struct &p) const =0
Returns a control point.
A curve used by freeform surfaces.
Definition: ifreeform_surface.h:591
virtual Sint32 remove_curve_segment(Curve_segment_handle_struct s)=0
Removes a curve segment.
virtual Curve_type get_type() const =0
Returns the curve type.
virtual const ICurve_segment * access_curve_segment(Curve_segment_handle_struct s) const =0
Returns a curve segment (const).
virtual Sint32 set_type(Curve_type curve_type)=0
Sets the curve type.
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 ICurve_segment * add_curve_segment()=0
Adds and returns a new curve segment.
Interface representing a freeform surface.
Definition: ifreeform_surface.h:88
virtual ISurface * edit_surface(Surface_handle_struct s)=0
Returns a surface (mutable).
virtual Float32 get_maximum_displacement() const =0
Returns the maximum displacement of the freeform surface.
virtual Bbox3_struct get_tight_bbox(const Float64_4_4_struct &transformation_matrix) const =0
Returns the bounding box of the freeform surface after transformation.
virtual Bbox3_struct get_bbox() const =0
Returns the bounding box of the freeform surface.
virtual Sint32 remove_surface(Surface_handle_struct s)=0
Removes a surface.
virtual IAttribute_vector * edit_attribute_vector(Mesh_attribute_name name)=0
Detaches and returns a per-primitive mesh attribute.
virtual Sint32 attach_attribute_vector(IAttribute_vector *attribute_vector)=0
Attaches a given per-primitive mesh attribute to the freeform surface.
virtual Sint32 remove_attribute_vector(Mesh_attribute_name name)=0
Removes a per-primitive mesh attribute.
virtual IAttribute_vector * create_attribute_vector(Mesh_attribute_name name, Uint32 dim=1)=0
Creates a per-primitive mesh attribute.
virtual bool has_attribute(Mesh_attribute_name name) const =0
Indicates whether the freeform surface has a particular mesh attribute.
virtual ISurface * add_surface()=0
Adds and returns a new surface.
virtual void set_maximum_displacement(Float32 displacement)=0
Sets the maximum displacement of the freeform surface.
virtual Uint32 get_surfaces_size() const =0
Returns the number of surfaces.
virtual const IAttribute_vector * access_attribute_vector(Mesh_attribute_name name) const =0
Returns a per-primitive mesh attribute.
virtual const ISurface * access_surface(Surface_handle_struct s) const =0
Returns a surface (const).
A surface of a freeform surface.
Definition: ifreeform_surface.h:283
virtual Sint32 remove_curve(Curve_handle_struct c)=0
Removes a curve.
virtual Sint32 set_control_point(Uint32 index_u, Uint32 index_v, Float64_3_struct p)=0
Sets a control point.
virtual const ICurve * access_curve(Curve_handle_struct c) const =0
Returns a curve (const).
virtual Uint32 get_parameters_size(Parameter_space_dimension dim) const =0
Returns the size of the parameter vector.
virtual Sint32 set_basis_type(Basis_type type)=0
Sets the basis type.
virtual Sint32 get_weight(Uint32 index_u, Uint32 index_v, Float64 &weight) const =0
Returns a weight.
virtual Sint32 set_patches_size(Parameter_space_dimension dim, Uint32 count)=0
Sets the number of patches.
virtual Uint32 texture_surfaces_size() const =0
Returns the number of texture surfaces.
virtual Sint32 set_weight(Uint32 index_u, Uint32 index_v, Float32 weight)=0
Sets a weight.
virtual bool get_rational() const =0
Returns the rational flag.
virtual Uint32 get_control_points_size(Parameter_space_dimension dim) const =0
Returns the number of control points.
virtual Sint32 set_range(Parameter_space_dimension dim, Float64 range_min, Float64 range_max)=0
Sets the parameter range.
virtual Sint32 get_control_point(Uint32 index_u, Uint32 index_v, Float64_3_struct &p) const =0
Returns a control point.
virtual Sint32 set_parameter(Parameter_space_dimension dim, Uint32 index, Float64 value)=0
Sets a parameter.
virtual void set_rational(bool rational)=0
Sets the rational flag.
virtual Sint32 set_weight(Uint32 index_u, Uint32 index_v, Float64 weight)=0
Sets a weight.
virtual ICurve * edit_curve(Curve_handle_struct c)=0
Returns a curve (mutable).
virtual Uint32 get_patches_size(Parameter_space_dimension dim) const =0
Returns the number of patches.
virtual Sint32 set_degree(Parameter_space_dimension dim, Uint32 degree)=0
Sets the basis degree.
virtual Uint32 get_degree(Parameter_space_dimension dim) const =0
Returns the basis degree.
virtual ITexture_surface * edit_texture_surface(Texture_surface_handle_struct t) const =0
Returns a texture surface (mutable).
virtual ITexture_surface * add_texture_surface()=0
Adds and returns a new texture surface.
virtual Uint32 curves_size() const =0
Returns the number of curves.
virtual Sint32 get_range(Parameter_space_dimension dim, Float64 &range_min, Float64 &range_max) const =0
Returns the parameter range.
virtual ICurve * add_curve()=0
Adds and returns a new curve.
virtual Sint32 get_control_point(Uint32 index_u, Uint32 index_v, Float32_3_struct &p) const =0
Returns a control point.
virtual const ITexture_surface * access_texture_surface(Texture_surface_handle_struct t) const =0
Returns a texture surface (const).
virtual Sint32 get_weight(Uint32 index_u, Uint32 index_v, Float32 &weight) const =0
Returns a weight.
virtual Float64 get_parameter(Parameter_space_dimension dim, Uint32 index) const =0
Returns a parameter.
virtual Basis_type get_basis_type() const =0
Returns the basis type.
virtual Sint32 remove_texture_surface(Texture_surface_handle_struct t)=0
Removes a texture surface.
virtual Sint32 set_control_point(Uint32 index_u, Uint32 index_v, Float32_3_struct p)=0
Sets a control point.
A texture surface associated with freeform surfaces.
Definition: ifreeform_surface.h:864
virtual Uint32 get_texture_coordinate_length() const =0
Returns the length of the texture coordinates.
virtual Sint32 set_texture_coordinate(Uint32 index_u, Uint32 index_v, const Float64 *d, Uint32 n)=0
Sets a texture coordinate.
virtual Sint32 set_texture_coordinates_size(Parameter_space_dimension dim, Uint32 count)=0
Sets the size of the texture coordinates.
virtual Sint32 get_texture_coordinate(Uint32 index_u, Uint32 index_v, Float64 *d, Uint32 n) const =0
Returns a texture coordinate.
virtual Sint32 get_texture_coordinate(Uint32 index_u, Uint32 index_v, Float32 *f, Uint32 n) const =0
Returns a texture coordinate.
virtual Uint32 get_texture_coordinates_size(Parameter_space_dimension dim) const =0
Returns the size of the texture coordinates.
virtual Sint32 set_texture_coordinate(Uint32 index_u, Uint32 index_v, const Float32 *f, Uint32 n)=0
Sets a texture coordinate.
virtual Sint32 set_texture_coordinate_length(Uint32 length)=0
Sets the length of the texture coordinates.
int Sint32
32-bit signed integer.
Definition: types.h:46
float Float32
32-bit float.
Definition: types.h:51
double Float64
64-bit float.
Definition: types.h:52
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Float32 length(Float32 a)
Returns the Euclidean norm of the scalar a (its absolute value).
Definition: function.h:1047
Basis_type
Different basis types that are supported by freeform surfaces.
Definition: ifreeform_surface.h:31
Parameter_space_dimension
Distinguishes the two dimensions of the parameter space of freeform surfaces.
Definition: ifreeform_surface.h:42
Curve_type
Different curve types that are supported by freeform surfaces.
Definition: ifreeform_surface.h:53
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:61
@ BASIS_BEZIER
Represents a Bezier basis.
Definition: ifreeform_surface.h:33
@ BASIS_BSPLINE
Represents a B-spline basis.
Definition: ifreeform_surface.h:36
@ DIMENSION_V
Represents the V-dimension of the parameter space.
Definition: ifreeform_surface.h:47
@ DIMENSION_U
Represents the U-dimension of the parameter space.
Definition: ifreeform_surface.h:44
@ HOLE_CURVE
A hole curve cuts away all parts of the surface inside the curve.
Definition: ifreeform_surface.h:58
@ TRIM_CURVE
A trim curve cuts away all parts of the surface outside the curve.
Definition: ifreeform_surface.h:55
Attribute vectors, used for triangle and polygon meshes.
Simple integer-based handles used by mesh interfaces.
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Major and minor version number and an optional qualifier.
Storage class for an axis-aligned N-dimensional bounding box class template of fixed dimension.
Definition: bbox.h:47
Storage class for a NxM-dimensional matrix class template of fixed dimensions.
Definition: matrix.h:90
Generic storage class template for math vector representations storing DIM elements of type T.
Definition: vector.h:135
Handle class for type-safety.
Definition: identifier.h:56
Typedefs for types from the math API.