Add mjmMesh to C API.

PiperOrigin-RevId: 606642150
Change-Id: Iae69ce8426729b1e2394d9da9f349a2f0f7ccf98
This commit is contained in:
Alessio Quaglino
2024-02-13 09:08:55 -08:00
committed by Copybara-Service
parent 06505f49f9
commit 9ecd700923
11 changed files with 234 additions and 200 deletions
+10
View File
@@ -137,6 +137,16 @@ mjmFrame* mjm_addFrame(mjmBody* bodyspec, mjmFrame* parentframe) {
// add mesh to model
mjmMesh* mjm_addMesh(void* model, void* defspec) {
mjCDef* def = defspec ? reinterpret_cast<mjCDef*>(defspec) : 0;
mjCModel* modelC = static_cast<mjCModel*>(model);
mjCMesh* mesh = modelC->AddMesh(def);
return &mesh->spec;
}
// add texture to model
mjmTexture* mjm_addTexture(void* model) {
mjCModel* modelC = static_cast<mjCModel*>(model);