NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ifreeform_surface.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2014 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_IFREEFORM_SURFACE_H
9 #define MI_NEURAYLIB_IFREEFORM_SURFACE_H
10 
12 #include <mi/neuraylib/identifier.h>
14 #include <mi/neuraylib/typedefs.h>
15 
16 namespace mi {
17 
18 class ISurface;
19 class ICurve;
20 class ICurve_segment;
21 class ITexture_surface;
22 
27 enum Basis_type
29 {
32 
35 
36  // Undocumented, for alignment only.
37  BASIS_TYPE_FORCE_32_BIT = 0xffffffffU
38 };
39 
40 mi_static_assert( sizeof( Basis_type) == sizeof( Uint32));
41 
44 {
47 
50 
51  // Undocumented, for alignment only.
52  DIMENSION_FORCE_32_BIT = 0xffffffffU
53 };
54 
56 
59 {
62 
65 
66  // Undocumented, for alignment only.
67  CURVE_TYPE_FORCE_32_BIT = 0xffffffffU
68 };
69 
70 mi_static_assert( sizeof( Curve_type) == sizeof( Uint32));
71 
95  public base::Interface_declare<0x5b54fda0,0x1034,0x48a2,0x9d,0xd1,0x4d,0x14,0xaa,0xba,0xa2,0xa7,
96  IScene_element>
97 {
98 public:
99 
101 
102 
104  virtual Uint32 get_surfaces_size() const = 0;
105 
109  virtual ISurface* add_surface() = 0;
110 
112  virtual const ISurface* access_surface( Surface_handle_struct s) const = 0;
113 
116 
121 
123 
125 
130  virtual bool has_attribute( Mesh_attribute_name name) const = 0;
131 
146  Mesh_attribute_name name, Uint32 dim = 1) = 0;
147 
156  Mesh_attribute_name name) const = 0;
157 
170 
185  virtual Sint32 attach_attribute_vector( IAttribute_vector* attribute_vector) = 0;
186 
188 
190 
192  virtual const Float32_3_struct& get_bbox_min() const = 0;
193 
195  virtual const Float32_3_struct& get_bbox_max() const = 0;
196 
201  const Float64_4_4_struct& transformation_matrix) const = 0;
202 
204 
206 
212  virtual void set_maximum_displacement( Float32 displacement) = 0;
213 
217  virtual Float32 get_maximum_displacement() const = 0;
218 
220 };
221 
275 class ISurface :
276  public base::Interface_declare<0x8bc55fb4,0x91cb,0x4b0c,0xa2,0x3a,0x1a,0x67,0x71,0x61,0x73,0xf0>
277 {
278 public:
279 
281 
282 
291  virtual Sint32 set_basis_type( Basis_type type) = 0;
292 
294  virtual Basis_type get_basis_type() const = 0;
295 
306  virtual Sint32 set_degree( Parameter_space_dimension dim, Uint32 degree) = 0;
307 
312  virtual Uint32 get_degree( Parameter_space_dimension dim) const = 0;
313 
315 
317 
328  virtual Sint32 set_patches_size( Parameter_space_dimension dim, Uint32 count) = 0;
329 
334  virtual Uint32 get_patches_size( Parameter_space_dimension dim) const = 0;
335 
337 
339 
347  virtual Uint32 get_parameters_size( Parameter_space_dimension dim) const = 0;
348 
358  virtual Sint32 set_parameter( Parameter_space_dimension dim, Uint32 index, Float64 value) = 0;
359 
365  virtual Float64 get_parameter( Parameter_space_dimension dim, Uint32 index) const = 0;
366 
368 
370 
379 
388  virtual Sint32 set_control_point( Uint32 index_u, Uint32 index_v, Float32_3_struct p) = 0;
389 
398  virtual Sint32 get_control_point(
399  Uint32 index_u, Uint32 index_v, Float32_3_struct& p) const = 0;
400 
409  virtual Sint32 set_control_point( Uint32 index_u, Uint32 index_v, Float64_3_struct p) = 0;
410 
419  virtual Sint32 get_control_point(
420  Uint32 index_u, Uint32 index_v, Float64_3_struct& p) const = 0;
421 
433  virtual Sint32 set_weight( Uint32 index_u, Uint32 index_v, Float32 weight) = 0;
434 
443  virtual Sint32 get_weight( Uint32 index_u, Uint32 index_v, Float32& weight) const = 0;
444 
456  virtual Sint32 set_weight( Uint32 index_u, Uint32 index_v, Float64 weight) = 0;
457 
466  virtual Sint32 get_weight( Uint32 index_u, Uint32 index_v, Float64& weight) const = 0;
467 
473  virtual void set_rational( bool rational) = 0;
474 
476  virtual bool get_rational() const = 0;
477 
479 
481 
494  virtual Sint32 set_range(
495  Parameter_space_dimension dim, Float64 range_min, Float64 range_max) = 0;
496 
508  virtual Sint32 get_range(
509  Parameter_space_dimension dim, Float64& range_min, Float64& range_max) const = 0;
510 
512 
514 
516  virtual Uint32 curves_size() const = 0;
517 
519  virtual ICurve* add_curve() = 0;
520 
522  virtual const ICurve* access_curve( Curve_handle_struct c) const = 0;
523 
525  virtual ICurve* edit_curve( Curve_handle_struct c) = 0;
526 
530  virtual Sint32 remove_curve( Curve_handle_struct c) = 0;
531 
533 
535 
537  virtual Uint32 texture_surfaces_size() const = 0;
538 
540  virtual ITexture_surface* add_texture_surface() = 0;
541 
544  Texture_surface_handle_struct t) const = 0;
545 
548 
553 
555 };
556 
583 class ICurve :
584  public base::Interface_declare<0xa4e79414,0x6b74,0x422c,0x93,0x83,0x8a,0x08,0x41,0xf9,0x0a,0x27>
585 {
586 public:
587 
589 
590 
597  virtual Sint32 set_type( Curve_type curve_type) = 0;
598 
600  virtual Curve_type get_type() const = 0;
601 
603 
605 
607  virtual Uint32 get_curve_segments_size() const = 0;
608 
610  virtual ICurve_segment* add_curve_segment() = 0;
611 
614 
617 
622 
624 };
625 
638  public base::Interface_declare<0x1aae0632,0xcac0,0x4cab,0xb7,0xb4,0x26,0x6c,0x8a,0xf5,0x44,0x4e>
639 {
640 public:
641 
643 
644 
653  virtual Sint32 set_basis_type( Basis_type type) = 0;
654 
656  virtual Basis_type get_basis_type() const = 0;
657 
666  virtual Sint32 set_degree( Uint32 degree) = 0;
667 
671  virtual Uint32 get_degree() const = 0;
672 
674 
676 
685  virtual Sint32 set_patches_size( Uint32 count) = 0;
686 
690  virtual Uint32 get_patches_size() const = 0;
691 
693 
695 
702  virtual Uint32 get_parameters_size() const = 0;
703 
711  virtual Sint32 set_parameter( Uint32 index, Float64 value) = 0;
712 
717  virtual Float64 get_parameter( Uint32 index) const = 0;
718 
720 
722 
729  virtual Uint32 get_control_points_size() const = 0;
730 
738  virtual Sint32 set_control_point( Uint32 index, Float32_2_struct p) = 0;
739 
747  virtual Sint32 get_control_point( Uint32 index, Float32_2_struct& p) const = 0;
748 
756  virtual Sint32 set_control_point( Uint32 index, Float64_2_struct p) = 0;
757 
765  virtual Sint32 get_control_point( Uint32 index, Float64_2_struct& p) const = 0;
766 
777  virtual Sint32 set_weight( Uint32 index, Float32 weight) = 0;
778 
786  virtual Sint32 get_weight( Uint32 index, Float32& weight) const = 0;
787 
798  virtual Sint32 set_weight( Uint32 index, Float64 weight) = 0;
799 
807  virtual Sint32 get_weight( Uint32 index, Float64& weight) const = 0;
808 
814  virtual void set_rational( bool rational) = 0;
815 
819  virtual bool get_rational() const = 0;
820 
822 
824 
832 
833  virtual Sint32 set_range( Float64 range_min, Float64 range_max) = 0;
834 
841  virtual void get_range( Float64& range_min, Float64& range_max) const = 0;
842 
844 };
845 
860  public base::Interface_declare<0x5d39fdcb,0x9a3d,0x42ed,0xb3,0x90,0xc3,0x20,0x3d,0x31,0xa9,0x9d>
861 {
862 public:
863 
873 
879 
887 
891  virtual Uint32 get_texture_coordinate_length() const = 0;
892 
905  Uint32 index_u, Uint32 index_v, const Float32* f, Uint32 n) = 0;
906 
919  Uint32 index_u, Uint32 index_v, Float32* f, Uint32 n) const = 0;
920 
933  Uint32 index_u, Uint32 index_v, const Float64* d, Uint32 n) = 0;
934 
947  Uint32 index_u, Uint32 index_v, Float64* d, Uint32 n) const = 0;
948 };
949  // end group mi_neuray_leaf_nodes
951 
952 } // namespace mi
953 
954 #endif // MI_NEURAYLIB_IFREEFORM_SURFACE_H