Defines the vertices and per-vertex attributes of a subset of a triangle mesh. More...
#include <itriangle_mesh_subset.h>
Inherits mi::base::Interface_declare< 0x19fa1bbf, ... >.
Public Types | |
enum | Triflags |
Triangle flags. More... | |
Public Member Functions | |
virtual bool | initialize (const mi::math::Bbox_struct< mi::Float32, 3 > &bounding_box, const mi::math::Vector_struct< mi::Float32, 3 > *vertices, mi::Uint32 nb_vertices, const mi::Uint32 *vertex_indices, mi::Uint32 nb_indices, const mi::Uint64 *global_triangle_ids, mi::Uint64 nb_global_triangle_ids, const mi::math::Vector_struct< mi::Float32, 3 > *normals=0, mi::Uint32 nb_normals=0, const mi::math::Vector_struct< mi::Float32, 2 > *texture_coordinates=0, mi::Uint32 nb_texture_coordinates=0, const mi::math::Color_struct *colors=0, mi::Uint32 nb_colors=0, const mi::Uint32 *normal_indices=0, const mi::Uint32 *tex_coord_indices=0, const mi::Uint32 *color_indices=0, const mi::Uint32 *colormap_indices=0, const mi::Uint16 *materials=0, mi::Uint32 nb_materials=0, const ITriangle_mesh_subset::Triflags *triangle_flags=0, mi::Uint32 nb_triangle_flags=0)=0 |
Initializes the triangle mesh subset by assigning vertices and per-vertex attributes. More... | |
virtual mi::Uint32 | get_nb_triangles () const =0 |
Returns the number of triangles in the sub-mesh. More... | |
virtual mi::Uint32 | get_nb_vertices () const =0 |
Returns the number of vertices. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 3 > * | get_vertices () const =0 |
Returns the vertex position array. More... | |
virtual const mi::Uint32 * | get_vertex_indices () const =0 |
Returns the tri-vertex to vertex position index array. More... | |
virtual mi::Uint32 | get_nb_normals () const =0 |
Returns the number of vertex normals. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 3 > * | get_normals () const =0 |
Returns the vertex normals array. More... | |
virtual const mi::Uint32 * | get_normal_indices () const =0 |
Returns the tri-vertex to normal index array. More... | |
virtual mi::Uint32 | get_nb_texture_coordinates () const =0 |
Returns the number of texture coordinates. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 2 > * | get_texture_coordinates () const =0 |
Returns the vertex texture coordinate array. More... | |
virtual const mi::Uint32 * | get_texture_coordinate_indices () const =0 |
Returns the tri-vertex to texture coordinate index array. More... | |
virtual mi::Uint32 | get_nb_colors () const =0 |
Returns the number of colors. More... | |
virtual const mi::math::Color_struct * | get_colors () const =0 |
Returns the vertex color array. More... | |
virtual const mi::Uint32 * | get_color_indices () const =0 |
Returns the tri-vertex to color index. More... | |
virtual const mi::Uint32 * | get_colormap_indices () const =0 |
Returns the tri-vertex to colormap index array. More... | |
virtual mi::Uint32 | get_nb_materials () const =0 |
Returns the number of materials. More... | |
virtual const mi::Uint16 * | get_materials () const =0 |
Returns the triangle materials. More... | |
virtual mi::Uint32 | get_nb_triangle_flags () const =0 |
Returns the number of triangle flags. More... | |
virtual const ITriangle_mesh_subset::Triflags * | get_triangle_flags () const =0 |
Returns the triangle flags. More... | |
virtual const mi::Uint64 * | get_global_triangle_ids () const =0 |
Returns the IDs of the triangles in the sub-mesh. More... | |
virtual const mi::math::Bbox_struct< mi::Float32, 3 > & | get_bounding_box () const =0 |
Returns the bounding box of the sub-mesh. More... | |
Defines the vertices and per-vertex attributes of a subset of a triangle mesh.
Triangle flags.
Specifies edge visibility for a given triangle with vertices (p0, p1, p2) and edges (e01, e12, e20). This is used by get_edge_flags() when an IWireframe_rendering_style attribute is used with the mesh.
|
pure virtual |
Returns the bounding box of the sub-mesh.
|
pure virtual |
Returns the tri-vertex to color index.
The array length is number of triangles * 3.
|
pure virtual |
Returns the tri-vertex to colormap index array.
The array length is number of triangles * 3.
|
pure virtual |
Returns the vertex color array.
|
pure virtual |
Returns the IDs of the triangles in the sub-mesh.
The array length is number of triangles.
|
pure virtual |
Returns the triangle materials.
|
pure virtual |
Returns the number of colors.
|
pure virtual |
Returns the number of materials.
|
pure virtual |
Returns the number of vertex normals.
|
pure virtual |
Returns the number of texture coordinates.
|
pure virtual |
Returns the number of triangle flags.
|
pure virtual |
Returns the number of triangles in the sub-mesh.
|
pure virtual |
Returns the number of vertices.
|
pure virtual |
Returns the tri-vertex to normal index array.
The array length is number of triangles * 3.
|
pure virtual |
Returns the vertex normals array.
|
pure virtual |
Returns the tri-vertex to texture coordinate index array.
The array length is number of triangles * 3.
|
pure virtual |
Returns the vertex texture coordinate array.
|
pure virtual |
Returns the triangle flags.
|
pure virtual |
Returns the tri-vertex to vertex position index array.
The array length is number of triangles * 3.
|
pure virtual |
Returns the vertex position array.
|
pure virtual |
Initializes the triangle mesh subset by assigning vertices and per-vertex attributes.
When an array is provided (e.g. normals
or texture_coordinates
), but its index array (normal_indices
, tex_coord_indices
) is 0, then the vertex index array (vertex_indices
) will be used instead. This way, you can share the attribute index map.
The arrays that map a triangle index to an attribute index are all separate.
[in] | bounding_box | bounding box of the sub-mesh (required) |
[in] | vertices | vertex position array (required) |
[in] | nb_vertices | vertex position array size (required) |
[in] | vertex_indices | tri-vertex to vertex index array (required) |
[in] | nb_indices | index array size (required) |
[in] | global_triangle_ids | global triangle ID array (required) |
[in] | nb_global_triangle_ids | global triangle ID array size (required) |
[in] | normals | vertex normal array (optional) |
[in] | nb_normals | vertex normal array size (optional) |
[in] | texture_coordinates | vertex texture coordinate array (optional) |
[in] | nb_texture_coordinates | vertex texture coordinate array size (optional) |
[in] | colors | vertex color value array (optional) |
[in] | nb_colors | vertex color value array size (optional) |
[in] | normal_indices | tri-vertex to normal index array (optional) |
[in] | tex_coord_indices | tri-vertex to texture coordinate index array (optional) |
[in] | color_indices | tri-vertex to color value index array (optional) |
[in] | colormap_indices | tri-vertex to colormap index array (optional) |
[in] | materials | triangle material array (optional) |
[in] | nb_materials | triangle material array size (optional) |
[in] | triangle_flags | triangle flag array (optional) |
[in] | nb_triangle_flags | triangle flag array size (optional) |