Iray SDK API nvidia_logo_transpbg.gif Up
ifibers.h
Go to the documentation of this file.
1//*****************************************************************************
2// Copyright 2023 NVIDIA Corporation. All rights reserved.
3//*****************************************************************************
6//*****************************************************************************
7
8#ifndef MI_NEURAYLIB_IFIBERS_H
9#define MI_NEURAYLIB_IFIBERS_H
10
15
16namespace mi {
17
18namespace neuraylib {
19
26{
30 FIBER_TYPE_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
31};
32
35{
38 FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
39};
40
41
42mi_static_assert( sizeof( Fiber_type) == sizeof( Uint32));
43mi_static_assert( sizeof( Fiber_attribute_type) == sizeof( Uint32));
44
45
74class IFibers :
75 public base::Interface_declare<0x1e24b118,0xa99a,0x4721,0x98,0x1b,0xae,0x5e,0x25,0x00,0xc7,0x62,
76 neuraylib::IScene_element>
77{
78public:
79
81
82
86 virtual void set_type( Fiber_type fiber_type) = 0;
87
89 virtual Fiber_type get_type() const = 0;
90
92 virtual Size get_fibers_size() const = 0;
93
95
97
103 virtual Fiber_handle_struct add_fiber( Size vertices) = 0;
104
111
118
120
122
128
140
152 Fiber_handle_struct s, Size index, Float32_3_struct& p) const = 0;
153
165
177 Fiber_handle_struct s, Size index, Float64_3_struct& p) const = 0;
178
189 virtual Sint32 set_radius( Fiber_handle_struct s, Size index, Float32 radius) = 0;
190
201 virtual Sint32 get_radius( Fiber_handle_struct s, Size index, Float32& radius) const = 0;
202
213 virtual Sint32 set_radius( Fiber_handle_struct s, Size index, Float64 radius) = 0;
214
225 virtual Sint32 get_radius( Fiber_handle_struct s, Size index, Float64& radius) const = 0;
226
228
230
240
246 virtual bool has_attribute(
247 Fiber_attribute_type type, Mesh_attribute_name name) const = 0;
248
262 Fiber_attribute_type type, Mesh_attribute_name name, Uint32 dim = 1) = 0;
263
270 Fiber_attribute_type type, Mesh_attribute_name name) const = 0;
271
284
300 IAttribute_vector* attribute_vector) = 0;
301
312
314
316
318 virtual Bbox3_struct get_bbox() const = 0;
319
325 const Float64_4_4_struct& transformation_matrix) const = 0;
326
328
330
344 Fiber_handle_struct s, Size index, const Float32_4_struct* data, Size n) = 0;
345
365 const Uint32* fibers, Size n, const Float32_4_struct* data, Size m) = 0;
366
377 virtual Sint32 set_data(const Float32_4_struct* data, Size n) = 0;
378
380};
381 // end group mi_neuray_leaf_nodes
383
384} // namespace neuraylib
385
386} // namespace mi
387
388#endif // MI_NEURAYLIB_IFIBERS_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:184
Interface representing a collection of fibers.
Definition: ifibers.h:77
virtual Fiber_handle_struct add_fiber(Size vertices)=0
Adds a fiber with the given number of vertices.
virtual Sint32 set_radius(Fiber_handle_struct s, Float32 radius)=0
Sets the radius of all vertices of a fiber.
virtual bool has_attribute(Fiber_attribute_type type, Mesh_attribute_name name) const =0
The attribute vectors that can be created are per-fiber or per-control point.
virtual Sint32 get_control_point(Fiber_handle_struct s, Size index, Float32_3_struct &p) const =0
Returns a control point.
virtual Size get_vertices_size(Fiber_handle_struct s) const =0
Returns the number of vertices.
virtual Sint32 set_control_point(Fiber_handle_struct s, Size index, Float64_3_struct p)=0
Sets a control point.
virtual Sint32 set_radius(Fiber_handle_struct s, Size index, Float64 radius)=0
Sets a radius.
virtual Sint32 attach_attribute_vector(IAttribute_vector *attribute_vector)=0
Attaches an attribute to the fiber object.
virtual void set_type(Fiber_type fiber_type)=0
Sets the fiber type.
virtual Sint32 set_data(const Float32_4_struct *data, Size n)=0
Sets an array of control points and radii for the whole fiber object.
virtual Bbox3_struct get_bbox() const =0
Returns the bounding box of the fibers.
virtual Sint32 set_radius(Fiber_handle_struct s, Size index, Float32 radius)=0
Sets a radius.
virtual Sint32 set_fiber_data(Fiber_handle_struct s, Size index, const Float32_4_struct *data, Size n)=0
Sets an array of control points and radii per fiber.
virtual Bbox3_struct get_tight_bbox(const Float64_4_4_struct &transformation_matrix) const =0
Returns the bounding box of the fibers after transformation.
virtual IAttribute_vector * create_attribute_vector(Fiber_attribute_type type, Mesh_attribute_name name, Uint32 dim=1)=0
Creates a fiber object attribute.
virtual const IAttribute_vector * access_attribute_vector(Fiber_attribute_type type, Mesh_attribute_name name) const =0
Returns a fiber object attribute.
virtual IAttribute_vector * edit_attribute_vector(Fiber_attribute_type type, Mesh_attribute_name name)=0
Detaches and returns a fiber object attribute.
virtual Sint32 get_radius(Fiber_handle_struct s, Size index, Float64 &radius) const =0
Returns a radius.
virtual Sint32 get_control_point(Fiber_handle_struct s, Size index, Float64_3_struct &p) const =0
Returns a control point.
virtual Sint32 set_control_point(Fiber_handle_struct s, Size index, Float32_3_struct p)=0
Sets a control point.
virtual Sint32 get_radius(Fiber_handle_struct s, Size index, Float32 &radius) const =0
Returns a radius.
virtual Sint32 set_radius(Fiber_handle_struct s, Float64 radius)=0
Sets the radius of all vertices of a fiber.
virtual Fiber_type get_type() const =0
Returns the fiber type.
virtual Sint32 set_data(const Uint32 *fibers, Size n, const Float32_4_struct *data, Size m)=0
Sets an array of fibers, control points and radii that describes the whole fiber object.
virtual Size get_fibers_size() const =0
Returns the number of fibers.
virtual Sint32 remove_attribute_vector(Fiber_attribute_type type, Mesh_attribute_name name)=0
Removes a fiber object attribute.
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:65
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
double Float64
64-bit float.
Definition: types.h:52
float Float32
32-bit float.
Definition: types.h:51
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Fiber_type
Different fiber types of mi::neuraylib::IFibers.
Definition: ifibers.h:26
Fiber_attribute_type
Different attribute vector types for mi::neuraylib::IFibers.
Definition: ifibers.h:35
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:60
@ FIBER_TYPE_BSPLINE
Uses cubic uniform B-Splines.
Definition: ifibers.h:27
@ FIBER_TYPE_CATMULL_ROM
Uses Catmull-Rom splines.
Definition: ifibers.h:28
@ FIBER_TYPE_LINEAR
Uses linear curves.
Definition: ifibers.h:29
@ FIBER_ATTRIBUTE_PER_PRIMITIVE
Per-fiber attribute.
Definition: ifibers.h:36
@ FIBER_ATTRIBUTE_PER_VERTEX
Per-control point attribute.
Definition: ifibers.h:37
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
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.