opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
simbody_mesh_loader.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <filesystem>
8#include <span>
9#include <string_view>
10
11namespace SimTK { class PolygonalMesh; }
12
13namespace opyn
14{
15 // returns an `Mesh` converted from the given `SimTK::PolygonalMesh`
16 osc::Mesh ToOscMesh(const SimTK::PolygonalMesh&);
17
18 // returns a list of SimTK mesh format file suffixes (e.g. `{"vtp", "stl"}`)
19 std::span<const std::string_view> GetSupportedSimTKMeshFormats();
20 std::span<const osc::FileDialogFilter> GetSupportedSimTKMeshFormatsAsFilters();
21
22 // returns an `Mesh` loaded from disk via simbody's APIs
23 osc::Mesh LoadMeshViaSimbody(const std::filesystem::path&);
24
25 // populate the `SimTK::PolygonalMesh` from the given indexed mesh data
26 void AssignIndexedVerts(SimTK::PolygonalMesh&, std::span<const osc::Vector3>, osc::MeshIndicesView);
27}
Definition mesh_indices_view.h:22
Definition mesh.h:33
Definition custom_decoration_generator.h:6
Definition component_registry.h:14
std::span< const std::string_view > GetSupportedSimTKMeshFormats()
osc::Mesh LoadMeshViaSimbody(const std::filesystem::path &)
void AssignIndexedVerts(SimTK::PolygonalMesh &, std::span< const osc::Vector3 >, osc::MeshIndicesView)
osc::Mesh ToOscMesh(osc::SceneCache &, const OpenSim::Model &, const SimTK::State &, const OpenSim::Mesh &, const OpenSimDecorationOptions &, float fixupScaleFactor)
std::span< const osc::FileDialogFilter > GetSupportedSimTKMeshFormatsAsFilters()