Iray SDK API nvidia_logo_transpbg.gif Up
ifibers.h
Go to the documentation of this file.
1//*****************************************************************************
2// Copyright 2024 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{
31 FIBER_TYPE_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
32};
33
36{
39 FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU // Undocumented, for alignment only.
40};
41
42
43mi_static_assert( sizeof( Fiber_type) == sizeof( Uint32));
44mi_static_assert( sizeof( Fiber_attribute_type) == sizeof( Uint32));
45
46
77class IFibers :
78 public base::Interface_declare<0x1e24b118,0xa99a,0x4721,0x98,0x1b,0xae,0x5e,0x25,0x00,0xc7,0x62,
79 neuraylib::IScene_element>
80{
81public:
82
84
85
94 virtual Sint32 set_type( Fiber_type fiber_type) = 0;
95
97 virtual Fiber_type get_type() const = 0;
98
100 virtual Size get_fibers_size() const = 0;
101
103
105
112 virtual Fiber_handle_struct add_fiber( Size vertices) = 0;
113
120
127
129
131
137
149
161 Fiber_handle_struct s, Size index, Float32_3_struct& p) const = 0;
162
174
186 Fiber_handle_struct s, Size index, Float64_3_struct& p) const = 0;
187
198 virtual Sint32 set_radius( Fiber_handle_struct s, Size index, Float32 radius) = 0;
199
210 virtual Sint32 get_radius( Fiber_handle_struct s, Size index, Float32& radius) const = 0;
211
222 virtual Sint32 set_radius( Fiber_handle_struct s, Size index, Float64 radius) = 0;
223
234 virtual Sint32 get_radius( Fiber_handle_struct s, Size index, Float64& radius) const = 0;
235
237
239
249
255 virtual bool has_attribute(
256 Fiber_attribute_type type, Mesh_attribute_name name) const = 0;
257
271 Fiber_attribute_type type, Mesh_attribute_name name, Uint32 dim = 1) = 0;
272
279 Fiber_attribute_type type, Mesh_attribute_name name) const = 0;
280
293
309 IAttribute_vector* attribute_vector) = 0;
310
321
323
325
327 virtual Bbox3_struct get_bbox() const = 0;
328
334 const Float64_4_4_struct& transformation_matrix) const = 0;
335
337
339
353 Fiber_handle_struct s, Size index, const Float32_4_struct* data, Size n) = 0;
354
374 const Uint32* fibers, Size n, const Float32_4_struct* data, Size m) = 0;
375
386 virtual Sint32 set_data(const Float32_4_struct* data, Size n) = 0;
387
389};
390 // end group mi_neuray_leaf_nodes
392
393} // namespace neuraylib
394
395} // namespace mi
396
397#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:80
virtual Fiber_handle_struct add_fiber(Size vertices)=0
Adds a fiber with the given number of vertices.
virtual Sint32 set_type(Fiber_type fiber_type)=0
Sets the fiber type.
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 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:36
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:60
@ FIBER_TYPE_BEZIER
Uses cubic Bezier curves.
Definition: ifibers.h:30
@ 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:37
@ FIBER_ATTRIBUTE_PER_VERTEX
Per-control point attribute.
Definition: ifibers.h:38
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.