Iray SDK API nvidia_logo_transpbg.gif Up
iattribute_vector.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IATTRIBUTE_VECTOR_H
8#define MI_NEURAYLIB_IATTRIBUTE_VECTOR_H
9
12
13namespace mi {
14
15namespace neuraylib {
16
60{
61 // Tag used to indicate no attribute.
62 ATTR_NONE = 0,
63
66
85
88
95
102
105
112
115
118
119 // Undocumented, for alignment only.
120 ATTR_FORCE_32_BIT = 0xffffffffU
121};
122
123mi_static_assert( sizeof( Mesh_attribute_name) == sizeof( Uint32));
124
132
137
138 // Undocumented, for alignment only.
139 CONNECTIVITY_FORCE_32_BIT = 0xffffffffU
140};
141
142mi_static_assert( sizeof( Connectivity_map_type) == sizeof( Uint32));
143
144
183 public base::Interface_declare<0xfbe79601,0x3c89,0x4a8d,0xbf,0x0d,0xae,0x21,0x59,0x9a,0xbf,0x80>
184{
185public:
187
188
190 virtual Uint32 size() const = 0;
191
193 virtual Uint32 capacity() const = 0;
194
196 virtual void resize( Uint32 size) = 0;
197
199 virtual void reserve( Uint32 size) = 0;
200
204 virtual void clear() = 0;
205
210 virtual bool is_valid_attribute() const = 0;
211
223 virtual Uint32 array_size() const = 0;
224
226
228
233 virtual Uint32 get_uint32( Uint32 index) const = 0;
234
241 virtual Sint32 append_uint32( Uint32 u) = 0;
242
253 virtual Sint32 append_uint32( const Uint32* u, Uint32 k, Size n = 1) = 0;
254
262 virtual Sint32 set_uint32( Uint32 index, Uint32 u) = 0;
263
276 virtual Sint32 set_uint32( Uint32 index, const Uint32* u, Uint32 k, Size n = 1) = 0;
277
279
281
286 virtual const Float32_3_struct& get_vector3( Uint32 index) const = 0;
287
297 virtual Sint32 append_vector3( const Float32_3_struct& v) = 0;
298
308 virtual Sint32 set_vector3( Uint32 index, const Float32_3_struct& v) = 0;
309
311
313
319 virtual const Float32_3_struct* get_vector3( Uint32 index, Uint32 k) const = 0;
320
330 virtual Sint32 append_vector3( const Float32_3_struct* v, Uint32 k, Size n = 1) = 0;
331
345 Uint32 index, const Float32_3_struct* v, Uint32 k, Size n = 1) = 0;
346
348
350
356 virtual const Float32* get_float32( Uint32 index, Uint32 k) const = 0;
357
367 virtual Sint32 append_float32( const Float32* f, Uint32 k, Size n = 1) = 0;
368
381 virtual Sint32 set_float32( Uint32 index, const Float32* f, Uint32 k, Size n = 1) = 0;
382
384
386
396 virtual Sint32 set_user_attribute_name( const char* name) = 0;
397
399 virtual const char* get_user_attribute_name() const = 0;
400
402};
403 // end group mi_neuray_leaf_nodes
405
406} // namespace neuraylib
407
408} // namespace mi
409
410#endif // MI_NEURAYLIB_IATTRIBUTE_VECTOR_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
virtual Sint32 set_vector3(Uint32 index, const Float32_3_struct *v, Uint32 k, Size n=1)=0
Sets one or more k -tuples of 3d-vectors starting at position index to the new 3d-vectors v.
virtual const Float32 * get_float32(Uint32 index, Uint32 k) const =0
Returns a pointer to the k values of type mi::Float32 at position index.
virtual Sint32 set_uint32(Uint32 index, const Uint32 *u, Uint32 k, Size n=1)=0
Sets one or more values of type mi::Uint32 starting at position index.
virtual Sint32 set_vector3(Uint32 index, const Float32_3_struct &v)=0
Sets the 3d-vector at position index to the new 3d-vector v.
virtual Sint32 append_vector3(const Float32_3_struct &v)=0
Appends a new 3d-vector to the attribute vector.
virtual const char * get_user_attribute_name() const =0
Returns the name of this attribute vector or NULL in case no name was given.
virtual bool is_valid_attribute() const =0
Indicates whether this attribute vector is valid.
virtual Uint32 array_size() const =0
Returns the array size of the vector elements.
virtual Uint32 size() const =0
Returns the size of the attribute vector, i.e., number of elements.
virtual Sint32 append_float32(const Float32 *f, Uint32 k, Size n=1)=0
Appends one or more k -tuples of floats to the attribute vector from the array f.
virtual Sint32 set_uint32(Uint32 index, Uint32 u)=0
Sets the value of type mi::Uint32 at position index to the new value u.
virtual void clear()=0
Clears the attribute vector.
virtual void reserve(Uint32 size)=0
Reserves new capacity size for elements.
virtual Sint32 append_uint32(const Uint32 *u, Uint32 k, Size n=1)=0
Appends one or more values of type mi::Uint32 to the attribute vector.
virtual const Float32_3_struct * get_vector3(Uint32 index, Uint32 k) const =0
Returns a pointer to the k values of type mi::Float32_3 at position index.
virtual void resize(Uint32 size)=0
Resizes the size of the attribute vector.
virtual Sint32 set_user_attribute_name(const char *name)=0
Sets a name for this attribute vector.
virtual Sint32 set_float32(Uint32 index, const Float32 *f, Uint32 k, Size n=1)=0
Sets one or more k -tuples of floats at starting position index to the new floats f.
virtual Sint32 append_vector3(const Float32_3_struct *v, Uint32 k, Size n=1)=0
Appends one or more k -tuples of 3d-vectors to the attribute vector from the array v.
virtual const Float32_3_struct & get_vector3(Uint32 index) const =0
Returns the value of type mi::Float32_3 at position index.
virtual Uint32 capacity() const =0
Returns the capacity reserved in the vector for elements.
virtual Uint32 get_uint32(Uint32 index) const =0
Returns the value of type mi::Uint32 at position index.
virtual Sint32 append_uint32(Uint32 u)=0
Appends a value of type mi::Uint32 to the attribute vector.
#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
float Float32
32-bit float.
Definition: types.h:51
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mesh_attribute_name
Symbolic constants for mesh attributes.
Definition: iattribute_vector.h:60
Connectivity_map_type
Symbolic constants for different connectivity types.
Definition: iattribute_vector.h:131
@ ATTR_TEXTURE_NUM
Total number of supported texture spaces.
Definition: iattribute_vector.h:104
@ ATTR_USER
User data values of type mi::Float32[] per point or per vertex.
Definition: iattribute_vector.h:111
@ ATTR_MATERIAL_INDEX
Material index of type mi::Uint32 per primitive.
Definition: iattribute_vector.h:94
@ ATTR_TEXTURE
Texture coordinates of type mi::Float32[] per point or per vertex (also called texture space).
Definition: iattribute_vector.h:101
@ ATTR_DERIVATIVES
Surface derivatives of type mi::Float32_3[2] per point or per vertex.
Definition: iattribute_vector.h:87
@ ATTR_MAX
Maximum legal attribute number + 1.
Definition: iattribute_vector.h:117
@ ATTR_USER_NUM
Total number of supported user data arrays.
Definition: iattribute_vector.h:114
@ ATTR_NORMAL
Surface normals of type mi::Float32_3 per point or per vertex.
Definition: iattribute_vector.h:65
@ ATTR_MOTION
Motion vectors of type mi::Float32_3[] per point or per vertex.
Definition: iattribute_vector.h:84
@ CONNECTIVITY_MAP_GENERIC
A generic connectivity allows to map the vertices of every polygon to arbitrary indices.
Definition: iattribute_vector.h:136
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Generic storage class template for math vector representations storing DIM elements of type T.
Definition: vector.h:135
Typedefs for types from the math API.