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

A non-owning view of the 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.
 MeshDataView ()=default
 MeshDataView (MeshData const &src)
 Implicit conversion from MeshData.
bool operator!= (MeshDataView const &other) const =default
bool operator== (MeshDataView const &other) const =default

Public Attributes

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

Detailed Description

A non-owning view of the mesh data for a Mochi actor or model file.

See also
MeshData

Definition at line 218 of file mesh_data.h.

Constructor & Destructor Documentation

◆ MeshDataView() [1/2]

superdex::MeshDataView::MeshDataView ( )
default

◆ MeshDataView() [2/2]

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

Implicit conversion from MeshData.

Parameters
[in]srcSource data.

Definition at line 34 of file mesh_data_inl.h.

Member Function Documentation

◆ GetNumElements()

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

Return the number of elements.

Definition at line 65 of file mesh_data_inl.h.

◆ GetNumNodes()

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

Return the number of nodes.

Definition at line 60 of file mesh_data_inl.h.

◆ IsEmpty()

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

Return true if the mesh is empty.

Definition at line 70 of file mesh_data_inl.h.

◆ operator!=()

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

◆ operator==()

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

Member Data Documentation

◆ connectivity

Span<int const> superdex::MeshDataView::connectivity

Flat array of node indices forming the elements.

Note
Size must be a multiple of nodesPerElement.

Definition at line 247 of file mesh_data.h.

◆ coordinates

Span<real const> superdex::MeshDataView::coordinates

Flat array of node coordinate values [m].

Note
Size must be a multiple of kMeshDataSpaceDim.

Definition at line 240 of file mesh_data.h.

◆ nodesPerElement

int superdex::MeshDataView::nodesPerElement = 0

Number of nodes (vertices) per element.

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

Definition at line 233 of file mesh_data.h.

◆ skinning

std::optional<SkinningDataView> superdex::MeshDataView::skinning

Optional skinning.

Definition at line 250 of file mesh_data.h.


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