Iray SDK API nvidia_logo_transpbg.gif Up
ipolygon_mesh.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IPOLYGON_MESH_H
8#define MI_NEURAYLIB_IPOLYGON_MESH_H
9
15
16namespace mi {
17
18namespace neuraylib {
19
126 public base::Interface_declare<0x598d264b,0x1d1f,0x40c9,0x88,0xe6,0x54,0x19,0x30,0x08,0xc7,0xb2,
127 neuraylib::IScene_element>
128{
129public:
130
132
133
135 virtual Uint32 points_size() const = 0;
136
143 virtual Uint32 points_capacity() const = 0;
144
151 virtual void reserve_points( Uint32 n) = 0;
152
162 virtual Sint32 point( Uint32 index, Float32_3_struct& p) const = 0;
163
173 virtual Sint32 point( Uint32 index, Float64_3_struct& p) const = 0;
174
180 virtual Uint32 append_point( const Float32_3_struct& p) = 0;
181
187 virtual Uint32 append_point( const Float64_3_struct& p) = 0;
188
198 virtual Sint32 set_point( Uint32 index, const Float32_3_struct& p) = 0;
199
209 virtual Sint32 set_point( Uint32 index, const Float64_3_struct& p) = 0;
210
212
214
216 virtual Uint32 polygons_size() const = 0;
217
222
224 virtual bool is_hole( Polygon_handle_struct p) const = 0;
225
228 virtual Uint32 indices_size() const = 0;
229
231 virtual bool is_polygon_size_constant() const = 0;
232
242 virtual Polygon_handle_struct add_polygon( Uint32 num_vertices, bool hole = false) = 0;
243
245
247
252
261
278
280
282
291
299
311
327
340
342
344
349 virtual bool has_attribute( Mesh_attribute_name name) const = 0;
350
364 Mesh_attribute_name name, Uint32 dim = 1) = 0;
365
372 Mesh_attribute_name name) const = 0;
373
385
401 virtual Sint32 attach_attribute_vector( IAttribute_vector* attribute_vector) = 0;
402
411
413
415
417 virtual Bbox3_struct get_bbox() const = 0;
418
424 const Float64_4_4_struct& transformation_matrix) const = 0;
425
427
429
434 virtual void set_maximum_displacement( Float32 displacement) = 0;
435
440
442};
443 // end group mi_neuray_leaf_nodes
445
446} // namespace neuraylib
447
448} // namespace mi
449
450#endif // MI_NEURAYLIB_IPOLYGON_MESH_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
A connectivity class for polygon mesh geometry and their attributes.
Definition: ipolygon_connectivity.h:63
Interface representing a polygon mesh.
Definition: ipolygon_mesh.h:128
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 mesh has a particular mesh attribute (per-primitive or other types)
virtual Uint32 append_point(const Float32_3_struct &p)=0
Adds a point p to the end of all points and returns the index of the new point.
virtual IAttribute_vector * edit_attribute_vector(Mesh_attribute_name name)=0
Detaches and returns a per-primitive mesh attribute.
virtual Uint32 polygon_corners_size(Polygon_handle_struct p) const =0
Returns the number of vertices for a given polygon p.
virtual IPolygon_connectivity * create_connectivity(Connectivity_map_type map_type=CONNECTIVITY_MAP_GENERIC)=0
Creates a new connectivity for non-per-primitive attributes.
virtual Sint32 attach_connectivity(IPolygon_connectivity *connectivity)=0
Attaches a given connectivity to the mesh.
virtual Bbox3_struct get_bbox() const =0
Returns the bounding box of the polygon mesh.
virtual Float32 get_maximum_displacement() const =0
Returns the maximum displacement of the polygon mesh.
virtual Polygon_handle_struct add_polygon(Uint32 num_vertices, bool hole=false)=0
Adds a polygon to the mesh.
virtual Sint32 attach_attribute_vector(IAttribute_vector *attribute_vector)=0
Attaches a given per-primitive mesh attribute to the mesh.
virtual Sint32 point(Uint32 index, Float32_3_struct &p) const =0
Returns the coordinates of the point of index index in the output parameter p.
virtual Sint32 remove_attribute_vector(Mesh_attribute_name name)=0
Removes a per-primitive mesh attribute.
virtual Sint32 point(Uint32 index, Float64_3_struct &p) const =0
Returns the coordinates of the point of index index in the output parameter p.
virtual Uint32 indices_size() const =0
Returns the total number of indices, i.e., the sum of the number of vertices of all polygons.
virtual bool is_polygon_size_constant() const =0
Indicates whether all polygons have the same number of vertices.
virtual const IPolygon_connectivity * access_connectivity(Mesh_attribute_name name) const =0
Returns the connectivity for a given mesh attribute.
virtual const IAttribute_vector * access_attribute_vector(Mesh_attribute_name name) const =0
Returns a per-primitive mesh attribute.
virtual Bbox3_struct get_tight_bbox(const Float64_4_4_struct &transformation_matrix) const =0
Returns the bounding box of the polygon mesh after transformation.
virtual Uint32 append_point(const Float64_3_struct &p)=0
Adds a point p to the end of all points and returns the index of the new point.
virtual Uint32 polygons_size() const =0
Returns the number of polygons.
virtual Sint32 attach_mesh_connectivity(IPolygon_connectivity *connectivity)=0
Attaches the mesh connectivity to the mesh.
virtual const IPolygon_connectivity * access_mesh_connectivity() const =0
Returns the mesh connectivity.
virtual IPolygon_connectivity * edit_mesh_connectivity()=0
Detaches and returns the mesh connectivity.
virtual bool is_hole(Polygon_handle_struct p) const =0
Indicates whether the polygon p represents a hole.
virtual Sint32 set_point(Uint32 index, const Float64_3_struct &p)=0
Sets the point of index index to the new point p.
virtual Uint32 points_size() const =0
Returns the number of points in the mesh.
virtual Uint32 points_capacity() const =0
Returns the number of points for which space is allocated in the mesh.
virtual IPolygon_connectivity * edit_connectivity(Mesh_attribute_name name)=0
Detaches and returns the connectivity for a given mesh attribute.
virtual Sint32 set_point(Uint32 index, const Float32_3_struct &p)=0
Sets the point of index index to the new point p.
virtual Sint32 remove_connectivity(Mesh_attribute_name name)=0
Removes the connectivity for a non-per-primitive mesh attribute.
virtual void reserve_points(Uint32 n)=0
Reserves space for at least n points.
virtual void set_maximum_displacement(Float32 displacement)=0
Sets the maximum displacement of the polygon mesh.
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
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
@ CONNECTIVITY_MAP_GENERIC
A generic connectivity allows to map the vertices of every polygon to arbitrary indices.
Definition: iattribute_vector.h:136
Attribute vectors, used for triangle and polygon meshes.
Simple integer-based handles used by mesh interfaces.
Polygon connectivities and associated helper classes.
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.