Cosmetic improvements to public headers.

PiperOrigin-RevId: 521415262
Change-Id: Iee5d6baec78242f5a033c8b5cdd285af4a0895fa
This commit is contained in:
Yuval Tassa
2023-04-03 03:48:41 -07:00
committed by Copybara-Service
parent 5f132af625
commit 64229c089a
7 changed files with 64 additions and 69 deletions
+2 -4
View File
@@ -1853,10 +1853,8 @@ int mj_makeEmptyFileVFS(mjVFS* vfs, const char* filename, int filesize);
int mj_findFileVFS(const mjVFS* vfs, const char* filename); int mj_findFileVFS(const mjVFS* vfs, const char* filename);
int mj_deleteFileVFS(mjVFS* vfs, const char* filename); int mj_deleteFileVFS(mjVFS* vfs, const char* filename);
void mj_deleteVFS(mjVFS* vfs); void mj_deleteVFS(mjVFS* vfs);
mjModel* mj_loadXML(const char* filename, const mjVFS* vfs, mjModel* mj_loadXML(const char* filename, const mjVFS* vfs, char* error, int error_sz);
char* error, int error_sz); int mj_saveLastXML(const char* filename, const mjModel* m, char* error, int error_sz);
int mj_saveLastXML(const char* filename, const mjModel* m,
char* error, int error_sz);
void mj_freeLastXML(void); void mj_freeLastXML(void);
int mj_printSchema(const char* filename, char* buffer, int buffer_sz, int mj_printSchema(const char* filename, char* buffer, int buffer_sz,
int flg_html, int flg_pad); int flg_html, int flg_pad);
+1 -1
View File
@@ -69,7 +69,7 @@ typedef struct mjpPlugin_ mjpPlugin;
#if __has_attribute(constructor) #if __has_attribute(constructor)
#define mjPLUGIN_DYNAMIC_LIBRARY_INIT \ #define mjPLUGIN_DYNAMIC_LIBRARY_INIT \
__attribute__((constructor)) static void _mjplugin_init(void) __attribute__((constructor)) static void _mjplugin_init(void)
#endif #endif // __has_attribute(constructor)
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
-1
View File
@@ -15,7 +15,6 @@
#ifndef MUJOCO_MJRENDER_H_ #ifndef MUJOCO_MJRENDER_H_
#define MUJOCO_MJRENDER_H_ #define MUJOCO_MJRENDER_H_
#include <mujoco/mjmodel.h>
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
+1 -1
View File
@@ -16,7 +16,7 @@
#define MUJOCO_MJVISUALIZE_H_ #define MUJOCO_MJVISUALIZE_H_
#include <mujoco/mjtnum.h> #include <mujoco/mjtnum.h>
#include <mujoco/mjmodel.h>
#define mjNGROUP 6 // number of geom, site, joint, skin groups with visflags #define mjNGROUP 6 // number of geom, site, joint, skin groups with visflags
#define mjMAXLIGHT 100 // maximum number of lights in a scene #define mjMAXLIGHT 100 // maximum number of lights in a scene
+2 -4
View File
@@ -114,13 +114,11 @@ MJAPI void mj_deleteVFS(mjVFS* vfs);
// Parse XML file in MJCF or URDF format, compile it, return low-level model. // Parse XML file in MJCF or URDF format, compile it, return low-level model.
// If vfs is not NULL, look up files in vfs before reading from disk. // If vfs is not NULL, look up files in vfs before reading from disk.
// If error is not NULL, it must have size error_sz. // If error is not NULL, it must have size error_sz.
MJAPI mjModel* mj_loadXML(const char* filename, const mjVFS* vfs, MJAPI mjModel* mj_loadXML(const char* filename, const mjVFS* vfs, char* error, int error_sz);
char* error, int error_sz);
// Update XML data structures with info from low-level model, save as MJCF. // Update XML data structures with info from low-level model, save as MJCF.
// If error is not NULL, it must have size error_sz. // If error is not NULL, it must have size error_sz.
MJAPI int mj_saveLastXML(const char* filename, const mjModel* m, MJAPI int mj_saveLastXML(const char* filename, const mjModel* m, char* error, int error_sz);
char* error, int error_sz);
// Free last XML model if loaded. Called internally at each load. // Free last XML model if loaded. Called internally at each load.
MJAPI void mj_freeLastXML(void); MJAPI void mj_freeLastXML(void);