Functions for printing the contents of mjvScene.

PiperOrigin-RevId: 812699642
Change-Id: Iafff53c952c952624129ff01a8c1b0aa5d38eec5
This commit is contained in:
Haroon Qureshi
2025-09-29 02:44:55 -07:00
committed by Copybara-Service
parent e1c7e19780
commit 6a7566872a
8 changed files with 380 additions and 104 deletions
+9
View File
@@ -20,6 +20,7 @@
#include <mujoco/mjdata.h>
#include <mujoco/mjexport.h>
#include <mujoco/mjmodel.h>
#include <mujoco/mjvisualize.h>
#ifdef __cplusplus
extern "C" {
@@ -46,6 +47,14 @@ MJAPI void mj_printData(const mjModel* m, const mjData* d, const char* filename)
MJAPI void mj_printSparsity(const char* str, int nr, int nc, const int* rowadr, const int* diag,
const int* rownnz, const int* rowsuper, const int* colind, FILE* fp);
// print scene to text file
MJAPI void mj_printScene(const mjvScene* s, const char* filename);
// print scene to text file, specifying format
// float_format must be a valid printf-style format string for a single float value
MJAPI void mj_printFormattedScene(const mjvScene* s, const char* filename,
const char* float_format);
#ifdef __cplusplus
}
#endif