Add mjmHField to C API.

PiperOrigin-RevId: 606933108
Change-Id: I21c895ed3e137dab8f57e2d0bcfb558aae2b971a
This commit is contained in:
Alessio Quaglino
2024-02-14 04:11:29 -08:00
committed by Copybara-Service
parent 2ee8a4dabd
commit c9e7586499
8 changed files with 138 additions and 51 deletions
+9
View File
@@ -147,6 +147,15 @@ mjmMesh* mjm_addMesh(void* model, void* defspec) {
// add height field to model
mjmHField* mjm_addHField(void* model) {
mjCModel* modelC = static_cast<mjCModel*>(model);
mjCHField* heightField = modelC->AddHField();
return &heightField->spec;
}
// add texture to model
mjmTexture* mjm_addTexture(void* model) {
mjCModel* modelC = static_cast<mjCModel*>(model);