SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::MeshData Struct Reference

Mesh data for a Mochi actor or model file. More...

#include <mesh_data.h>

Public Member Functions

int GetNumElements () const
 Return the number of elements.
int GetNumNodes () const
 Return the number of nodes.
bool IsEmpty () const
 Return true if the mesh is empty.
 MeshData ()=default
 Default constructor.
 MeshData (MeshDataView const &src)
 Copy from MeshDataView.
bool operator!= (MeshData const &other) const =default
bool operator== (MeshData const &other) const =default

Public Attributes

DynamicArray< int > connectivity
 Flat array of node indices forming the elements.
DynamicArray< realcoordinates
 Flat array of node coordinate values [m].
int nodesPerElement = 0
 Number of nodes (vertices) per element.
std::optional< SkinningDataskinning
 Optional skinning.

Detailed Description

Mesh data for a Mochi actor or model file.

See also
MeshDataView

Definition at line 157 of file mesh_data.h.

Constructor & Destructor Documentation

◆ MeshData() [1/2]

superdex::MeshData::MeshData ( )
default

Default constructor.

◆ MeshData() [2/2]

superdex::MeshData::MeshData ( MeshDataView const & src)
inlineexplicit

Copy from MeshDataView.

Parameters
[in]srcSource data.

Definition at line 40 of file mesh_data_inl.h.

Member Function Documentation

◆ GetNumElements()

int superdex::MeshData::GetNumElements ( ) const
inline

Return the number of elements.

Definition at line 51 of file mesh_data_inl.h.

◆ GetNumNodes()

int superdex::MeshData::GetNumNodes ( ) const
inline

Return the number of nodes.

Definition at line 46 of file mesh_data_inl.h.

◆ IsEmpty()

bool superdex::MeshData::IsEmpty ( ) const
inlinenodiscard

Return true if the mesh is empty.

Definition at line 56 of file mesh_data_inl.h.

◆ operator!=()

bool superdex::MeshData::operator!= ( MeshData const & other) const
default

◆ operator==()

bool superdex::MeshData::operator== ( MeshData const & other) const
default

Member Data Documentation

◆ connectivity

DynamicArray<int> superdex::MeshData::connectivity

Flat array of node indices forming the elements.

Note
Size must be a multiple of nodesPerElement.

Definition at line 186 of file mesh_data.h.

◆ coordinates

DynamicArray<real> superdex::MeshData::coordinates

Flat array of node coordinate values [m].

Note
Size must be a multiple of kMeshDataSpaceDim.

Definition at line 179 of file mesh_data.h.

◆ nodesPerElement

int superdex::MeshData::nodesPerElement = 0

Number of nodes (vertices) per element.

Note
2 for polyline mesh, 3 for triangle mesh, 4 for tetrahedral mesh

Definition at line 172 of file mesh_data.h.

◆ skinning

std::optional<SkinningData> superdex::MeshData::skinning

Optional skinning.

Definition at line 189 of file mesh_data.h.


The documentation for this struct was generated from the following files: