Interface representing the geometry of on-demand meshes. More...
#include <isimple_mesh.h>
Public Member Functions | |
virtual Uint32 | data_size () const =0 |
Returns the size of the data arrays. More... | |
virtual const Float32_3_struct * | get_points () const =0 |
Returns the data array for points. More... | |
virtual const Float32_3_struct * | get_normals () const =0 |
Returns the data array for normals. More... | |
virtual Uint32 | get_texture_dimension (Uint32 texture_space_id) const =0 |
Returns the dimension of a texture space. More... | |
virtual const Float32 * | get_texture_coordinates (Uint32 texture_space_id) const =0 |
Returns the data array for a texture space. More... | |
virtual const Float32_3_struct * | get_derivatives () const =0 |
Returns the data array for derivatives. More... | |
virtual Uint32 | get_motion_vector_count () const =0 |
Returns the number of motion vectors per point. More... | |
virtual const Float32_3_struct * | get_motion_vectors () const =0 |
Returns the data array for motion vectors. More... | |
virtual Uint32 | triangles_size () const =0 |
Returns the number of triangles. More... | |
virtual const Uint32_3_struct * | get_triangles () const =0 |
Returns the array of triangle indices. More... | |
virtual bool | has_unique_material () const =0 |
Indicates whether all triangles use the same material. More... | |
virtual const Uint32 * | get_material_indices () const =0 |
Returns the array of material indices. More... | |
virtual Uint32 | get_userdata_dimension (Uint32 userdata_id) const =0 |
Returns the dimension of a userdata array. More... | |
virtual const Float32 * | get_userdata (Uint32 userdata_id) const =0 |
Returns a userdata array. More... | |
virtual const char * | get_userdata_name (Uint32 userdata_id) const =0 |
Returns the name of a userdata array. More... | |
![]() | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
![]() | |
using | Self = Interface_declare< id1, ... > |
Own type. More... | |
using | IID = Uuid_t< id1, ... > |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
Interface representing the geometry of on-demand meshes.
There are five different types of data arrays: for points, normals, texture coordinates, derivatives, and motion vectors. The data array for points is mandatory, all other data arrays are optional. Each type exists at most once, except for texture coordinates where one data array is used per texture space.
The data arrays are referenced via the indices stored at the triangle vertices. Note that only one index is used for all arrays together, hence, all arrays have the same length.
The pointers returned by the various methods have to be valid as long as the interface is valid.
|
pure virtual |
Returns the size of the data arrays.
|
pure virtual |
Returns the data array for derivatives.
Derivatives are computed w.r.t. to the first texture space. If there are no derivatives, i.e., the methods returns nullptr
, the derivatives are approximated internally based on the mesh data and the texture coordinates of the first texture space.
nullptr
if there are no derivatives.
|
pure virtual |
Returns the array of material indices.
If has_unique_material() returns true
, the length of the array is 1. Otherwise, the length is given by triangles_size() (one material index per triangle).
|
pure virtual |
Returns the number of motion vectors per point.
|
pure virtual |
Returns the data array for motion vectors.
nullptr
if there are no motion vectors available.
|
pure virtual |
Returns the data array for normals.
If there are no normals, i.e., the methods returns nullptr
, face normals will be used.
nullptr
if there are no normals available.
|
pure virtual |
Returns the data array for points.
nullptr
, unless data_size() and triangles_size() both return 0).
|
pure virtual |
Returns the data array for a texture space.
texture_space_id | The ID of the texture space. |
nullptr
if there is no texture space with the given ID.
|
pure virtual |
Returns the dimension of a texture space.
The dimension of a texture space is the dimension of the vector data stored for each triangle vertex. Typically, the dimension is 2 representing UV texture coordinates.
texture_space_id | The ID of the texture space. |
|
pure virtual |
Returns the array of triangle indices.
These indices reference the corresponding elements in the data arrays. The indices represent the vertices in CCW order.
|
pure virtual |
Returns a userdata array.
userdata_id | The ID of the userdata array. |
nullptr
if there is no userdata array with the given ID.
|
pure virtual |
Returns the dimension of a userdata array.
The dimension of a userdata array is the dimension of the vector data stored for each triangle vertex.
userdata_id | The ID of the userdata array. |
|
pure virtual |
Returns the name of a userdata array.
userdata_id | The ID of the userdata array. |
nullptr
if there is no userdata array with the given ID.
|
pure virtual |
Indicates whether all triangles use the same material.
|
pure virtual |
Returns the number of triangles.