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

A non-owning view of the contents of a Mochi model file. More...

#include <model_data.h>

Public Member Functions

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

Public Attributes

std::optional< DynamicArray< BlendingDataView > > blending
std::optional< Box > box
std::optional< Span< int const > > constrainedNodes
 Indices of mesh nodes that are constrained.
std::optional< MeshDataView > contactSkinMesh
 Optional triangular mesh exposed through the contact-skin queries and, when selected as a deformable actor's contact geometry, for contact quadrature.
std::optional< Span< real const > > elementFrameAxes
 Per-element reference frame axes for polyline meshes.
bool experimentalDataDetected = false
 True if the loaded model contains unsupported experimental data.
std::optional< PerElementSoftMaterialDataView > material
std::optional< MeshDataView > mesh
std::optional< Plane > plane
std::optional< GridSdfDataView > sdf
std::optional< Sphere > sphere
std::optional< MeshDataView > visualMesh

Detailed Description

A non-owning view of the contents of a Mochi model file.

See also
ModelData

Definition at line 268 of file model_data.h.

Constructor & Destructor Documentation

◆ ModelDataView() [1/2]

superdex::ModelDataView::ModelDataView ( )
default

◆ ModelDataView() [2/2]

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

Implicit conversion from ModelData.

Parameters
[in]srcSource data.

Definition at line 40 of file model_data_inl.h.

Member Function Documentation

◆ operator!=()

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

◆ operator==()

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

Member Data Documentation

◆ blending

std::optional<DynamicArray<BlendingDataView> > superdex::ModelDataView::blending

Definition at line 284 of file model_data.h.

◆ box

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

Definition at line 299 of file model_data.h.

◆ constrainedNodes

std::optional<Span<int const> > superdex::ModelDataView::constrainedNodes

Indices of mesh nodes that are constrained.

Definition at line 287 of file model_data.h.

◆ contactSkinMesh

std::optional<MeshDataView> superdex::ModelDataView::contactSkinMesh

Optional triangular mesh exposed through the contact-skin queries and, when selected as a deformable actor's contact geometry, for contact quadrature.

Skinning data is required. For triangular and tetrahedral primary meshes, it 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. Every contact-skin node must be referenced by at least one triangle.

Definition at line 282 of file model_data.h.

◆ elementFrameAxes

std::optional<Span<real const> > superdex::ModelDataView::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 (MeshDataView::nodesPerElement == 2).

Definition at line 296 of file model_data.h.

◆ experimentalDataDetected

bool superdex::ModelDataView::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 316 of file model_data.h.

◆ material

std::optional<PerElementSoftMaterialDataView> superdex::ModelDataView::material

Definition at line 307 of file model_data.h.

◆ mesh

std::optional<MeshDataView> superdex::ModelDataView::mesh

Definition at line 279 of file model_data.h.

◆ plane

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

Definition at line 300 of file model_data.h.

◆ sdf

std::optional<GridSdfDataView> superdex::ModelDataView::sdf

Definition at line 304 of file model_data.h.

◆ sphere

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

Definition at line 301 of file model_data.h.

◆ visualMesh

std::optional<MeshDataView> superdex::ModelDataView::visualMesh

Definition at line 280 of file model_data.h.


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