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

The contents of a Mochi model file. More...

#include <model_data.h>

Public Member Functions

 ModelData ()=default
 ModelData (ModelDataView const &src)
 Copy from ModelDataView.
bool operator!= (ModelData const &other) const =default
bool operator== (ModelData const &other) const =default

Public Attributes

std::optional< DynamicArray< BlendingData > > blending
std::optional< Box > box
std::optional< DynamicArray< int > > constrainedNodes
 Indices of mesh nodes that are constrained.
std::optional< MeshData > contactSkinMesh
 Optional triangular mesh used for surface queries and, when selected as a shell or rod actor's contact geometry, for contact quadrature.
std::optional< DynamicArray< real > > elementFrameAxes
 Per-element reference frame axes for polyline meshes.
bool experimentalDataDetected = false
 True if the loaded model contains unsupported experimental data.
std::optional< PerElementSoftMaterialData > material
std::optional< MeshData > mesh
std::optional< Plane > plane
std::optional< GridSdfData > sdf
std::optional< Sphere > sphere
std::optional< MeshData > visualMesh

Detailed Description

The contents of a Mochi model file.

See also
ModelDataView

Definition at line 185 of file model_data.h.

Constructor & Destructor Documentation

◆ ModelData() [1/2]

superdex::ModelData::ModelData ( )
default

◆ ModelData() [2/2]

superdex::ModelData::ModelData ( ModelDataView const & src)
inlineexplicit

Copy from ModelDataView.

Parameters
[in]srcSource data.

Definition at line 76 of file model_data_inl.h.

Member Function Documentation

◆ operator!=()

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

◆ operator==()

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

Member Data Documentation

◆ blending

std::optional<DynamicArray<BlendingData> > superdex::ModelData::blending

Definition at line 207 of file model_data.h.

◆ box

std::optional<Box> superdex::ModelData::box

Definition at line 222 of file model_data.h.

◆ constrainedNodes

std::optional<DynamicArray<int> > superdex::ModelData::constrainedNodes

Indices of mesh nodes that are constrained.

Definition at line 210 of file model_data.h.

◆ contactSkinMesh

std::optional<MeshData> superdex::ModelData::contactSkinMesh

Optional triangular mesh used for surface queries and, when selected as a shell or rod actor's contact geometry, for contact quadrature.

For triangular and tetrahedral primary meshes, the skinning data is a node-based linear embedding whose indices reference primary-mesh nodes. For polylines, the indices reference primary-mesh elements and define the rod's element-based embedding.

Definition at line 206 of file model_data.h.

◆ elementFrameAxes

std::optional<DynamicArray<real> > superdex::ModelData::elementFrameAxes

Per-element reference frame axes for polyline meshes.

Flat array of unit vectors (3 reals per element), each orthogonal to its element's tangent. Only valid when the mesh is a polyline (MeshData::nodesPerElement == 2).

Definition at line 219 of file model_data.h.

◆ experimentalDataDetected

bool superdex::ModelData::experimentalDataDetected = false

True if the loaded model contains unsupported experimental data.

Some model files contain additional data for experimental features (e.g. ROMs), which cannot be represented by this struct. This flag is set during loading when such data is detected.

Definition at line 239 of file model_data.h.

◆ material

std::optional<PerElementSoftMaterialData> superdex::ModelData::material

Definition at line 230 of file model_data.h.

◆ mesh

std::optional<MeshData> superdex::ModelData::mesh

Definition at line 196 of file model_data.h.

◆ plane

std::optional<Plane> superdex::ModelData::plane

Definition at line 223 of file model_data.h.

◆ sdf

std::optional<GridSdfData> superdex::ModelData::sdf

Definition at line 227 of file model_data.h.

◆ sphere

std::optional<Sphere> superdex::ModelData::sphere

Definition at line 224 of file model_data.h.

◆ visualMesh

std::optional<MeshData> superdex::ModelData::visualMesh

Definition at line 197 of file model_data.h.


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