98#if MOCHI_LANGUAGE_CPP20
174#if MOCHI_LANGUAGE_CPP20
198 std::optional<DynamicArray<BlendingData>>
blending;
218 std::optional<GridSdfData>
sdf;
221 std::optional<PerElementSoftMaterialData>
material;
232#if MOCHI_LANGUAGE_CPP20
268 std::optional<MeshDataView>
mesh;
271 std::optional<DynamicArray<BlendingDataView>>
blending;
291 std::optional<GridSdfDataView>
sdf;
294 std::optional<PerElementSoftMaterialDataView>
material;
305#if MOCHI_LANGUAGE_CPP20
344#include "model_data_inl.h"
A dynamically resizable array with syntax and behavior similar to std::pmr::vector.
@ JSON
JSON format (text).
@ H5
HDF5 format (binary). Requires MOCHI_USE_HDF5.
MeshFileType
Mesh file format hint for Context::LoadShapeFromBytes and model-loading APIs that read from byte buff...
@ Legacy
Auto-detect between HDF5 and JSON (default behavior).
@ STL
STL format (Stereolithography).
@ PLY
PLY format (Stanford Polygon).
@ OFF
OFF format (Object File Format).
@ OBJ
OBJ format (Wavefront).
@ Count
Number of actor type enum values.
#define MOCHI_STRUCT_END()
#define MOCHI_ENUM_BEGIN(name)
#define MOCHI_FIELD(name)
#define MOCHI_STRUCT_BEGIN(name)
#define MOCHI_ATTRIBUTE(...)
#define MOCHI_ENUM_ITEM(name)
A non-owning view of precomputed grid-based signed-distance-field data.
Aabb negativeValueBounds
Spatial bounds of the portion of the SDF grid with negative values.
Aabb bounds
Spatial bounds of the SDF grid.
std::optional< Real3 > translation
Optional parent-from-grid translation [m] to apply at runtime.
Span< real const > values
Signed distance values [m].
std::optional< Quaternion > rotation
Optional parent-from-grid rotation to apply at runtime.
std::optional< Real3 > scale
Optional parent-from-grid per-axis scale to apply at runtime.
GridSdfDataView()=default
Int3 dims
Dimensions of the SDF grid in X, Y, and Z.
bool operator==(GridSdfDataView const &other) const =default
bool operator!=(GridSdfDataView const &other) const =default
Data for a pre-computed SDF grid.
DynamicArray< real > values
Signed distance values [m].
Aabb bounds
Spatial bounds of the SDF grid.
std::optional< Quaternion > rotation
Optional parent-from-grid rotation to apply at runtime.
Aabb negativeValueBounds
Spatial bounds of the portion of the SDF grid with negative values.
Int3 dims
Dimensions of the SDF grid in X, Y, and Z.
bool operator!=(GridSdfData const &other) const =default
std::optional< Real3 > translation
Optional parent-from-grid translation [m] to apply at runtime.
bool operator==(GridSdfData const &other) const =default
std::optional< Real3 > scale
Optional parent-from-grid per-axis scale to apply at runtime.
A non-owning view of the contents of a Mochi model file.
std::optional< GridSdfDataView > sdf
std::optional< MeshDataView > visualMesh
bool operator!=(ModelDataView const &other) const =default
std::optional< MeshDataView > mesh
std::optional< Sphere > sphere
std::optional< Plane > plane
bool operator==(ModelDataView const &other) const =default
std::optional< Span< real const > > elementFrameAxes
Per-element reference frame axes for polyline meshes.
std::optional< DynamicArray< BlendingDataView > > blending
std::optional< PerElementSoftMaterialDataView > material
std::optional< Span< int const > > constrainedNodes
Indices of mesh nodes that are constrained.
bool experimentalDataDetected
True if the loaded model contains unsupported experimental data.
The contents of a Mochi model file.
std::optional< DynamicArray< BlendingData > > blending
bool operator==(ModelData const &other) const =default
std::optional< Sphere > sphere
bool experimentalDataDetected
True if the loaded model contains unsupported experimental data.
std::optional< DynamicArray< int > > constrainedNodes
Indices of mesh nodes that are constrained.
std::optional< MeshData > mesh
std::optional< Plane > plane
std::optional< DynamicArray< real > > elementFrameAxes
Per-element reference frame axes for polyline meshes.
bool operator!=(ModelData const &other) const =default
std::optional< PerElementSoftMaterialData > material
std::optional< MeshData > visualMesh
std::optional< GridSdfData > sdf