From 05f194c412dd410a2208e855dece5fd9d36f0eab Mon Sep 17 00:00:00 2001 From: Matija Kecman Date: Wed, 26 Nov 2025 08:42:44 -0800 Subject: [PATCH] Reorganization of the WASM bindings.cc template * Move all bindings into a single EMSCRIPTEN_BINDINGS block * Move all auto generated bindings line to the start of the block * Alphabetically sort the constants binding lines PiperOrigin-RevId: 837142009 Change-Id: I218a37dbc0ca6c6f16a455718889c08fe1b41d56 --- wasm/codegen/generated/bindings.cc | 4484 ++++++++++++------------- wasm/codegen/generators/enums.py | 16 +- wasm/codegen/templates/bindings.cc | 184 +- wasm/codegen/tests/generators_test.py | 19 +- 4 files changed, 2314 insertions(+), 2389 deletions(-) diff --git a/wasm/codegen/generated/bindings.cc b/wasm/codegen/generated/bindings.cc index eca58689..198a156d 100644 --- a/wasm/codegen/generated/bindings.cc +++ b/wasm/codegen/generated/bindings.cc @@ -108,666 +108,6 @@ val get_mjFRAMESTRING() { return MakeValArray(mjFRAMESTRING); } val get_mjVISSTRING() { return MakeValArray3(mjVISSTRING); } val get_mjRNDSTRING() { return MakeValArray3(mjRNDSTRING); } -EMSCRIPTEN_BINDINGS(mujoco_constants) { - // from mjmodel.h - emscripten::constant("mjPI", mjPI); - emscripten::constant("mjMAXVAL", mjMAXVAL); - emscripten::constant("mjMINMU", mjMINMU); - emscripten::constant("mjMINIMP", mjMINIMP); - emscripten::constant("mjMAXIMP", mjMAXIMP); - emscripten::constant("mjMAXCONPAIR", mjMAXCONPAIR); - emscripten::constant("mjNEQDATA", mjNEQDATA); - emscripten::constant("mjNDYN", mjNDYN); - emscripten::constant("mjNGAIN", mjNGAIN); - emscripten::constant("mjNBIAS", mjNBIAS); - emscripten::constant("mjNREF", mjNREF); - emscripten::constant("mjNIMP", mjNIMP); - emscripten::constant("mjNSOLVER", mjNSOLVER); - - // from mjvisualize.h - emscripten::constant("mjNGROUP", mjNGROUP); - emscripten::constant("mjMAXLIGHT", mjMAXLIGHT); - emscripten::constant("mjMAXOVERLAY", mjMAXOVERLAY); - emscripten::constant("mjMAXLINE", mjMAXLINE); - emscripten::constant("mjMAXLINEPNT", mjMAXLINEPNT); - emscripten::constant("mjMAXPLANEGRID", mjMAXPLANEGRID); - - // from mujoco.h - emscripten::constant("mjVERSION_HEADER", mjVERSION_HEADER); - - // from mjtnum.h - emscripten::constant("mjMINVAL", mjMINVAL); - - // emscripten::constant() is designed for simple, compile-time literal values - // (like numbers or a single string literal), complex values need to be - // bound as functions. - emscripten::function("get_mjDISABLESTRING", &get_mjDISABLESTRING); - emscripten::function("get_mjENABLESTRING", &get_mjENABLESTRING); - emscripten::function("get_mjTIMERSTRING", &get_mjTIMERSTRING); - emscripten::function("get_mjLABELSTRING", &get_mjLABELSTRING); - emscripten::function("get_mjFRAMESTRING", &get_mjFRAMESTRING); - emscripten::function("get_mjVISSTRING", &get_mjVISSTRING); - emscripten::function("get_mjRNDSTRING", &get_mjRNDSTRING); -} - -EMSCRIPTEN_BINDINGS(mujoco_enums) { - enum_("mjtAlignFree") - .value("mjALIGNFREE_FALSE", mjALIGNFREE_FALSE) - .value("mjALIGNFREE_TRUE", mjALIGNFREE_TRUE) - .value("mjALIGNFREE_AUTO", mjALIGNFREE_AUTO); - - enum_("mjtBias") - .value("mjBIAS_NONE", mjBIAS_NONE) - .value("mjBIAS_AFFINE", mjBIAS_AFFINE) - .value("mjBIAS_MUSCLE", mjBIAS_MUSCLE) - .value("mjBIAS_USER", mjBIAS_USER); - - enum_("mjtBuiltin") - .value("mjBUILTIN_NONE", mjBUILTIN_NONE) - .value("mjBUILTIN_GRADIENT", mjBUILTIN_GRADIENT) - .value("mjBUILTIN_CHECKER", mjBUILTIN_CHECKER) - .value("mjBUILTIN_FLAT", mjBUILTIN_FLAT); - - enum_("mjtButton") - .value("mjBUTTON_NONE", mjBUTTON_NONE) - .value("mjBUTTON_LEFT", mjBUTTON_LEFT) - .value("mjBUTTON_RIGHT", mjBUTTON_RIGHT) - .value("mjBUTTON_MIDDLE", mjBUTTON_MIDDLE); - - enum_("mjtCamLight") - .value("mjCAMLIGHT_FIXED", mjCAMLIGHT_FIXED) - .value("mjCAMLIGHT_TRACK", mjCAMLIGHT_TRACK) - .value("mjCAMLIGHT_TRACKCOM", mjCAMLIGHT_TRACKCOM) - .value("mjCAMLIGHT_TARGETBODY", mjCAMLIGHT_TARGETBODY) - .value("mjCAMLIGHT_TARGETBODYCOM", mjCAMLIGHT_TARGETBODYCOM); - - enum_("mjtCamera") - .value("mjCAMERA_FREE", mjCAMERA_FREE) - .value("mjCAMERA_TRACKING", mjCAMERA_TRACKING) - .value("mjCAMERA_FIXED", mjCAMERA_FIXED) - .value("mjCAMERA_USER", mjCAMERA_USER); - - enum_("mjtCatBit") - .value("mjCAT_STATIC", mjCAT_STATIC) - .value("mjCAT_DYNAMIC", mjCAT_DYNAMIC) - .value("mjCAT_DECOR", mjCAT_DECOR) - .value("mjCAT_ALL", mjCAT_ALL); - - enum_("mjtColorSpace") - .value("mjCOLORSPACE_AUTO", mjCOLORSPACE_AUTO) - .value("mjCOLORSPACE_LINEAR", mjCOLORSPACE_LINEAR) - .value("mjCOLORSPACE_SRGB", mjCOLORSPACE_SRGB); - - enum_("mjtConDataField") - .value("mjCONDATA_FOUND", mjCONDATA_FOUND) - .value("mjCONDATA_FORCE", mjCONDATA_FORCE) - .value("mjCONDATA_TORQUE", mjCONDATA_TORQUE) - .value("mjCONDATA_DIST", mjCONDATA_DIST) - .value("mjCONDATA_POS", mjCONDATA_POS) - .value("mjCONDATA_NORMAL", mjCONDATA_NORMAL) - .value("mjCONDATA_TANGENT", mjCONDATA_TANGENT) - .value("mjNCONDATA", mjNCONDATA); - - enum_("mjtCone") - .value("mjCONE_PYRAMIDAL", mjCONE_PYRAMIDAL) - .value("mjCONE_ELLIPTIC", mjCONE_ELLIPTIC); - - enum_("mjtConstraint") - .value("mjCNSTR_EQUALITY", mjCNSTR_EQUALITY) - .value("mjCNSTR_FRICTION_DOF", mjCNSTR_FRICTION_DOF) - .value("mjCNSTR_FRICTION_TENDON", mjCNSTR_FRICTION_TENDON) - .value("mjCNSTR_LIMIT_JOINT", mjCNSTR_LIMIT_JOINT) - .value("mjCNSTR_LIMIT_TENDON", mjCNSTR_LIMIT_TENDON) - .value("mjCNSTR_CONTACT_FRICTIONLESS", mjCNSTR_CONTACT_FRICTIONLESS) - .value("mjCNSTR_CONTACT_PYRAMIDAL", mjCNSTR_CONTACT_PYRAMIDAL) - .value("mjCNSTR_CONTACT_ELLIPTIC", mjCNSTR_CONTACT_ELLIPTIC); - - enum_("mjtConstraintState") - .value("mjCNSTRSTATE_SATISFIED", mjCNSTRSTATE_SATISFIED) - .value("mjCNSTRSTATE_QUADRATIC", mjCNSTRSTATE_QUADRATIC) - .value("mjCNSTRSTATE_LINEARNEG", mjCNSTRSTATE_LINEARNEG) - .value("mjCNSTRSTATE_LINEARPOS", mjCNSTRSTATE_LINEARPOS) - .value("mjCNSTRSTATE_CONE", mjCNSTRSTATE_CONE); - - enum_("mjtDataType") - .value("mjDATATYPE_REAL", mjDATATYPE_REAL) - .value("mjDATATYPE_POSITIVE", mjDATATYPE_POSITIVE) - .value("mjDATATYPE_AXIS", mjDATATYPE_AXIS) - .value("mjDATATYPE_QUATERNION", mjDATATYPE_QUATERNION); - - enum_("mjtDepthMap") - .value("mjDEPTH_ZERONEAR", mjDEPTH_ZERONEAR) - .value("mjDEPTH_ZEROFAR", mjDEPTH_ZEROFAR); - - enum_("mjtDisableBit") - .value("mjDSBL_CONSTRAINT", mjDSBL_CONSTRAINT) - .value("mjDSBL_EQUALITY", mjDSBL_EQUALITY) - .value("mjDSBL_FRICTIONLOSS", mjDSBL_FRICTIONLOSS) - .value("mjDSBL_LIMIT", mjDSBL_LIMIT) - .value("mjDSBL_CONTACT", mjDSBL_CONTACT) - .value("mjDSBL_SPRING", mjDSBL_SPRING) - .value("mjDSBL_DAMPER", mjDSBL_DAMPER) - .value("mjDSBL_GRAVITY", mjDSBL_GRAVITY) - .value("mjDSBL_CLAMPCTRL", mjDSBL_CLAMPCTRL) - .value("mjDSBL_WARMSTART", mjDSBL_WARMSTART) - .value("mjDSBL_FILTERPARENT", mjDSBL_FILTERPARENT) - .value("mjDSBL_ACTUATION", mjDSBL_ACTUATION) - .value("mjDSBL_REFSAFE", mjDSBL_REFSAFE) - .value("mjDSBL_SENSOR", mjDSBL_SENSOR) - .value("mjDSBL_MIDPHASE", mjDSBL_MIDPHASE) - .value("mjDSBL_EULERDAMP", mjDSBL_EULERDAMP) - .value("mjDSBL_AUTORESET", mjDSBL_AUTORESET) - .value("mjDSBL_NATIVECCD", mjDSBL_NATIVECCD) - .value("mjDSBL_ISLAND", mjDSBL_ISLAND) - .value("mjNDISABLE", mjNDISABLE); - - enum_("mjtDyn") - .value("mjDYN_NONE", mjDYN_NONE) - .value("mjDYN_INTEGRATOR", mjDYN_INTEGRATOR) - .value("mjDYN_FILTER", mjDYN_FILTER) - .value("mjDYN_FILTEREXACT", mjDYN_FILTEREXACT) - .value("mjDYN_MUSCLE", mjDYN_MUSCLE) - .value("mjDYN_USER", mjDYN_USER); - - enum_("mjtEnableBit") - .value("mjENBL_OVERRIDE", mjENBL_OVERRIDE) - .value("mjENBL_ENERGY", mjENBL_ENERGY) - .value("mjENBL_FWDINV", mjENBL_FWDINV) - .value("mjENBL_INVDISCRETE", mjENBL_INVDISCRETE) - .value("mjENBL_MULTICCD", mjENBL_MULTICCD) - .value("mjENBL_SLEEP", mjENBL_SLEEP) - .value("mjNENABLE", mjNENABLE); - - enum_("mjtEq") - .value("mjEQ_CONNECT", mjEQ_CONNECT) - .value("mjEQ_WELD", mjEQ_WELD) - .value("mjEQ_JOINT", mjEQ_JOINT) - .value("mjEQ_TENDON", mjEQ_TENDON) - .value("mjEQ_FLEX", mjEQ_FLEX) - .value("mjEQ_DISTANCE", mjEQ_DISTANCE); - - enum_("mjtEvent") - .value("mjEVENT_NONE", mjEVENT_NONE) - .value("mjEVENT_MOVE", mjEVENT_MOVE) - .value("mjEVENT_PRESS", mjEVENT_PRESS) - .value("mjEVENT_RELEASE", mjEVENT_RELEASE) - .value("mjEVENT_SCROLL", mjEVENT_SCROLL) - .value("mjEVENT_KEY", mjEVENT_KEY) - .value("mjEVENT_RESIZE", mjEVENT_RESIZE) - .value("mjEVENT_REDRAW", mjEVENT_REDRAW) - .value("mjEVENT_FILESDROP", mjEVENT_FILESDROP); - - enum_("mjtFlexSelf") - .value("mjFLEXSELF_NONE", mjFLEXSELF_NONE) - .value("mjFLEXSELF_NARROW", mjFLEXSELF_NARROW) - .value("mjFLEXSELF_BVH", mjFLEXSELF_BVH) - .value("mjFLEXSELF_SAP", mjFLEXSELF_SAP) - .value("mjFLEXSELF_AUTO", mjFLEXSELF_AUTO); - - enum_("mjtFont") - .value("mjFONT_NORMAL", mjFONT_NORMAL) - .value("mjFONT_SHADOW", mjFONT_SHADOW) - .value("mjFONT_BIG", mjFONT_BIG); - - enum_("mjtFontScale") - .value("mjFONTSCALE_50", mjFONTSCALE_50) - .value("mjFONTSCALE_100", mjFONTSCALE_100) - .value("mjFONTSCALE_150", mjFONTSCALE_150) - .value("mjFONTSCALE_200", mjFONTSCALE_200) - .value("mjFONTSCALE_250", mjFONTSCALE_250) - .value("mjFONTSCALE_300", mjFONTSCALE_300); - - enum_("mjtFrame") - .value("mjFRAME_NONE", mjFRAME_NONE) - .value("mjFRAME_BODY", mjFRAME_BODY) - .value("mjFRAME_GEOM", mjFRAME_GEOM) - .value("mjFRAME_SITE", mjFRAME_SITE) - .value("mjFRAME_CAMERA", mjFRAME_CAMERA) - .value("mjFRAME_LIGHT", mjFRAME_LIGHT) - .value("mjFRAME_CONTACT", mjFRAME_CONTACT) - .value("mjFRAME_WORLD", mjFRAME_WORLD) - .value("mjNFRAME", mjNFRAME); - - enum_("mjtFramebuffer") - .value("mjFB_WINDOW", mjFB_WINDOW) - .value("mjFB_OFFSCREEN", mjFB_OFFSCREEN); - - enum_("mjtGain") - .value("mjGAIN_FIXED", mjGAIN_FIXED) - .value("mjGAIN_AFFINE", mjGAIN_AFFINE) - .value("mjGAIN_MUSCLE", mjGAIN_MUSCLE) - .value("mjGAIN_USER", mjGAIN_USER); - - enum_("mjtGeom") - .value("mjGEOM_PLANE", mjGEOM_PLANE) - .value("mjGEOM_HFIELD", mjGEOM_HFIELD) - .value("mjGEOM_SPHERE", mjGEOM_SPHERE) - .value("mjGEOM_CAPSULE", mjGEOM_CAPSULE) - .value("mjGEOM_ELLIPSOID", mjGEOM_ELLIPSOID) - .value("mjGEOM_CYLINDER", mjGEOM_CYLINDER) - .value("mjGEOM_BOX", mjGEOM_BOX) - .value("mjGEOM_MESH", mjGEOM_MESH) - .value("mjGEOM_SDF", mjGEOM_SDF) - .value("mjNGEOMTYPES", mjNGEOMTYPES) - .value("mjGEOM_ARROW", mjGEOM_ARROW) - .value("mjGEOM_ARROW1", mjGEOM_ARROW1) - .value("mjGEOM_ARROW2", mjGEOM_ARROW2) - .value("mjGEOM_LINE", mjGEOM_LINE) - .value("mjGEOM_LINEBOX", mjGEOM_LINEBOX) - .value("mjGEOM_FLEX", mjGEOM_FLEX) - .value("mjGEOM_SKIN", mjGEOM_SKIN) - .value("mjGEOM_LABEL", mjGEOM_LABEL) - .value("mjGEOM_TRIANGLE", mjGEOM_TRIANGLE) - .value("mjGEOM_NONE", mjGEOM_NONE); - - enum_("mjtGeomInertia") - .value("mjINERTIA_VOLUME", mjINERTIA_VOLUME) - .value("mjINERTIA_SHELL", mjINERTIA_SHELL); - - enum_("mjtGridPos") - .value("mjGRID_TOPLEFT", mjGRID_TOPLEFT) - .value("mjGRID_TOPRIGHT", mjGRID_TOPRIGHT) - .value("mjGRID_BOTTOMLEFT", mjGRID_BOTTOMLEFT) - .value("mjGRID_BOTTOMRIGHT", mjGRID_BOTTOMRIGHT) - .value("mjGRID_TOP", mjGRID_TOP) - .value("mjGRID_BOTTOM", mjGRID_BOTTOM) - .value("mjGRID_LEFT", mjGRID_LEFT) - .value("mjGRID_RIGHT", mjGRID_RIGHT); - - enum_("mjtInertiaFromGeom") - .value("mjINERTIAFROMGEOM_FALSE", mjINERTIAFROMGEOM_FALSE) - .value("mjINERTIAFROMGEOM_TRUE", mjINERTIAFROMGEOM_TRUE) - .value("mjINERTIAFROMGEOM_AUTO", mjINERTIAFROMGEOM_AUTO); - - enum_("mjtIntegrator") - .value("mjINT_EULER", mjINT_EULER) - .value("mjINT_RK4", mjINT_RK4) - .value("mjINT_IMPLICIT", mjINT_IMPLICIT) - .value("mjINT_IMPLICITFAST", mjINT_IMPLICITFAST); - - enum_("mjtItem") - .value("mjITEM_END", mjITEM_END) - .value("mjITEM_SECTION", mjITEM_SECTION) - .value("mjITEM_SEPARATOR", mjITEM_SEPARATOR) - .value("mjITEM_STATIC", mjITEM_STATIC) - .value("mjITEM_BUTTON", mjITEM_BUTTON) - .value("mjITEM_CHECKINT", mjITEM_CHECKINT) - .value("mjITEM_CHECKBYTE", mjITEM_CHECKBYTE) - .value("mjITEM_RADIO", mjITEM_RADIO) - .value("mjITEM_RADIOLINE", mjITEM_RADIOLINE) - .value("mjITEM_SELECT", mjITEM_SELECT) - .value("mjITEM_SLIDERINT", mjITEM_SLIDERINT) - .value("mjITEM_SLIDERNUM", mjITEM_SLIDERNUM) - .value("mjITEM_EDITINT", mjITEM_EDITINT) - .value("mjITEM_EDITNUM", mjITEM_EDITNUM) - .value("mjITEM_EDITFLOAT", mjITEM_EDITFLOAT) - .value("mjITEM_EDITTXT", mjITEM_EDITTXT) - .value("mjNITEM", mjNITEM); - - enum_("mjtJacobian") - .value("mjJAC_DENSE", mjJAC_DENSE) - .value("mjJAC_SPARSE", mjJAC_SPARSE) - .value("mjJAC_AUTO", mjJAC_AUTO); - - enum_("mjtJoint") - .value("mjJNT_FREE", mjJNT_FREE) - .value("mjJNT_BALL", mjJNT_BALL) - .value("mjJNT_SLIDE", mjJNT_SLIDE) - .value("mjJNT_HINGE", mjJNT_HINGE); - - enum_("mjtLRMode") - .value("mjLRMODE_NONE", mjLRMODE_NONE) - .value("mjLRMODE_MUSCLE", mjLRMODE_MUSCLE) - .value("mjLRMODE_MUSCLEUSER", mjLRMODE_MUSCLEUSER) - .value("mjLRMODE_ALL", mjLRMODE_ALL); - - enum_("mjtLabel") - .value("mjLABEL_NONE", mjLABEL_NONE) - .value("mjLABEL_BODY", mjLABEL_BODY) - .value("mjLABEL_JOINT", mjLABEL_JOINT) - .value("mjLABEL_GEOM", mjLABEL_GEOM) - .value("mjLABEL_SITE", mjLABEL_SITE) - .value("mjLABEL_CAMERA", mjLABEL_CAMERA) - .value("mjLABEL_LIGHT", mjLABEL_LIGHT) - .value("mjLABEL_TENDON", mjLABEL_TENDON) - .value("mjLABEL_ACTUATOR", mjLABEL_ACTUATOR) - .value("mjLABEL_CONSTRAINT", mjLABEL_CONSTRAINT) - .value("mjLABEL_FLEX", mjLABEL_FLEX) - .value("mjLABEL_SKIN", mjLABEL_SKIN) - .value("mjLABEL_SELECTION", mjLABEL_SELECTION) - .value("mjLABEL_SELPNT", mjLABEL_SELPNT) - .value("mjLABEL_CONTACTPOINT", mjLABEL_CONTACTPOINT) - .value("mjLABEL_CONTACTFORCE", mjLABEL_CONTACTFORCE) - .value("mjLABEL_ISLAND", mjLABEL_ISLAND) - .value("mjNLABEL", mjNLABEL); - - enum_("mjtLightType") - .value("mjLIGHT_SPOT", mjLIGHT_SPOT) - .value("mjLIGHT_DIRECTIONAL", mjLIGHT_DIRECTIONAL) - .value("mjLIGHT_POINT", mjLIGHT_POINT) - .value("mjLIGHT_IMAGE", mjLIGHT_IMAGE); - - enum_("mjtLimited") - .value("mjLIMITED_FALSE", mjLIMITED_FALSE) - .value("mjLIMITED_TRUE", mjLIMITED_TRUE) - .value("mjLIMITED_AUTO", mjLIMITED_AUTO); - - enum_("mjtMark") - .value("mjMARK_NONE", mjMARK_NONE) - .value("mjMARK_EDGE", mjMARK_EDGE) - .value("mjMARK_CROSS", mjMARK_CROSS) - .value("mjMARK_RANDOM", mjMARK_RANDOM); - - enum_("mjtMeshBuiltin") - .value("mjMESH_BUILTIN_NONE", mjMESH_BUILTIN_NONE) - .value("mjMESH_BUILTIN_SPHERE", mjMESH_BUILTIN_SPHERE) - .value("mjMESH_BUILTIN_HEMISPHERE", mjMESH_BUILTIN_HEMISPHERE) - .value("mjMESH_BUILTIN_CONE", mjMESH_BUILTIN_CONE) - .value("mjMESH_BUILTIN_SUPERSPHERE", mjMESH_BUILTIN_SUPERSPHERE) - .value("mjMESH_BUILTIN_SUPERTORUS", mjMESH_BUILTIN_SUPERTORUS) - .value("mjMESH_BUILTIN_WEDGE", mjMESH_BUILTIN_WEDGE) - .value("mjMESH_BUILTIN_PLATE", mjMESH_BUILTIN_PLATE); - - enum_("mjtMeshInertia") - .value("mjMESH_INERTIA_CONVEX", mjMESH_INERTIA_CONVEX) - .value("mjMESH_INERTIA_EXACT", mjMESH_INERTIA_EXACT) - .value("mjMESH_INERTIA_LEGACY", mjMESH_INERTIA_LEGACY) - .value("mjMESH_INERTIA_SHELL", mjMESH_INERTIA_SHELL); - - enum_("mjtMouse") - .value("mjMOUSE_NONE", mjMOUSE_NONE) - .value("mjMOUSE_ROTATE_V", mjMOUSE_ROTATE_V) - .value("mjMOUSE_ROTATE_H", mjMOUSE_ROTATE_H) - .value("mjMOUSE_MOVE_V", mjMOUSE_MOVE_V) - .value("mjMOUSE_MOVE_H", mjMOUSE_MOVE_H) - .value("mjMOUSE_ZOOM", mjMOUSE_ZOOM) - .value("mjMOUSE_MOVE_V_REL", mjMOUSE_MOVE_V_REL) - .value("mjMOUSE_MOVE_H_REL", mjMOUSE_MOVE_H_REL); - - enum_("mjtObj") - .value("mjOBJ_UNKNOWN", mjOBJ_UNKNOWN) - .value("mjOBJ_BODY", mjOBJ_BODY) - .value("mjOBJ_XBODY", mjOBJ_XBODY) - .value("mjOBJ_JOINT", mjOBJ_JOINT) - .value("mjOBJ_DOF", mjOBJ_DOF) - .value("mjOBJ_GEOM", mjOBJ_GEOM) - .value("mjOBJ_SITE", mjOBJ_SITE) - .value("mjOBJ_CAMERA", mjOBJ_CAMERA) - .value("mjOBJ_LIGHT", mjOBJ_LIGHT) - .value("mjOBJ_FLEX", mjOBJ_FLEX) - .value("mjOBJ_MESH", mjOBJ_MESH) - .value("mjOBJ_SKIN", mjOBJ_SKIN) - .value("mjOBJ_HFIELD", mjOBJ_HFIELD) - .value("mjOBJ_TEXTURE", mjOBJ_TEXTURE) - .value("mjOBJ_MATERIAL", mjOBJ_MATERIAL) - .value("mjOBJ_PAIR", mjOBJ_PAIR) - .value("mjOBJ_EXCLUDE", mjOBJ_EXCLUDE) - .value("mjOBJ_EQUALITY", mjOBJ_EQUALITY) - .value("mjOBJ_TENDON", mjOBJ_TENDON) - .value("mjOBJ_ACTUATOR", mjOBJ_ACTUATOR) - .value("mjOBJ_SENSOR", mjOBJ_SENSOR) - .value("mjOBJ_NUMERIC", mjOBJ_NUMERIC) - .value("mjOBJ_TEXT", mjOBJ_TEXT) - .value("mjOBJ_TUPLE", mjOBJ_TUPLE) - .value("mjOBJ_KEY", mjOBJ_KEY) - .value("mjOBJ_PLUGIN", mjOBJ_PLUGIN) - .value("mjNOBJECT", mjNOBJECT) - .value("mjOBJ_FRAME", mjOBJ_FRAME) - .value("mjOBJ_DEFAULT", mjOBJ_DEFAULT) - .value("mjOBJ_MODEL", mjOBJ_MODEL); - - enum_("mjtOrientation") - .value("mjORIENTATION_QUAT", mjORIENTATION_QUAT) - .value("mjORIENTATION_AXISANGLE", mjORIENTATION_AXISANGLE) - .value("mjORIENTATION_XYAXES", mjORIENTATION_XYAXES) - .value("mjORIENTATION_ZAXIS", mjORIENTATION_ZAXIS) - .value("mjORIENTATION_EULER", mjORIENTATION_EULER); - - enum_("mjtPertBit") - .value("mjPERT_TRANSLATE", mjPERT_TRANSLATE) - .value("mjPERT_ROTATE", mjPERT_ROTATE); - - enum_("mjtPluginCapabilityBit") - .value("mjPLUGIN_ACTUATOR", mjPLUGIN_ACTUATOR) - .value("mjPLUGIN_SENSOR", mjPLUGIN_SENSOR) - .value("mjPLUGIN_PASSIVE", mjPLUGIN_PASSIVE) - .value("mjPLUGIN_SDF", mjPLUGIN_SDF); - - enum_("mjtRndFlag") - .value("mjRND_SHADOW", mjRND_SHADOW) - .value("mjRND_WIREFRAME", mjRND_WIREFRAME) - .value("mjRND_REFLECTION", mjRND_REFLECTION) - .value("mjRND_ADDITIVE", mjRND_ADDITIVE) - .value("mjRND_SKYBOX", mjRND_SKYBOX) - .value("mjRND_FOG", mjRND_FOG) - .value("mjRND_HAZE", mjRND_HAZE) - .value("mjRND_SEGMENT", mjRND_SEGMENT) - .value("mjRND_IDCOLOR", mjRND_IDCOLOR) - .value("mjRND_CULL_FACE", mjRND_CULL_FACE) - .value("mjNRNDFLAG", mjNRNDFLAG); - - enum_("mjtSDFType") - .value("mjSDFTYPE_SINGLE", mjSDFTYPE_SINGLE) - .value("mjSDFTYPE_INTERSECTION", mjSDFTYPE_INTERSECTION) - .value("mjSDFTYPE_MIDSURFACE", mjSDFTYPE_MIDSURFACE) - .value("mjSDFTYPE_COLLISION", mjSDFTYPE_COLLISION); - - enum_("mjtSameFrame") - .value("mjSAMEFRAME_NONE", mjSAMEFRAME_NONE) - .value("mjSAMEFRAME_BODY", mjSAMEFRAME_BODY) - .value("mjSAMEFRAME_INERTIA", mjSAMEFRAME_INERTIA) - .value("mjSAMEFRAME_BODYROT", mjSAMEFRAME_BODYROT) - .value("mjSAMEFRAME_INERTIAROT", mjSAMEFRAME_INERTIAROT); - - enum_("mjtSection") - .value("mjSECT_CLOSED", mjSECT_CLOSED) - .value("mjSECT_OPEN", mjSECT_OPEN) - .value("mjSECT_FIXED", mjSECT_FIXED); - - enum_("mjtSensor") - .value("mjSENS_TOUCH", mjSENS_TOUCH) - .value("mjSENS_ACCELEROMETER", mjSENS_ACCELEROMETER) - .value("mjSENS_VELOCIMETER", mjSENS_VELOCIMETER) - .value("mjSENS_GYRO", mjSENS_GYRO) - .value("mjSENS_FORCE", mjSENS_FORCE) - .value("mjSENS_TORQUE", mjSENS_TORQUE) - .value("mjSENS_MAGNETOMETER", mjSENS_MAGNETOMETER) - .value("mjSENS_RANGEFINDER", mjSENS_RANGEFINDER) - .value("mjSENS_CAMPROJECTION", mjSENS_CAMPROJECTION) - .value("mjSENS_JOINTPOS", mjSENS_JOINTPOS) - .value("mjSENS_JOINTVEL", mjSENS_JOINTVEL) - .value("mjSENS_TENDONPOS", mjSENS_TENDONPOS) - .value("mjSENS_TENDONVEL", mjSENS_TENDONVEL) - .value("mjSENS_ACTUATORPOS", mjSENS_ACTUATORPOS) - .value("mjSENS_ACTUATORVEL", mjSENS_ACTUATORVEL) - .value("mjSENS_ACTUATORFRC", mjSENS_ACTUATORFRC) - .value("mjSENS_JOINTACTFRC", mjSENS_JOINTACTFRC) - .value("mjSENS_TENDONACTFRC", mjSENS_TENDONACTFRC) - .value("mjSENS_BALLQUAT", mjSENS_BALLQUAT) - .value("mjSENS_BALLANGVEL", mjSENS_BALLANGVEL) - .value("mjSENS_JOINTLIMITPOS", mjSENS_JOINTLIMITPOS) - .value("mjSENS_JOINTLIMITVEL", mjSENS_JOINTLIMITVEL) - .value("mjSENS_JOINTLIMITFRC", mjSENS_JOINTLIMITFRC) - .value("mjSENS_TENDONLIMITPOS", mjSENS_TENDONLIMITPOS) - .value("mjSENS_TENDONLIMITVEL", mjSENS_TENDONLIMITVEL) - .value("mjSENS_TENDONLIMITFRC", mjSENS_TENDONLIMITFRC) - .value("mjSENS_FRAMEPOS", mjSENS_FRAMEPOS) - .value("mjSENS_FRAMEQUAT", mjSENS_FRAMEQUAT) - .value("mjSENS_FRAMEXAXIS", mjSENS_FRAMEXAXIS) - .value("mjSENS_FRAMEYAXIS", mjSENS_FRAMEYAXIS) - .value("mjSENS_FRAMEZAXIS", mjSENS_FRAMEZAXIS) - .value("mjSENS_FRAMELINVEL", mjSENS_FRAMELINVEL) - .value("mjSENS_FRAMEANGVEL", mjSENS_FRAMEANGVEL) - .value("mjSENS_FRAMELINACC", mjSENS_FRAMELINACC) - .value("mjSENS_FRAMEANGACC", mjSENS_FRAMEANGACC) - .value("mjSENS_SUBTREECOM", mjSENS_SUBTREECOM) - .value("mjSENS_SUBTREELINVEL", mjSENS_SUBTREELINVEL) - .value("mjSENS_SUBTREEANGMOM", mjSENS_SUBTREEANGMOM) - .value("mjSENS_INSIDESITE", mjSENS_INSIDESITE) - .value("mjSENS_GEOMDIST", mjSENS_GEOMDIST) - .value("mjSENS_GEOMNORMAL", mjSENS_GEOMNORMAL) - .value("mjSENS_GEOMFROMTO", mjSENS_GEOMFROMTO) - .value("mjSENS_CONTACT", mjSENS_CONTACT) - .value("mjSENS_E_POTENTIAL", mjSENS_E_POTENTIAL) - .value("mjSENS_E_KINETIC", mjSENS_E_KINETIC) - .value("mjSENS_CLOCK", mjSENS_CLOCK) - .value("mjSENS_TACTILE", mjSENS_TACTILE) - .value("mjSENS_PLUGIN", mjSENS_PLUGIN) - .value("mjSENS_USER", mjSENS_USER); - - enum_("mjtSleepPolicy") - .value("mjSLEEP_AUTO", mjSLEEP_AUTO) - .value("mjSLEEP_AUTO_NEVER", mjSLEEP_AUTO_NEVER) - .value("mjSLEEP_AUTO_ALLOWED", mjSLEEP_AUTO_ALLOWED) - .value("mjSLEEP_NEVER", mjSLEEP_NEVER) - .value("mjSLEEP_ALLOWED", mjSLEEP_ALLOWED) - .value("mjSLEEP_INIT", mjSLEEP_INIT); - - enum_("mjtSleepState") - .value("mjS_STATIC", mjS_STATIC) - .value("mjS_ASLEEP", mjS_ASLEEP) - .value("mjS_AWAKE", mjS_AWAKE); - - enum_("mjtSolver") - .value("mjSOL_PGS", mjSOL_PGS) - .value("mjSOL_CG", mjSOL_CG) - .value("mjSOL_NEWTON", mjSOL_NEWTON); - - enum_("mjtStage") - .value("mjSTAGE_NONE", mjSTAGE_NONE) - .value("mjSTAGE_POS", mjSTAGE_POS) - .value("mjSTAGE_VEL", mjSTAGE_VEL) - .value("mjSTAGE_ACC", mjSTAGE_ACC); - - enum_("mjtState") - .value("mjSTATE_TIME", mjSTATE_TIME) - .value("mjSTATE_QPOS", mjSTATE_QPOS) - .value("mjSTATE_QVEL", mjSTATE_QVEL) - .value("mjSTATE_ACT", mjSTATE_ACT) - .value("mjSTATE_WARMSTART", mjSTATE_WARMSTART) - .value("mjSTATE_CTRL", mjSTATE_CTRL) - .value("mjSTATE_QFRC_APPLIED", mjSTATE_QFRC_APPLIED) - .value("mjSTATE_XFRC_APPLIED", mjSTATE_XFRC_APPLIED) - .value("mjSTATE_EQ_ACTIVE", mjSTATE_EQ_ACTIVE) - .value("mjSTATE_MOCAP_POS", mjSTATE_MOCAP_POS) - .value("mjSTATE_MOCAP_QUAT", mjSTATE_MOCAP_QUAT) - .value("mjSTATE_USERDATA", mjSTATE_USERDATA) - .value("mjSTATE_PLUGIN", mjSTATE_PLUGIN) - .value("mjNSTATE", mjNSTATE) - .value("mjSTATE_PHYSICS", mjSTATE_PHYSICS) - .value("mjSTATE_FULLPHYSICS", mjSTATE_FULLPHYSICS) - .value("mjSTATE_USER", mjSTATE_USER) - .value("mjSTATE_INTEGRATION", mjSTATE_INTEGRATION); - - enum_("mjtStereo") - .value("mjSTEREO_NONE", mjSTEREO_NONE) - .value("mjSTEREO_QUADBUFFERED", mjSTEREO_QUADBUFFERED) - .value("mjSTEREO_SIDEBYSIDE", mjSTEREO_SIDEBYSIDE); - - enum_("mjtTaskStatus") - .value("mjTASK_NEW", mjTASK_NEW) - .value("mjTASK_QUEUED", mjTASK_QUEUED) - .value("mjTASK_COMPLETED", mjTASK_COMPLETED); - - enum_("mjtTexture") - .value("mjTEXTURE_2D", mjTEXTURE_2D) - .value("mjTEXTURE_CUBE", mjTEXTURE_CUBE) - .value("mjTEXTURE_SKYBOX", mjTEXTURE_SKYBOX); - - enum_("mjtTextureRole") - .value("mjTEXROLE_USER", mjTEXROLE_USER) - .value("mjTEXROLE_RGB", mjTEXROLE_RGB) - .value("mjTEXROLE_OCCLUSION", mjTEXROLE_OCCLUSION) - .value("mjTEXROLE_ROUGHNESS", mjTEXROLE_ROUGHNESS) - .value("mjTEXROLE_METALLIC", mjTEXROLE_METALLIC) - .value("mjTEXROLE_NORMAL", mjTEXROLE_NORMAL) - .value("mjTEXROLE_OPACITY", mjTEXROLE_OPACITY) - .value("mjTEXROLE_EMISSIVE", mjTEXROLE_EMISSIVE) - .value("mjTEXROLE_RGBA", mjTEXROLE_RGBA) - .value("mjTEXROLE_ORM", mjTEXROLE_ORM) - .value("mjNTEXROLE", mjNTEXROLE); - - enum_("mjtTimer") - .value("mjTIMER_STEP", mjTIMER_STEP) - .value("mjTIMER_FORWARD", mjTIMER_FORWARD) - .value("mjTIMER_INVERSE", mjTIMER_INVERSE) - .value("mjTIMER_POSITION", mjTIMER_POSITION) - .value("mjTIMER_VELOCITY", mjTIMER_VELOCITY) - .value("mjTIMER_ACTUATION", mjTIMER_ACTUATION) - .value("mjTIMER_CONSTRAINT", mjTIMER_CONSTRAINT) - .value("mjTIMER_ADVANCE", mjTIMER_ADVANCE) - .value("mjTIMER_POS_KINEMATICS", mjTIMER_POS_KINEMATICS) - .value("mjTIMER_POS_INERTIA", mjTIMER_POS_INERTIA) - .value("mjTIMER_POS_COLLISION", mjTIMER_POS_COLLISION) - .value("mjTIMER_POS_MAKE", mjTIMER_POS_MAKE) - .value("mjTIMER_POS_PROJECT", mjTIMER_POS_PROJECT) - .value("mjTIMER_COL_BROAD", mjTIMER_COL_BROAD) - .value("mjTIMER_COL_NARROW", mjTIMER_COL_NARROW) - .value("mjNTIMER", mjNTIMER); - - enum_("mjtTrn") - .value("mjTRN_JOINT", mjTRN_JOINT) - .value("mjTRN_JOINTINPARENT", mjTRN_JOINTINPARENT) - .value("mjTRN_SLIDERCRANK", mjTRN_SLIDERCRANK) - .value("mjTRN_TENDON", mjTRN_TENDON) - .value("mjTRN_SITE", mjTRN_SITE) - .value("mjTRN_BODY", mjTRN_BODY) - .value("mjTRN_UNDEFINED", mjTRN_UNDEFINED); - - enum_("mjtVisFlag") - .value("mjVIS_CONVEXHULL", mjVIS_CONVEXHULL) - .value("mjVIS_TEXTURE", mjVIS_TEXTURE) - .value("mjVIS_JOINT", mjVIS_JOINT) - .value("mjVIS_CAMERA", mjVIS_CAMERA) - .value("mjVIS_ACTUATOR", mjVIS_ACTUATOR) - .value("mjVIS_ACTIVATION", mjVIS_ACTIVATION) - .value("mjVIS_LIGHT", mjVIS_LIGHT) - .value("mjVIS_TENDON", mjVIS_TENDON) - .value("mjVIS_RANGEFINDER", mjVIS_RANGEFINDER) - .value("mjVIS_CONSTRAINT", mjVIS_CONSTRAINT) - .value("mjVIS_INERTIA", mjVIS_INERTIA) - .value("mjVIS_SCLINERTIA", mjVIS_SCLINERTIA) - .value("mjVIS_PERTFORCE", mjVIS_PERTFORCE) - .value("mjVIS_PERTOBJ", mjVIS_PERTOBJ) - .value("mjVIS_CONTACTPOINT", mjVIS_CONTACTPOINT) - .value("mjVIS_ISLAND", mjVIS_ISLAND) - .value("mjVIS_CONTACTFORCE", mjVIS_CONTACTFORCE) - .value("mjVIS_CONTACTSPLIT", mjVIS_CONTACTSPLIT) - .value("mjVIS_TRANSPARENT", mjVIS_TRANSPARENT) - .value("mjVIS_AUTOCONNECT", mjVIS_AUTOCONNECT) - .value("mjVIS_COM", mjVIS_COM) - .value("mjVIS_SELECT", mjVIS_SELECT) - .value("mjVIS_STATIC", mjVIS_STATIC) - .value("mjVIS_SKIN", mjVIS_SKIN) - .value("mjVIS_FLEXVERT", mjVIS_FLEXVERT) - .value("mjVIS_FLEXEDGE", mjVIS_FLEXEDGE) - .value("mjVIS_FLEXFACE", mjVIS_FLEXFACE) - .value("mjVIS_FLEXSKIN", mjVIS_FLEXSKIN) - .value("mjVIS_BODYBVH", mjVIS_BODYBVH) - .value("mjVIS_MESHBVH", mjVIS_MESHBVH) - .value("mjVIS_SDFITER", mjVIS_SDFITER) - .value("mjNVISFLAG", mjNVISFLAG); - - enum_("mjtWarning") - .value("mjWARN_INERTIA", mjWARN_INERTIA) - .value("mjWARN_CONTACTFULL", mjWARN_CONTACTFULL) - .value("mjWARN_CNSTRFULL", mjWARN_CNSTRFULL) - .value("mjWARN_VGEOMFULL", mjWARN_VGEOMFULL) - .value("mjWARN_BADQPOS", mjWARN_BADQPOS) - .value("mjWARN_BADQVEL", mjWARN_BADQVEL) - .value("mjWARN_BADQACC", mjWARN_BADQACC) - .value("mjWARN_BADCTRL", mjWARN_BADCTRL) - .value("mjNWARNING", mjNWARNING); - - enum_("mjtWrap") - .value("mjWRAP_NONE", mjWRAP_NONE) - .value("mjWRAP_JOINT", mjWRAP_JOINT) - .value("mjWRAP_PULLEY", mjWRAP_PULLEY) - .value("mjWRAP_SITE", mjWRAP_SITE) - .value("mjWRAP_SPHERE", mjWRAP_SPHERE) - .value("mjWRAP_CYLINDER", mjWRAP_CYLINDER); - -} using mjVisualGlobal = decltype(::mjVisual::global); using mjVisualHeadlight = decltype(::mjVisual::headlight); @@ -8288,48 +7628,54 @@ struct MjvScene { std::vector camera; }; -// =============== MjModel =============== // -MjModel::MjModel(mjModel *ptr) +MjModel::MjModel(mjModel* ptr) : ptr_(ptr), opt(&ptr->opt), vis(&ptr->vis), stat(&ptr->stat) {} -MjModel::MjModel(const MjModel &other) + +MjModel::MjModel(const MjModel& other) : ptr_(mj_copyModel(nullptr, other.get())), opt(&ptr_->opt), vis(&ptr_->vis), stat(&ptr_->stat) {} + MjModel::~MjModel() { if (ptr_) { mj_deleteModel(ptr_); } } -mjModel* MjModel::get() const { return ptr_; } -void MjModel::set(mjModel *ptr) { ptr_ = ptr; } -// TODO(manevi): Consider passing `const MjModel& m` here, mj_makeData uses a const model. -// =============== MjData =============== // -MjData::MjData(MjModel *m) { +mjModel* MjModel::get() const { return ptr_; } + +void MjModel::set(mjModel* ptr) { ptr_ = ptr; } + +MjData::MjData(MjModel* m) { model = m->get(); ptr_ = mj_makeData(model); if (ptr_) { - solver = InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); + solver = + InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); timer = InitWrapperArray(get()->timer, mjNTIMER); warning = InitWrapperArray(get()->warning, mjNWARNING); } } -MjData::MjData(const MjModel &model, const MjData &other) + +MjData::MjData(const MjModel& model, const MjData& other) : ptr_(mj_copyData(nullptr, model.get(), other.get())), model(model.get()) { if (ptr_) { - solver = InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); + solver = + InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); timer = InitWrapperArray(get()->timer, mjNTIMER); warning = InitWrapperArray(get()->warning, mjNWARNING); } } + MjData::~MjData() { if (ptr_) { mj_deleteData(ptr_); } } mjData* MjData::get() const { return ptr_; } -void MjData::set(mjData *ptr) { ptr_ = ptr; } + +void MjData::set(mjData* ptr) { ptr_ = ptr; } std::vector MjData::contact() const { return InitWrapperArray(get()->contact, get()->ncon); @@ -8344,7 +7690,7 @@ MjvScene::MjvScene() { camera = InitWrapperArray(ptr_->camera, 2); }; -MjvScene::MjvScene(MjModel *m, int maxgeom) { +MjvScene::MjvScene(MjModel* m, int maxgeom) { owned_ = true; model = m->get(); ptr_ = new mjvScene; @@ -8353,6 +7699,7 @@ MjvScene::MjvScene(MjModel *m, int maxgeom) { lights = InitWrapperArray(ptr_->lights, mjMAXLIGHT); camera = InitWrapperArray(ptr_->camera, 2); }; + MjvScene::~MjvScene() { if (owned_ && ptr_) { mjv_freeScene(ptr_); @@ -8361,7 +7708,7 @@ MjvScene::~MjvScene() { } mjvScene* MjvScene::get() const { return ptr_; } -void MjvScene::set(mjvScene *ptr) { ptr_ = ptr; } +void MjvScene::set(mjvScene* ptr) { ptr_ = ptr; } // Taken from the python mujoco bindings code for MjvScene Wrapper int MjvScene::GetSumFlexFaces() const { @@ -8456,7 +7803,6 @@ MjSpec::~MjSpec() { mjSpec *MjSpec::get() const { return ptr_; } void MjSpec::set(mjSpec *ptr) { ptr_ = ptr; } -// ======= FACTORY AND HELPER FUNCTIONS ========= // std::unique_ptr loadFromXML_wrapper(std::string filename) { char error[1000]; mjModel *model = mj_loadXML(filename.c_str(), nullptr, error, sizeof(error)); @@ -8498,1602 +7844,6 @@ int mj_setLengthRange_wrapper(const MjModel& m, const MjData& d, int index, cons return result; } -EMSCRIPTEN_BINDINGS(mujoco_structs) { - emscripten::class_("MjContact") - .constructor<>() - .function("copy", &MjContact::copy, take_ownership()) - .property("H", &MjContact::H) - .property("dim", &MjContact::dim, &MjContact::set_dim, reference()) - .property("dist", &MjContact::dist, &MjContact::set_dist, reference()) - .property("efc_address", &MjContact::efc_address, &MjContact::set_efc_address, reference()) - .property("elem", &MjContact::elem) - .property("exclude", &MjContact::exclude, &MjContact::set_exclude, reference()) - .property("flex", &MjContact::flex) - .property("frame", &MjContact::frame) - .property("friction", &MjContact::friction) - .property("geom", &MjContact::geom) - .property("geom1", &MjContact::geom1, &MjContact::set_geom1, reference()) - .property("geom2", &MjContact::geom2, &MjContact::set_geom2, reference()) - .property("includemargin", &MjContact::includemargin, &MjContact::set_includemargin, reference()) - .property("mu", &MjContact::mu, &MjContact::set_mu, reference()) - .property("pos", &MjContact::pos) - .property("solimp", &MjContact::solimp) - .property("solref", &MjContact::solref) - .property("solreffriction", &MjContact::solreffriction) - .property("vert", &MjContact::vert); - emscripten::class_("MjData") - .constructor() - .constructor() - .property("M", &MjData::M) - .property("act", &MjData::act) - .property("act_dot", &MjData::act_dot) - .property("actuator_force", &MjData::actuator_force) - .property("actuator_length", &MjData::actuator_length) - .property("actuator_moment", &MjData::actuator_moment) - .property("actuator_velocity", &MjData::actuator_velocity) - .property("arena", &MjData::arena) - .property("body_awake", &MjData::body_awake) - .property("body_awake_ind", &MjData::body_awake_ind) - .property("buffer", &MjData::buffer) - .property("bvh_aabb_dyn", &MjData::bvh_aabb_dyn) - .property("bvh_active", &MjData::bvh_active) - .property("cacc", &MjData::cacc) - .property("cam_xmat", &MjData::cam_xmat) - .property("cam_xpos", &MjData::cam_xpos) - .property("cdof", &MjData::cdof) - .property("cdof_dot", &MjData::cdof_dot) - .property("cfrc_ext", &MjData::cfrc_ext) - .property("cfrc_int", &MjData::cfrc_int) - .property("cinert", &MjData::cinert) - .property("contact", &MjData::contact) - .property("crb", &MjData::crb) - .property("ctrl", &MjData::ctrl) - .property("cvel", &MjData::cvel) - .property("dof_awake_ind", &MjData::dof_awake_ind) - .property("dof_island", &MjData::dof_island) - .property("efc_AR", &MjData::efc_AR) - .property("efc_AR_colind", &MjData::efc_AR_colind) - .property("efc_AR_rowadr", &MjData::efc_AR_rowadr) - .property("efc_AR_rownnz", &MjData::efc_AR_rownnz) - .property("efc_D", &MjData::efc_D) - .property("efc_J", &MjData::efc_J) - .property("efc_J_colind", &MjData::efc_J_colind) - .property("efc_J_rowadr", &MjData::efc_J_rowadr) - .property("efc_J_rownnz", &MjData::efc_J_rownnz) - .property("efc_J_rowsuper", &MjData::efc_J_rowsuper) - .property("efc_KBIP", &MjData::efc_KBIP) - .property("efc_R", &MjData::efc_R) - .property("efc_aref", &MjData::efc_aref) - .property("efc_b", &MjData::efc_b) - .property("efc_diagApprox", &MjData::efc_diagApprox) - .property("efc_force", &MjData::efc_force) - .property("efc_frictionloss", &MjData::efc_frictionloss) - .property("efc_id", &MjData::efc_id) - .property("efc_island", &MjData::efc_island) - .property("efc_margin", &MjData::efc_margin) - .property("efc_pos", &MjData::efc_pos) - .property("efc_state", &MjData::efc_state) - .property("efc_type", &MjData::efc_type) - .property("efc_vel", &MjData::efc_vel) - .property("energy", &MjData::energy) - .property("eq_active", &MjData::eq_active) - .property("flexedge_J", &MjData::flexedge_J) - .property("flexedge_J_colind", &MjData::flexedge_J_colind) - .property("flexedge_J_rowadr", &MjData::flexedge_J_rowadr) - .property("flexedge_J_rownnz", &MjData::flexedge_J_rownnz) - .property("flexedge_length", &MjData::flexedge_length) - .property("flexedge_velocity", &MjData::flexedge_velocity) - .property("flexelem_aabb", &MjData::flexelem_aabb) - .property("flexvert_xpos", &MjData::flexvert_xpos) - .property("geom_xmat", &MjData::geom_xmat) - .property("geom_xpos", &MjData::geom_xpos) - .property("iLD", &MjData::iLD) - .property("iLDiagInv", &MjData::iLDiagInv) - .property("iM", &MjData::iM) - .property("iM_colind", &MjData::iM_colind) - .property("iM_rowadr", &MjData::iM_rowadr) - .property("iM_rownnz", &MjData::iM_rownnz) - .property("iacc", &MjData::iacc) - .property("iacc_smooth", &MjData::iacc_smooth) - .property("iefc_D", &MjData::iefc_D) - .property("iefc_J", &MjData::iefc_J) - .property("iefc_J_colind", &MjData::iefc_J_colind) - .property("iefc_J_rowadr", &MjData::iefc_J_rowadr) - .property("iefc_J_rownnz", &MjData::iefc_J_rownnz) - .property("iefc_J_rowsuper", &MjData::iefc_J_rowsuper) - .property("iefc_R", &MjData::iefc_R) - .property("iefc_aref", &MjData::iefc_aref) - .property("iefc_force", &MjData::iefc_force) - .property("iefc_frictionloss", &MjData::iefc_frictionloss) - .property("iefc_id", &MjData::iefc_id) - .property("iefc_state", &MjData::iefc_state) - .property("iefc_type", &MjData::iefc_type) - .property("ifrc_constraint", &MjData::ifrc_constraint) - .property("ifrc_smooth", &MjData::ifrc_smooth) - .property("island_dofadr", &MjData::island_dofadr) - .property("island_idofadr", &MjData::island_idofadr) - .property("island_iefcadr", &MjData::island_iefcadr) - .property("island_itreeadr", &MjData::island_itreeadr) - .property("island_ne", &MjData::island_ne) - .property("island_nefc", &MjData::island_nefc) - .property("island_nf", &MjData::island_nf) - .property("island_ntree", &MjData::island_ntree) - .property("island_nv", &MjData::island_nv) - .property("light_xdir", &MjData::light_xdir) - .property("light_xpos", &MjData::light_xpos) - .property("map_dof2idof", &MjData::map_dof2idof) - .property("map_efc2iefc", &MjData::map_efc2iefc) - .property("map_idof2dof", &MjData::map_idof2dof) - .property("map_iefc2efc", &MjData::map_iefc2efc) - .property("map_itree2tree", &MjData::map_itree2tree) - .property("maxuse_arena", &MjData::maxuse_arena, &MjData::set_maxuse_arena, reference()) - .property("maxuse_con", &MjData::maxuse_con, &MjData::set_maxuse_con, reference()) - .property("maxuse_efc", &MjData::maxuse_efc, &MjData::set_maxuse_efc, reference()) - .property("maxuse_stack", &MjData::maxuse_stack, &MjData::set_maxuse_stack, reference()) - .property("maxuse_threadstack", &MjData::maxuse_threadstack) - .property("mocap_pos", &MjData::mocap_pos) - .property("mocap_quat", &MjData::mocap_quat) - .property("moment_colind", &MjData::moment_colind) - .property("moment_rowadr", &MjData::moment_rowadr) - .property("moment_rownnz", &MjData::moment_rownnz) - .property("nA", &MjData::nA, &MjData::set_nA, reference()) - .property("nJ", &MjData::nJ, &MjData::set_nJ, reference()) - .property("narena", &MjData::narena, &MjData::set_narena, reference()) - .property("nbody_awake", &MjData::nbody_awake, &MjData::set_nbody_awake, reference()) - .property("nbuffer", &MjData::nbuffer, &MjData::set_nbuffer, reference()) - .property("ncon", &MjData::ncon, &MjData::set_ncon, reference()) - .property("ne", &MjData::ne, &MjData::set_ne, reference()) - .property("nefc", &MjData::nefc, &MjData::set_nefc, reference()) - .property("nf", &MjData::nf, &MjData::set_nf, reference()) - .property("nidof", &MjData::nidof, &MjData::set_nidof, reference()) - .property("nisland", &MjData::nisland, &MjData::set_nisland, reference()) - .property("nl", &MjData::nl, &MjData::set_nl, reference()) - .property("nparent_awake", &MjData::nparent_awake, &MjData::set_nparent_awake, reference()) - .property("nplugin", &MjData::nplugin, &MjData::set_nplugin, reference()) - .property("ntree_awake", &MjData::ntree_awake, &MjData::set_ntree_awake, reference()) - .property("nv_awake", &MjData::nv_awake, &MjData::set_nv_awake, reference()) - .property("parena", &MjData::parena, &MjData::set_parena, reference()) - .property("parent_awake_ind", &MjData::parent_awake_ind) - .property("pbase", &MjData::pbase, &MjData::set_pbase, reference()) - .property("plugin", &MjData::plugin) - .property("plugin_data", &MjData::plugin_data) - .property("plugin_state", &MjData::plugin_state) - .property("pstack", &MjData::pstack, &MjData::set_pstack, reference()) - .property("qDeriv", &MjData::qDeriv) - .property("qH", &MjData::qH) - .property("qHDiagInv", &MjData::qHDiagInv) - .property("qLD", &MjData::qLD) - .property("qLDiagInv", &MjData::qLDiagInv) - .property("qLU", &MjData::qLU) - .property("qM", &MjData::qM) - .property("qacc", &MjData::qacc) - .property("qacc_smooth", &MjData::qacc_smooth) - .property("qacc_warmstart", &MjData::qacc_warmstart) - .property("qfrc_actuator", &MjData::qfrc_actuator) - .property("qfrc_applied", &MjData::qfrc_applied) - .property("qfrc_bias", &MjData::qfrc_bias) - .property("qfrc_constraint", &MjData::qfrc_constraint) - .property("qfrc_damper", &MjData::qfrc_damper) - .property("qfrc_fluid", &MjData::qfrc_fluid) - .property("qfrc_gravcomp", &MjData::qfrc_gravcomp) - .property("qfrc_inverse", &MjData::qfrc_inverse) - .property("qfrc_passive", &MjData::qfrc_passive) - .property("qfrc_smooth", &MjData::qfrc_smooth) - .property("qfrc_spring", &MjData::qfrc_spring) - .property("qpos", &MjData::qpos) - .property("qvel", &MjData::qvel) - .property("sensordata", &MjData::sensordata) - .property("signature", &MjData::signature, &MjData::set_signature, reference()) - .property("site_xmat", &MjData::site_xmat) - .property("site_xpos", &MjData::site_xpos) - .property("solver", &MjData::solver, reference()) - .property("solver_fwdinv", &MjData::solver_fwdinv) - .property("solver_niter", &MjData::solver_niter) - .property("solver_nnz", &MjData::solver_nnz) - .property("subtree_angmom", &MjData::subtree_angmom) - .property("subtree_com", &MjData::subtree_com) - .property("subtree_linvel", &MjData::subtree_linvel) - .property("ten_J", &MjData::ten_J) - .property("ten_J_colind", &MjData::ten_J_colind) - .property("ten_J_rowadr", &MjData::ten_J_rowadr) - .property("ten_J_rownnz", &MjData::ten_J_rownnz) - .property("ten_length", &MjData::ten_length) - .property("ten_velocity", &MjData::ten_velocity) - .property("ten_wrapadr", &MjData::ten_wrapadr) - .property("ten_wrapnum", &MjData::ten_wrapnum) - .property("tendon_efcadr", &MjData::tendon_efcadr) - .property("threadpool", &MjData::threadpool, &MjData::set_threadpool, reference()) - .property("time", &MjData::time, &MjData::set_time, reference()) - .property("timer", &MjData::timer, reference()) - .property("tree_asleep", &MjData::tree_asleep) - .property("tree_awake", &MjData::tree_awake) - .property("tree_island", &MjData::tree_island) - .property("userdata", &MjData::userdata) - .property("warning", &MjData::warning, reference()) - .property("wrap_obj", &MjData::wrap_obj) - .property("wrap_xpos", &MjData::wrap_xpos) - .property("xanchor", &MjData::xanchor) - .property("xaxis", &MjData::xaxis) - .property("xfrc_applied", &MjData::xfrc_applied) - .property("ximat", &MjData::ximat) - .property("xipos", &MjData::xipos) - .property("xmat", &MjData::xmat) - .property("xpos", &MjData::xpos) - .property("xquat", &MjData::xquat); - emscripten::class_("MjLROpt") - .constructor<>() - .function("copy", &MjLROpt::copy, take_ownership()) - .property("accel", &MjLROpt::accel, &MjLROpt::set_accel, reference()) - .property("interval", &MjLROpt::interval, &MjLROpt::set_interval, reference()) - .property("inttotal", &MjLROpt::inttotal, &MjLROpt::set_inttotal, reference()) - .property("maxforce", &MjLROpt::maxforce, &MjLROpt::set_maxforce, reference()) - .property("mode", &MjLROpt::mode, &MjLROpt::set_mode, reference()) - .property("timeconst", &MjLROpt::timeconst, &MjLROpt::set_timeconst, reference()) - .property("timestep", &MjLROpt::timestep, &MjLROpt::set_timestep, reference()) - .property("tolrange", &MjLROpt::tolrange, &MjLROpt::set_tolrange, reference()) - .property("useexisting", &MjLROpt::useexisting, &MjLROpt::set_useexisting, reference()) - .property("uselimit", &MjLROpt::uselimit, &MjLROpt::set_uselimit, reference()); - emscripten::class_("MjModel") - .class_function("loadFromXML", &loadFromXML_wrapper, take_ownership()) - .constructor() - .property("B_colind", &MjModel::B_colind) - .property("B_rowadr", &MjModel::B_rowadr) - .property("B_rownnz", &MjModel::B_rownnz) - .property("D_colind", &MjModel::D_colind) - .property("D_diag", &MjModel::D_diag) - .property("D_rowadr", &MjModel::D_rowadr) - .property("D_rownnz", &MjModel::D_rownnz) - .property("M_colind", &MjModel::M_colind) - .property("M_rowadr", &MjModel::M_rowadr) - .property("M_rownnz", &MjModel::M_rownnz) - .property("actuator_acc0", &MjModel::actuator_acc0) - .property("actuator_actadr", &MjModel::actuator_actadr) - .property("actuator_actearly", &MjModel::actuator_actearly) - .property("actuator_actlimited", &MjModel::actuator_actlimited) - .property("actuator_actnum", &MjModel::actuator_actnum) - .property("actuator_actrange", &MjModel::actuator_actrange) - .property("actuator_biasprm", &MjModel::actuator_biasprm) - .property("actuator_biastype", &MjModel::actuator_biastype) - .property("actuator_cranklength", &MjModel::actuator_cranklength) - .property("actuator_ctrllimited", &MjModel::actuator_ctrllimited) - .property("actuator_ctrlrange", &MjModel::actuator_ctrlrange) - .property("actuator_dynprm", &MjModel::actuator_dynprm) - .property("actuator_dyntype", &MjModel::actuator_dyntype) - .property("actuator_forcelimited", &MjModel::actuator_forcelimited) - .property("actuator_forcerange", &MjModel::actuator_forcerange) - .property("actuator_gainprm", &MjModel::actuator_gainprm) - .property("actuator_gaintype", &MjModel::actuator_gaintype) - .property("actuator_gear", &MjModel::actuator_gear) - .property("actuator_group", &MjModel::actuator_group) - .property("actuator_length0", &MjModel::actuator_length0) - .property("actuator_lengthrange", &MjModel::actuator_lengthrange) - .property("actuator_plugin", &MjModel::actuator_plugin) - .property("actuator_trnid", &MjModel::actuator_trnid) - .property("actuator_trntype", &MjModel::actuator_trntype) - .property("actuator_user", &MjModel::actuator_user) - .property("body_bvhadr", &MjModel::body_bvhadr) - .property("body_bvhnum", &MjModel::body_bvhnum) - .property("body_conaffinity", &MjModel::body_conaffinity) - .property("body_contype", &MjModel::body_contype) - .property("body_dofadr", &MjModel::body_dofadr) - .property("body_dofnum", &MjModel::body_dofnum) - .property("body_geomadr", &MjModel::body_geomadr) - .property("body_geomnum", &MjModel::body_geomnum) - .property("body_gravcomp", &MjModel::body_gravcomp) - .property("body_inertia", &MjModel::body_inertia) - .property("body_invweight0", &MjModel::body_invweight0) - .property("body_ipos", &MjModel::body_ipos) - .property("body_iquat", &MjModel::body_iquat) - .property("body_jntadr", &MjModel::body_jntadr) - .property("body_jntnum", &MjModel::body_jntnum) - .property("body_margin", &MjModel::body_margin) - .property("body_mass", &MjModel::body_mass) - .property("body_mocapid", &MjModel::body_mocapid) - .property("body_parentid", &MjModel::body_parentid) - .property("body_plugin", &MjModel::body_plugin) - .property("body_pos", &MjModel::body_pos) - .property("body_quat", &MjModel::body_quat) - .property("body_rootid", &MjModel::body_rootid) - .property("body_sameframe", &MjModel::body_sameframe) - .property("body_simple", &MjModel::body_simple) - .property("body_subtreemass", &MjModel::body_subtreemass) - .property("body_treeid", &MjModel::body_treeid) - .property("body_user", &MjModel::body_user) - .property("body_weldid", &MjModel::body_weldid) - .property("buffer", &MjModel::buffer) - .property("bvh_aabb", &MjModel::bvh_aabb) - .property("bvh_child", &MjModel::bvh_child) - .property("bvh_depth", &MjModel::bvh_depth) - .property("bvh_nodeid", &MjModel::bvh_nodeid) - .property("cam_bodyid", &MjModel::cam_bodyid) - .property("cam_fovy", &MjModel::cam_fovy) - .property("cam_intrinsic", &MjModel::cam_intrinsic) - .property("cam_ipd", &MjModel::cam_ipd) - .property("cam_mat0", &MjModel::cam_mat0) - .property("cam_mode", &MjModel::cam_mode) - .property("cam_orthographic", &MjModel::cam_orthographic) - .property("cam_pos", &MjModel::cam_pos) - .property("cam_pos0", &MjModel::cam_pos0) - .property("cam_poscom0", &MjModel::cam_poscom0) - .property("cam_quat", &MjModel::cam_quat) - .property("cam_resolution", &MjModel::cam_resolution) - .property("cam_sensorsize", &MjModel::cam_sensorsize) - .property("cam_targetbodyid", &MjModel::cam_targetbodyid) - .property("cam_user", &MjModel::cam_user) - .property("dof_M0", &MjModel::dof_M0) - .property("dof_Madr", &MjModel::dof_Madr) - .property("dof_armature", &MjModel::dof_armature) - .property("dof_bodyid", &MjModel::dof_bodyid) - .property("dof_damping", &MjModel::dof_damping) - .property("dof_frictionloss", &MjModel::dof_frictionloss) - .property("dof_invweight0", &MjModel::dof_invweight0) - .property("dof_jntid", &MjModel::dof_jntid) - .property("dof_length", &MjModel::dof_length) - .property("dof_parentid", &MjModel::dof_parentid) - .property("dof_simplenum", &MjModel::dof_simplenum) - .property("dof_solimp", &MjModel::dof_solimp) - .property("dof_solref", &MjModel::dof_solref) - .property("dof_treeid", &MjModel::dof_treeid) - .property("eq_active0", &MjModel::eq_active0) - .property("eq_data", &MjModel::eq_data) - .property("eq_obj1id", &MjModel::eq_obj1id) - .property("eq_obj2id", &MjModel::eq_obj2id) - .property("eq_objtype", &MjModel::eq_objtype) - .property("eq_solimp", &MjModel::eq_solimp) - .property("eq_solref", &MjModel::eq_solref) - .property("eq_type", &MjModel::eq_type) - .property("exclude_signature", &MjModel::exclude_signature) - .property("flex_activelayers", &MjModel::flex_activelayers) - .property("flex_bending", &MjModel::flex_bending) - .property("flex_bvhadr", &MjModel::flex_bvhadr) - .property("flex_bvhnum", &MjModel::flex_bvhnum) - .property("flex_centered", &MjModel::flex_centered) - .property("flex_conaffinity", &MjModel::flex_conaffinity) - .property("flex_condim", &MjModel::flex_condim) - .property("flex_contype", &MjModel::flex_contype) - .property("flex_damping", &MjModel::flex_damping) - .property("flex_dim", &MjModel::flex_dim) - .property("flex_edge", &MjModel::flex_edge) - .property("flex_edgeadr", &MjModel::flex_edgeadr) - .property("flex_edgedamping", &MjModel::flex_edgedamping) - .property("flex_edgeequality", &MjModel::flex_edgeequality) - .property("flex_edgeflap", &MjModel::flex_edgeflap) - .property("flex_edgenum", &MjModel::flex_edgenum) - .property("flex_edgestiffness", &MjModel::flex_edgestiffness) - .property("flex_elem", &MjModel::flex_elem) - .property("flex_elemadr", &MjModel::flex_elemadr) - .property("flex_elemdataadr", &MjModel::flex_elemdataadr) - .property("flex_elemedge", &MjModel::flex_elemedge) - .property("flex_elemedgeadr", &MjModel::flex_elemedgeadr) - .property("flex_elemlayer", &MjModel::flex_elemlayer) - .property("flex_elemnum", &MjModel::flex_elemnum) - .property("flex_elemtexcoord", &MjModel::flex_elemtexcoord) - .property("flex_evpair", &MjModel::flex_evpair) - .property("flex_evpairadr", &MjModel::flex_evpairadr) - .property("flex_evpairnum", &MjModel::flex_evpairnum) - .property("flex_flatskin", &MjModel::flex_flatskin) - .property("flex_friction", &MjModel::flex_friction) - .property("flex_gap", &MjModel::flex_gap) - .property("flex_group", &MjModel::flex_group) - .property("flex_internal", &MjModel::flex_internal) - .property("flex_interp", &MjModel::flex_interp) - .property("flex_margin", &MjModel::flex_margin) - .property("flex_matid", &MjModel::flex_matid) - .property("flex_node", &MjModel::flex_node) - .property("flex_node0", &MjModel::flex_node0) - .property("flex_nodeadr", &MjModel::flex_nodeadr) - .property("flex_nodebodyid", &MjModel::flex_nodebodyid) - .property("flex_nodenum", &MjModel::flex_nodenum) - .property("flex_passive", &MjModel::flex_passive) - .property("flex_priority", &MjModel::flex_priority) - .property("flex_radius", &MjModel::flex_radius) - .property("flex_rgba", &MjModel::flex_rgba) - .property("flex_rigid", &MjModel::flex_rigid) - .property("flex_selfcollide", &MjModel::flex_selfcollide) - .property("flex_shell", &MjModel::flex_shell) - .property("flex_shelldataadr", &MjModel::flex_shelldataadr) - .property("flex_shellnum", &MjModel::flex_shellnum) - .property("flex_solimp", &MjModel::flex_solimp) - .property("flex_solmix", &MjModel::flex_solmix) - .property("flex_solref", &MjModel::flex_solref) - .property("flex_stiffness", &MjModel::flex_stiffness) - .property("flex_texcoord", &MjModel::flex_texcoord) - .property("flex_texcoordadr", &MjModel::flex_texcoordadr) - .property("flex_vert", &MjModel::flex_vert) - .property("flex_vert0", &MjModel::flex_vert0) - .property("flex_vertadr", &MjModel::flex_vertadr) - .property("flex_vertbodyid", &MjModel::flex_vertbodyid) - .property("flex_vertnum", &MjModel::flex_vertnum) - .property("flexedge_invweight0", &MjModel::flexedge_invweight0) - .property("flexedge_length0", &MjModel::flexedge_length0) - .property("flexedge_rigid", &MjModel::flexedge_rigid) - .property("geom_aabb", &MjModel::geom_aabb) - .property("geom_bodyid", &MjModel::geom_bodyid) - .property("geom_conaffinity", &MjModel::geom_conaffinity) - .property("geom_condim", &MjModel::geom_condim) - .property("geom_contype", &MjModel::geom_contype) - .property("geom_dataid", &MjModel::geom_dataid) - .property("geom_fluid", &MjModel::geom_fluid) - .property("geom_friction", &MjModel::geom_friction) - .property("geom_gap", &MjModel::geom_gap) - .property("geom_group", &MjModel::geom_group) - .property("geom_margin", &MjModel::geom_margin) - .property("geom_matid", &MjModel::geom_matid) - .property("geom_plugin", &MjModel::geom_plugin) - .property("geom_pos", &MjModel::geom_pos) - .property("geom_priority", &MjModel::geom_priority) - .property("geom_quat", &MjModel::geom_quat) - .property("geom_rbound", &MjModel::geom_rbound) - .property("geom_rgba", &MjModel::geom_rgba) - .property("geom_sameframe", &MjModel::geom_sameframe) - .property("geom_size", &MjModel::geom_size) - .property("geom_solimp", &MjModel::geom_solimp) - .property("geom_solmix", &MjModel::geom_solmix) - .property("geom_solref", &MjModel::geom_solref) - .property("geom_type", &MjModel::geom_type) - .property("geom_user", &MjModel::geom_user) - .property("hfield_adr", &MjModel::hfield_adr) - .property("hfield_data", &MjModel::hfield_data) - .property("hfield_ncol", &MjModel::hfield_ncol) - .property("hfield_nrow", &MjModel::hfield_nrow) - .property("hfield_pathadr", &MjModel::hfield_pathadr) - .property("hfield_size", &MjModel::hfield_size) - .property("jnt_actfrclimited", &MjModel::jnt_actfrclimited) - .property("jnt_actfrcrange", &MjModel::jnt_actfrcrange) - .property("jnt_actgravcomp", &MjModel::jnt_actgravcomp) - .property("jnt_axis", &MjModel::jnt_axis) - .property("jnt_bodyid", &MjModel::jnt_bodyid) - .property("jnt_dofadr", &MjModel::jnt_dofadr) - .property("jnt_group", &MjModel::jnt_group) - .property("jnt_limited", &MjModel::jnt_limited) - .property("jnt_margin", &MjModel::jnt_margin) - .property("jnt_pos", &MjModel::jnt_pos) - .property("jnt_qposadr", &MjModel::jnt_qposadr) - .property("jnt_range", &MjModel::jnt_range) - .property("jnt_solimp", &MjModel::jnt_solimp) - .property("jnt_solref", &MjModel::jnt_solref) - .property("jnt_stiffness", &MjModel::jnt_stiffness) - .property("jnt_type", &MjModel::jnt_type) - .property("jnt_user", &MjModel::jnt_user) - .property("key_act", &MjModel::key_act) - .property("key_ctrl", &MjModel::key_ctrl) - .property("key_mpos", &MjModel::key_mpos) - .property("key_mquat", &MjModel::key_mquat) - .property("key_qpos", &MjModel::key_qpos) - .property("key_qvel", &MjModel::key_qvel) - .property("key_time", &MjModel::key_time) - .property("light_active", &MjModel::light_active) - .property("light_ambient", &MjModel::light_ambient) - .property("light_attenuation", &MjModel::light_attenuation) - .property("light_bodyid", &MjModel::light_bodyid) - .property("light_bulbradius", &MjModel::light_bulbradius) - .property("light_castshadow", &MjModel::light_castshadow) - .property("light_cutoff", &MjModel::light_cutoff) - .property("light_diffuse", &MjModel::light_diffuse) - .property("light_dir", &MjModel::light_dir) - .property("light_dir0", &MjModel::light_dir0) - .property("light_exponent", &MjModel::light_exponent) - .property("light_intensity", &MjModel::light_intensity) - .property("light_mode", &MjModel::light_mode) - .property("light_pos", &MjModel::light_pos) - .property("light_pos0", &MjModel::light_pos0) - .property("light_poscom0", &MjModel::light_poscom0) - .property("light_range", &MjModel::light_range) - .property("light_specular", &MjModel::light_specular) - .property("light_targetbodyid", &MjModel::light_targetbodyid) - .property("light_texid", &MjModel::light_texid) - .property("light_type", &MjModel::light_type) - .property("mapD2M", &MjModel::mapD2M) - .property("mapM2D", &MjModel::mapM2D) - .property("mapM2M", &MjModel::mapM2M) - .property("mat_emission", &MjModel::mat_emission) - .property("mat_metallic", &MjModel::mat_metallic) - .property("mat_reflectance", &MjModel::mat_reflectance) - .property("mat_rgba", &MjModel::mat_rgba) - .property("mat_roughness", &MjModel::mat_roughness) - .property("mat_shininess", &MjModel::mat_shininess) - .property("mat_specular", &MjModel::mat_specular) - .property("mat_texid", &MjModel::mat_texid) - .property("mat_texrepeat", &MjModel::mat_texrepeat) - .property("mat_texuniform", &MjModel::mat_texuniform) - .property("mesh_bvhadr", &MjModel::mesh_bvhadr) - .property("mesh_bvhnum", &MjModel::mesh_bvhnum) - .property("mesh_face", &MjModel::mesh_face) - .property("mesh_faceadr", &MjModel::mesh_faceadr) - .property("mesh_facenormal", &MjModel::mesh_facenormal) - .property("mesh_facenum", &MjModel::mesh_facenum) - .property("mesh_facetexcoord", &MjModel::mesh_facetexcoord) - .property("mesh_graph", &MjModel::mesh_graph) - .property("mesh_graphadr", &MjModel::mesh_graphadr) - .property("mesh_normal", &MjModel::mesh_normal) - .property("mesh_normaladr", &MjModel::mesh_normaladr) - .property("mesh_normalnum", &MjModel::mesh_normalnum) - .property("mesh_octadr", &MjModel::mesh_octadr) - .property("mesh_octnum", &MjModel::mesh_octnum) - .property("mesh_pathadr", &MjModel::mesh_pathadr) - .property("mesh_polyadr", &MjModel::mesh_polyadr) - .property("mesh_polymap", &MjModel::mesh_polymap) - .property("mesh_polymapadr", &MjModel::mesh_polymapadr) - .property("mesh_polymapnum", &MjModel::mesh_polymapnum) - .property("mesh_polynormal", &MjModel::mesh_polynormal) - .property("mesh_polynum", &MjModel::mesh_polynum) - .property("mesh_polyvert", &MjModel::mesh_polyvert) - .property("mesh_polyvertadr", &MjModel::mesh_polyvertadr) - .property("mesh_polyvertnum", &MjModel::mesh_polyvertnum) - .property("mesh_pos", &MjModel::mesh_pos) - .property("mesh_quat", &MjModel::mesh_quat) - .property("mesh_scale", &MjModel::mesh_scale) - .property("mesh_texcoord", &MjModel::mesh_texcoord) - .property("mesh_texcoordadr", &MjModel::mesh_texcoordadr) - .property("mesh_texcoordnum", &MjModel::mesh_texcoordnum) - .property("mesh_vert", &MjModel::mesh_vert) - .property("mesh_vertadr", &MjModel::mesh_vertadr) - .property("mesh_vertnum", &MjModel::mesh_vertnum) - .property("nB", &MjModel::nB, &MjModel::set_nB, reference()) - .property("nC", &MjModel::nC, &MjModel::set_nC, reference()) - .property("nD", &MjModel::nD, &MjModel::set_nD, reference()) - .property("nJmom", &MjModel::nJmom, &MjModel::set_nJmom, reference()) - .property("nM", &MjModel::nM, &MjModel::set_nM, reference()) - .property("na", &MjModel::na, &MjModel::set_na, reference()) - .property("name_actuatoradr", &MjModel::name_actuatoradr) - .property("name_bodyadr", &MjModel::name_bodyadr) - .property("name_camadr", &MjModel::name_camadr) - .property("name_eqadr", &MjModel::name_eqadr) - .property("name_excludeadr", &MjModel::name_excludeadr) - .property("name_flexadr", &MjModel::name_flexadr) - .property("name_geomadr", &MjModel::name_geomadr) - .property("name_hfieldadr", &MjModel::name_hfieldadr) - .property("name_jntadr", &MjModel::name_jntadr) - .property("name_keyadr", &MjModel::name_keyadr) - .property("name_lightadr", &MjModel::name_lightadr) - .property("name_matadr", &MjModel::name_matadr) - .property("name_meshadr", &MjModel::name_meshadr) - .property("name_numericadr", &MjModel::name_numericadr) - .property("name_pairadr", &MjModel::name_pairadr) - .property("name_pluginadr", &MjModel::name_pluginadr) - .property("name_sensoradr", &MjModel::name_sensoradr) - .property("name_siteadr", &MjModel::name_siteadr) - .property("name_skinadr", &MjModel::name_skinadr) - .property("name_tendonadr", &MjModel::name_tendonadr) - .property("name_texadr", &MjModel::name_texadr) - .property("name_textadr", &MjModel::name_textadr) - .property("name_tupleadr", &MjModel::name_tupleadr) - .property("names", &MjModel::names) - .property("names_map", &MjModel::names_map) - .property("narena", &MjModel::narena, &MjModel::set_narena, reference()) - .property("nbody", &MjModel::nbody, &MjModel::set_nbody, reference()) - .property("nbuffer", &MjModel::nbuffer, &MjModel::set_nbuffer, reference()) - .property("nbvh", &MjModel::nbvh, &MjModel::set_nbvh, reference()) - .property("nbvhdynamic", &MjModel::nbvhdynamic, &MjModel::set_nbvhdynamic, reference()) - .property("nbvhstatic", &MjModel::nbvhstatic, &MjModel::set_nbvhstatic, reference()) - .property("ncam", &MjModel::ncam, &MjModel::set_ncam, reference()) - .property("nconmax", &MjModel::nconmax, &MjModel::set_nconmax, reference()) - .property("nemax", &MjModel::nemax, &MjModel::set_nemax, reference()) - .property("neq", &MjModel::neq, &MjModel::set_neq, reference()) - .property("nexclude", &MjModel::nexclude, &MjModel::set_nexclude, reference()) - .property("nflex", &MjModel::nflex, &MjModel::set_nflex, reference()) - .property("nflexedge", &MjModel::nflexedge, &MjModel::set_nflexedge, reference()) - .property("nflexelem", &MjModel::nflexelem, &MjModel::set_nflexelem, reference()) - .property("nflexelemdata", &MjModel::nflexelemdata, &MjModel::set_nflexelemdata, reference()) - .property("nflexelemedge", &MjModel::nflexelemedge, &MjModel::set_nflexelemedge, reference()) - .property("nflexevpair", &MjModel::nflexevpair, &MjModel::set_nflexevpair, reference()) - .property("nflexnode", &MjModel::nflexnode, &MjModel::set_nflexnode, reference()) - .property("nflexshelldata", &MjModel::nflexshelldata, &MjModel::set_nflexshelldata, reference()) - .property("nflextexcoord", &MjModel::nflextexcoord, &MjModel::set_nflextexcoord, reference()) - .property("nflexvert", &MjModel::nflexvert, &MjModel::set_nflexvert, reference()) - .property("ngeom", &MjModel::ngeom, &MjModel::set_ngeom, reference()) - .property("ngravcomp", &MjModel::ngravcomp, &MjModel::set_ngravcomp, reference()) - .property("nhfield", &MjModel::nhfield, &MjModel::set_nhfield, reference()) - .property("nhfielddata", &MjModel::nhfielddata, &MjModel::set_nhfielddata, reference()) - .property("njmax", &MjModel::njmax, &MjModel::set_njmax, reference()) - .property("njnt", &MjModel::njnt, &MjModel::set_njnt, reference()) - .property("nkey", &MjModel::nkey, &MjModel::set_nkey, reference()) - .property("nlight", &MjModel::nlight, &MjModel::set_nlight, reference()) - .property("nmat", &MjModel::nmat, &MjModel::set_nmat, reference()) - .property("nmesh", &MjModel::nmesh, &MjModel::set_nmesh, reference()) - .property("nmeshface", &MjModel::nmeshface, &MjModel::set_nmeshface, reference()) - .property("nmeshgraph", &MjModel::nmeshgraph, &MjModel::set_nmeshgraph, reference()) - .property("nmeshnormal", &MjModel::nmeshnormal, &MjModel::set_nmeshnormal, reference()) - .property("nmeshpoly", &MjModel::nmeshpoly, &MjModel::set_nmeshpoly, reference()) - .property("nmeshpolymap", &MjModel::nmeshpolymap, &MjModel::set_nmeshpolymap, reference()) - .property("nmeshpolyvert", &MjModel::nmeshpolyvert, &MjModel::set_nmeshpolyvert, reference()) - .property("nmeshtexcoord", &MjModel::nmeshtexcoord, &MjModel::set_nmeshtexcoord, reference()) - .property("nmeshvert", &MjModel::nmeshvert, &MjModel::set_nmeshvert, reference()) - .property("nmocap", &MjModel::nmocap, &MjModel::set_nmocap, reference()) - .property("nnames", &MjModel::nnames, &MjModel::set_nnames, reference()) - .property("nnames_map", &MjModel::nnames_map, &MjModel::set_nnames_map, reference()) - .property("nnumeric", &MjModel::nnumeric, &MjModel::set_nnumeric, reference()) - .property("nnumericdata", &MjModel::nnumericdata, &MjModel::set_nnumericdata, reference()) - .property("noct", &MjModel::noct, &MjModel::set_noct, reference()) - .property("npair", &MjModel::npair, &MjModel::set_npair, reference()) - .property("npaths", &MjModel::npaths, &MjModel::set_npaths, reference()) - .property("nplugin", &MjModel::nplugin, &MjModel::set_nplugin, reference()) - .property("npluginattr", &MjModel::npluginattr, &MjModel::set_npluginattr, reference()) - .property("npluginstate", &MjModel::npluginstate, &MjModel::set_npluginstate, reference()) - .property("nq", &MjModel::nq, &MjModel::set_nq, reference()) - .property("nsensor", &MjModel::nsensor, &MjModel::set_nsensor, reference()) - .property("nsensordata", &MjModel::nsensordata, &MjModel::set_nsensordata, reference()) - .property("nsite", &MjModel::nsite, &MjModel::set_nsite, reference()) - .property("nskin", &MjModel::nskin, &MjModel::set_nskin, reference()) - .property("nskinbone", &MjModel::nskinbone, &MjModel::set_nskinbone, reference()) - .property("nskinbonevert", &MjModel::nskinbonevert, &MjModel::set_nskinbonevert, reference()) - .property("nskinface", &MjModel::nskinface, &MjModel::set_nskinface, reference()) - .property("nskintexvert", &MjModel::nskintexvert, &MjModel::set_nskintexvert, reference()) - .property("nskinvert", &MjModel::nskinvert, &MjModel::set_nskinvert, reference()) - .property("ntendon", &MjModel::ntendon, &MjModel::set_ntendon, reference()) - .property("ntex", &MjModel::ntex, &MjModel::set_ntex, reference()) - .property("ntexdata", &MjModel::ntexdata, &MjModel::set_ntexdata, reference()) - .property("ntext", &MjModel::ntext, &MjModel::set_ntext, reference()) - .property("ntextdata", &MjModel::ntextdata, &MjModel::set_ntextdata, reference()) - .property("ntree", &MjModel::ntree, &MjModel::set_ntree, reference()) - .property("ntuple", &MjModel::ntuple, &MjModel::set_ntuple, reference()) - .property("ntupledata", &MjModel::ntupledata, &MjModel::set_ntupledata, reference()) - .property("nu", &MjModel::nu, &MjModel::set_nu, reference()) - .property("numeric_adr", &MjModel::numeric_adr) - .property("numeric_data", &MjModel::numeric_data) - .property("numeric_size", &MjModel::numeric_size) - .property("nuser_actuator", &MjModel::nuser_actuator, &MjModel::set_nuser_actuator, reference()) - .property("nuser_body", &MjModel::nuser_body, &MjModel::set_nuser_body, reference()) - .property("nuser_cam", &MjModel::nuser_cam, &MjModel::set_nuser_cam, reference()) - .property("nuser_geom", &MjModel::nuser_geom, &MjModel::set_nuser_geom, reference()) - .property("nuser_jnt", &MjModel::nuser_jnt, &MjModel::set_nuser_jnt, reference()) - .property("nuser_sensor", &MjModel::nuser_sensor, &MjModel::set_nuser_sensor, reference()) - .property("nuser_site", &MjModel::nuser_site, &MjModel::set_nuser_site, reference()) - .property("nuser_tendon", &MjModel::nuser_tendon, &MjModel::set_nuser_tendon, reference()) - .property("nuserdata", &MjModel::nuserdata, &MjModel::set_nuserdata, reference()) - .property("nv", &MjModel::nv, &MjModel::set_nv, reference()) - .property("nwrap", &MjModel::nwrap, &MjModel::set_nwrap, reference()) - .property("oct_aabb", &MjModel::oct_aabb) - .property("oct_child", &MjModel::oct_child) - .property("oct_coeff", &MjModel::oct_coeff) - .property("oct_depth", &MjModel::oct_depth) - .property("opt", &MjModel::opt, reference()) - .property("pair_dim", &MjModel::pair_dim) - .property("pair_friction", &MjModel::pair_friction) - .property("pair_gap", &MjModel::pair_gap) - .property("pair_geom1", &MjModel::pair_geom1) - .property("pair_geom2", &MjModel::pair_geom2) - .property("pair_margin", &MjModel::pair_margin) - .property("pair_signature", &MjModel::pair_signature) - .property("pair_solimp", &MjModel::pair_solimp) - .property("pair_solref", &MjModel::pair_solref) - .property("pair_solreffriction", &MjModel::pair_solreffriction) - .property("paths", &MjModel::paths) - .property("plugin", &MjModel::plugin) - .property("plugin_attr", &MjModel::plugin_attr) - .property("plugin_attradr", &MjModel::plugin_attradr) - .property("plugin_stateadr", &MjModel::plugin_stateadr) - .property("plugin_statenum", &MjModel::plugin_statenum) - .property("qpos0", &MjModel::qpos0) - .property("qpos_spring", &MjModel::qpos_spring) - .property("sensor_adr", &MjModel::sensor_adr) - .property("sensor_cutoff", &MjModel::sensor_cutoff) - .property("sensor_datatype", &MjModel::sensor_datatype) - .property("sensor_dim", &MjModel::sensor_dim) - .property("sensor_intprm", &MjModel::sensor_intprm) - .property("sensor_needstage", &MjModel::sensor_needstage) - .property("sensor_noise", &MjModel::sensor_noise) - .property("sensor_objid", &MjModel::sensor_objid) - .property("sensor_objtype", &MjModel::sensor_objtype) - .property("sensor_plugin", &MjModel::sensor_plugin) - .property("sensor_refid", &MjModel::sensor_refid) - .property("sensor_reftype", &MjModel::sensor_reftype) - .property("sensor_type", &MjModel::sensor_type) - .property("sensor_user", &MjModel::sensor_user) - .property("signature", &MjModel::signature, &MjModel::set_signature, reference()) - .property("site_bodyid", &MjModel::site_bodyid) - .property("site_group", &MjModel::site_group) - .property("site_matid", &MjModel::site_matid) - .property("site_pos", &MjModel::site_pos) - .property("site_quat", &MjModel::site_quat) - .property("site_rgba", &MjModel::site_rgba) - .property("site_sameframe", &MjModel::site_sameframe) - .property("site_size", &MjModel::site_size) - .property("site_type", &MjModel::site_type) - .property("site_user", &MjModel::site_user) - .property("skin_boneadr", &MjModel::skin_boneadr) - .property("skin_bonebindpos", &MjModel::skin_bonebindpos) - .property("skin_bonebindquat", &MjModel::skin_bonebindquat) - .property("skin_bonebodyid", &MjModel::skin_bonebodyid) - .property("skin_bonenum", &MjModel::skin_bonenum) - .property("skin_bonevertadr", &MjModel::skin_bonevertadr) - .property("skin_bonevertid", &MjModel::skin_bonevertid) - .property("skin_bonevertnum", &MjModel::skin_bonevertnum) - .property("skin_bonevertweight", &MjModel::skin_bonevertweight) - .property("skin_face", &MjModel::skin_face) - .property("skin_faceadr", &MjModel::skin_faceadr) - .property("skin_facenum", &MjModel::skin_facenum) - .property("skin_group", &MjModel::skin_group) - .property("skin_inflate", &MjModel::skin_inflate) - .property("skin_matid", &MjModel::skin_matid) - .property("skin_pathadr", &MjModel::skin_pathadr) - .property("skin_rgba", &MjModel::skin_rgba) - .property("skin_texcoord", &MjModel::skin_texcoord) - .property("skin_texcoordadr", &MjModel::skin_texcoordadr) - .property("skin_vert", &MjModel::skin_vert) - .property("skin_vertadr", &MjModel::skin_vertadr) - .property("skin_vertnum", &MjModel::skin_vertnum) - .property("stat", &MjModel::stat, reference()) - .property("tendon_actfrclimited", &MjModel::tendon_actfrclimited) - .property("tendon_actfrcrange", &MjModel::tendon_actfrcrange) - .property("tendon_adr", &MjModel::tendon_adr) - .property("tendon_armature", &MjModel::tendon_armature) - .property("tendon_damping", &MjModel::tendon_damping) - .property("tendon_frictionloss", &MjModel::tendon_frictionloss) - .property("tendon_group", &MjModel::tendon_group) - .property("tendon_invweight0", &MjModel::tendon_invweight0) - .property("tendon_length0", &MjModel::tendon_length0) - .property("tendon_lengthspring", &MjModel::tendon_lengthspring) - .property("tendon_limited", &MjModel::tendon_limited) - .property("tendon_margin", &MjModel::tendon_margin) - .property("tendon_matid", &MjModel::tendon_matid) - .property("tendon_num", &MjModel::tendon_num) - .property("tendon_range", &MjModel::tendon_range) - .property("tendon_rgba", &MjModel::tendon_rgba) - .property("tendon_solimp_fri", &MjModel::tendon_solimp_fri) - .property("tendon_solimp_lim", &MjModel::tendon_solimp_lim) - .property("tendon_solref_fri", &MjModel::tendon_solref_fri) - .property("tendon_solref_lim", &MjModel::tendon_solref_lim) - .property("tendon_stiffness", &MjModel::tendon_stiffness) - .property("tendon_treeid", &MjModel::tendon_treeid) - .property("tendon_treenum", &MjModel::tendon_treenum) - .property("tendon_user", &MjModel::tendon_user) - .property("tendon_width", &MjModel::tendon_width) - .property("tex_adr", &MjModel::tex_adr) - .property("tex_colorspace", &MjModel::tex_colorspace) - .property("tex_data", &MjModel::tex_data) - .property("tex_height", &MjModel::tex_height) - .property("tex_nchannel", &MjModel::tex_nchannel) - .property("tex_pathadr", &MjModel::tex_pathadr) - .property("tex_type", &MjModel::tex_type) - .property("tex_width", &MjModel::tex_width) - .property("text_adr", &MjModel::text_adr) - .property("text_data", &MjModel::text_data) - .property("text_size", &MjModel::text_size) - .property("tree_bodyadr", &MjModel::tree_bodyadr) - .property("tree_bodynum", &MjModel::tree_bodynum) - .property("tree_dofadr", &MjModel::tree_dofadr) - .property("tree_dofnum", &MjModel::tree_dofnum) - .property("tree_sleep_policy", &MjModel::tree_sleep_policy) - .property("tuple_adr", &MjModel::tuple_adr) - .property("tuple_objid", &MjModel::tuple_objid) - .property("tuple_objprm", &MjModel::tuple_objprm) - .property("tuple_objtype", &MjModel::tuple_objtype) - .property("tuple_size", &MjModel::tuple_size) - .property("vis", &MjModel::vis, reference()) - .property("wrap_objid", &MjModel::wrap_objid) - .property("wrap_prm", &MjModel::wrap_prm) - .property("wrap_type", &MjModel::wrap_type); - emscripten::class_("MjOption") - .constructor<>() - .function("copy", &MjOption::copy, take_ownership()) - .property("ccd_iterations", &MjOption::ccd_iterations, &MjOption::set_ccd_iterations, reference()) - .property("ccd_tolerance", &MjOption::ccd_tolerance, &MjOption::set_ccd_tolerance, reference()) - .property("cone", &MjOption::cone, &MjOption::set_cone, reference()) - .property("density", &MjOption::density, &MjOption::set_density, reference()) - .property("disableactuator", &MjOption::disableactuator, &MjOption::set_disableactuator, reference()) - .property("disableflags", &MjOption::disableflags, &MjOption::set_disableflags, reference()) - .property("enableflags", &MjOption::enableflags, &MjOption::set_enableflags, reference()) - .property("gravity", &MjOption::gravity) - .property("impratio", &MjOption::impratio, &MjOption::set_impratio, reference()) - .property("integrator", &MjOption::integrator, &MjOption::set_integrator, reference()) - .property("iterations", &MjOption::iterations, &MjOption::set_iterations, reference()) - .property("jacobian", &MjOption::jacobian, &MjOption::set_jacobian, reference()) - .property("ls_iterations", &MjOption::ls_iterations, &MjOption::set_ls_iterations, reference()) - .property("ls_tolerance", &MjOption::ls_tolerance, &MjOption::set_ls_tolerance, reference()) - .property("magnetic", &MjOption::magnetic) - .property("noslip_iterations", &MjOption::noslip_iterations, &MjOption::set_noslip_iterations, reference()) - .property("noslip_tolerance", &MjOption::noslip_tolerance, &MjOption::set_noslip_tolerance, reference()) - .property("o_friction", &MjOption::o_friction) - .property("o_margin", &MjOption::o_margin, &MjOption::set_o_margin, reference()) - .property("o_solimp", &MjOption::o_solimp) - .property("o_solref", &MjOption::o_solref) - .property("sdf_initpoints", &MjOption::sdf_initpoints, &MjOption::set_sdf_initpoints, reference()) - .property("sdf_iterations", &MjOption::sdf_iterations, &MjOption::set_sdf_iterations, reference()) - .property("sleep_tolerance", &MjOption::sleep_tolerance, &MjOption::set_sleep_tolerance, reference()) - .property("solver", &MjOption::solver, &MjOption::set_solver, reference()) - .property("timestep", &MjOption::timestep, &MjOption::set_timestep, reference()) - .property("tolerance", &MjOption::tolerance, &MjOption::set_tolerance, reference()) - .property("viscosity", &MjOption::viscosity, &MjOption::set_viscosity, reference()) - .property("wind", &MjOption::wind); - emscripten::class_("MjSolverStat") - .constructor<>() - .function("copy", &MjSolverStat::copy, take_ownership()) - .property("gradient", &MjSolverStat::gradient, &MjSolverStat::set_gradient, reference()) - .property("improvement", &MjSolverStat::improvement, &MjSolverStat::set_improvement, reference()) - .property("lineslope", &MjSolverStat::lineslope, &MjSolverStat::set_lineslope, reference()) - .property("nactive", &MjSolverStat::nactive, &MjSolverStat::set_nactive, reference()) - .property("nchange", &MjSolverStat::nchange, &MjSolverStat::set_nchange, reference()) - .property("neval", &MjSolverStat::neval, &MjSolverStat::set_neval, reference()) - .property("nupdate", &MjSolverStat::nupdate, &MjSolverStat::set_nupdate, reference()); - emscripten::class_("MjSpec") - .constructor() - .property("comment", &MjSpec::comment, &MjSpec::set_comment, reference()) - .property("compiler", &MjSpec::compiler, reference()) - .property("element", &MjSpec::element, reference()) - .property("hasImplicitPluginElem", &MjSpec::hasImplicitPluginElem, &MjSpec::set_hasImplicitPluginElem, reference()) - .property("memory", &MjSpec::memory, &MjSpec::set_memory, reference()) - .property("modelfiledir", &MjSpec::modelfiledir, &MjSpec::set_modelfiledir, reference()) - .property("modelname", &MjSpec::modelname, &MjSpec::set_modelname, reference()) - .property("nconmax", &MjSpec::nconmax, &MjSpec::set_nconmax, reference()) - .property("nemax", &MjSpec::nemax, &MjSpec::set_nemax, reference()) - .property("njmax", &MjSpec::njmax, &MjSpec::set_njmax, reference()) - .property("nkey", &MjSpec::nkey, &MjSpec::set_nkey, reference()) - .property("nstack", &MjSpec::nstack, &MjSpec::set_nstack, reference()) - .property("nuser_actuator", &MjSpec::nuser_actuator, &MjSpec::set_nuser_actuator, reference()) - .property("nuser_body", &MjSpec::nuser_body, &MjSpec::set_nuser_body, reference()) - .property("nuser_cam", &MjSpec::nuser_cam, &MjSpec::set_nuser_cam, reference()) - .property("nuser_geom", &MjSpec::nuser_geom, &MjSpec::set_nuser_geom, reference()) - .property("nuser_jnt", &MjSpec::nuser_jnt, &MjSpec::set_nuser_jnt, reference()) - .property("nuser_sensor", &MjSpec::nuser_sensor, &MjSpec::set_nuser_sensor, reference()) - .property("nuser_site", &MjSpec::nuser_site, &MjSpec::set_nuser_site, reference()) - .property("nuser_tendon", &MjSpec::nuser_tendon, &MjSpec::set_nuser_tendon, reference()) - .property("nuserdata", &MjSpec::nuserdata, &MjSpec::set_nuserdata, reference()) - .property("option", &MjSpec::option, reference()) - .property("stat", &MjSpec::stat, reference()) - .property("strippath", &MjSpec::strippath, &MjSpec::set_strippath, reference()) - .property("visual", &MjSpec::visual, reference()); - emscripten::class_("MjStatistic") - .constructor<>() - .function("copy", &MjStatistic::copy, take_ownership()) - .property("center", &MjStatistic::center) - .property("extent", &MjStatistic::extent, &MjStatistic::set_extent, reference()) - .property("meaninertia", &MjStatistic::meaninertia, &MjStatistic::set_meaninertia, reference()) - .property("meanmass", &MjStatistic::meanmass, &MjStatistic::set_meanmass, reference()) - .property("meansize", &MjStatistic::meansize, &MjStatistic::set_meansize, reference()); - emscripten::class_("MjTimerStat") - .constructor<>() - .function("copy", &MjTimerStat::copy, take_ownership()) - .property("duration", &MjTimerStat::duration, &MjTimerStat::set_duration, reference()) - .property("number", &MjTimerStat::number, &MjTimerStat::set_number, reference()); - emscripten::class_("MjVisual") - .constructor<>() - .function("copy", &MjVisual::copy, take_ownership()) - .property("global", &MjVisual::global, reference()) - .property("headlight", &MjVisual::headlight, reference()) - .property("map", &MjVisual::map, reference()) - .property("quality", &MjVisual::quality, reference()) - .property("rgba", &MjVisual::rgba, reference()) - .property("scale", &MjVisual::scale, reference()); - emscripten::class_("MjVisualGlobal") - .constructor<>() - .function("copy", &MjVisualGlobal::copy, take_ownership()) - .property("azimuth", &MjVisualGlobal::azimuth, &MjVisualGlobal::set_azimuth, reference()) - .property("bvactive", &MjVisualGlobal::bvactive, &MjVisualGlobal::set_bvactive, reference()) - .property("cameraid", &MjVisualGlobal::cameraid, &MjVisualGlobal::set_cameraid, reference()) - .property("elevation", &MjVisualGlobal::elevation, &MjVisualGlobal::set_elevation, reference()) - .property("ellipsoidinertia", &MjVisualGlobal::ellipsoidinertia, &MjVisualGlobal::set_ellipsoidinertia, reference()) - .property("fovy", &MjVisualGlobal::fovy, &MjVisualGlobal::set_fovy, reference()) - .property("glow", &MjVisualGlobal::glow, &MjVisualGlobal::set_glow, reference()) - .property("ipd", &MjVisualGlobal::ipd, &MjVisualGlobal::set_ipd, reference()) - .property("linewidth", &MjVisualGlobal::linewidth, &MjVisualGlobal::set_linewidth, reference()) - .property("offheight", &MjVisualGlobal::offheight, &MjVisualGlobal::set_offheight, reference()) - .property("offwidth", &MjVisualGlobal::offwidth, &MjVisualGlobal::set_offwidth, reference()) - .property("orthographic", &MjVisualGlobal::orthographic, &MjVisualGlobal::set_orthographic, reference()) - .property("realtime", &MjVisualGlobal::realtime, &MjVisualGlobal::set_realtime, reference()); - emscripten::class_("MjVisualHeadlight") - .constructor<>() - .function("copy", &MjVisualHeadlight::copy, take_ownership()) - .property("active", &MjVisualHeadlight::active, &MjVisualHeadlight::set_active, reference()) - .property("ambient", &MjVisualHeadlight::ambient) - .property("diffuse", &MjVisualHeadlight::diffuse) - .property("specular", &MjVisualHeadlight::specular); - emscripten::class_("MjVisualMap") - .constructor<>() - .function("copy", &MjVisualMap::copy, take_ownership()) - .property("actuatortendon", &MjVisualMap::actuatortendon, &MjVisualMap::set_actuatortendon, reference()) - .property("alpha", &MjVisualMap::alpha, &MjVisualMap::set_alpha, reference()) - .property("fogend", &MjVisualMap::fogend, &MjVisualMap::set_fogend, reference()) - .property("fogstart", &MjVisualMap::fogstart, &MjVisualMap::set_fogstart, reference()) - .property("force", &MjVisualMap::force, &MjVisualMap::set_force, reference()) - .property("haze", &MjVisualMap::haze, &MjVisualMap::set_haze, reference()) - .property("shadowclip", &MjVisualMap::shadowclip, &MjVisualMap::set_shadowclip, reference()) - .property("shadowscale", &MjVisualMap::shadowscale, &MjVisualMap::set_shadowscale, reference()) - .property("stiffness", &MjVisualMap::stiffness, &MjVisualMap::set_stiffness, reference()) - .property("stiffnessrot", &MjVisualMap::stiffnessrot, &MjVisualMap::set_stiffnessrot, reference()) - .property("torque", &MjVisualMap::torque, &MjVisualMap::set_torque, reference()) - .property("zfar", &MjVisualMap::zfar, &MjVisualMap::set_zfar, reference()) - .property("znear", &MjVisualMap::znear, &MjVisualMap::set_znear, reference()); - emscripten::class_("MjVisualQuality") - .constructor<>() - .function("copy", &MjVisualQuality::copy, take_ownership()) - .property("numquads", &MjVisualQuality::numquads, &MjVisualQuality::set_numquads, reference()) - .property("numslices", &MjVisualQuality::numslices, &MjVisualQuality::set_numslices, reference()) - .property("numstacks", &MjVisualQuality::numstacks, &MjVisualQuality::set_numstacks, reference()) - .property("offsamples", &MjVisualQuality::offsamples, &MjVisualQuality::set_offsamples, reference()) - .property("shadowsize", &MjVisualQuality::shadowsize, &MjVisualQuality::set_shadowsize, reference()); - emscripten::class_("MjVisualRgba") - .constructor<>() - .function("copy", &MjVisualRgba::copy, take_ownership()) - .property("actuator", &MjVisualRgba::actuator) - .property("actuatornegative", &MjVisualRgba::actuatornegative) - .property("actuatorpositive", &MjVisualRgba::actuatorpositive) - .property("bv", &MjVisualRgba::bv) - .property("bvactive", &MjVisualRgba::bvactive) - .property("camera", &MjVisualRgba::camera) - .property("com", &MjVisualRgba::com) - .property("connect", &MjVisualRgba::connect) - .property("constraint", &MjVisualRgba::constraint) - .property("contactforce", &MjVisualRgba::contactforce) - .property("contactfriction", &MjVisualRgba::contactfriction) - .property("contactgap", &MjVisualRgba::contactgap) - .property("contactpoint", &MjVisualRgba::contactpoint) - .property("contacttorque", &MjVisualRgba::contacttorque) - .property("crankbroken", &MjVisualRgba::crankbroken) - .property("fog", &MjVisualRgba::fog) - .property("force", &MjVisualRgba::force) - .property("frustum", &MjVisualRgba::frustum) - .property("haze", &MjVisualRgba::haze) - .property("inertia", &MjVisualRgba::inertia) - .property("joint", &MjVisualRgba::joint) - .property("light", &MjVisualRgba::light) - .property("rangefinder", &MjVisualRgba::rangefinder) - .property("selectpoint", &MjVisualRgba::selectpoint) - .property("slidercrank", &MjVisualRgba::slidercrank); - emscripten::class_("MjVisualScale") - .constructor<>() - .function("copy", &MjVisualScale::copy, take_ownership()) - .property("actuatorlength", &MjVisualScale::actuatorlength, &MjVisualScale::set_actuatorlength, reference()) - .property("actuatorwidth", &MjVisualScale::actuatorwidth, &MjVisualScale::set_actuatorwidth, reference()) - .property("camera", &MjVisualScale::camera, &MjVisualScale::set_camera, reference()) - .property("com", &MjVisualScale::com, &MjVisualScale::set_com, reference()) - .property("connect", &MjVisualScale::connect, &MjVisualScale::set_connect, reference()) - .property("constraint", &MjVisualScale::constraint, &MjVisualScale::set_constraint, reference()) - .property("contactheight", &MjVisualScale::contactheight, &MjVisualScale::set_contactheight, reference()) - .property("contactwidth", &MjVisualScale::contactwidth, &MjVisualScale::set_contactwidth, reference()) - .property("forcewidth", &MjVisualScale::forcewidth, &MjVisualScale::set_forcewidth, reference()) - .property("framelength", &MjVisualScale::framelength, &MjVisualScale::set_framelength, reference()) - .property("framewidth", &MjVisualScale::framewidth, &MjVisualScale::set_framewidth, reference()) - .property("frustum", &MjVisualScale::frustum, &MjVisualScale::set_frustum, reference()) - .property("jointlength", &MjVisualScale::jointlength, &MjVisualScale::set_jointlength, reference()) - .property("jointwidth", &MjVisualScale::jointwidth, &MjVisualScale::set_jointwidth, reference()) - .property("light", &MjVisualScale::light, &MjVisualScale::set_light, reference()) - .property("selectpoint", &MjVisualScale::selectpoint, &MjVisualScale::set_selectpoint, reference()) - .property("slidercrank", &MjVisualScale::slidercrank, &MjVisualScale::set_slidercrank, reference()); - emscripten::class_("MjWarningStat") - .constructor<>() - .function("copy", &MjWarningStat::copy, take_ownership()) - .property("lastinfo", &MjWarningStat::lastinfo, &MjWarningStat::set_lastinfo, reference()) - .property("number", &MjWarningStat::number, &MjWarningStat::set_number, reference()); - emscripten::class_("MjsActuator") - .property("actdim", &MjsActuator::actdim, &MjsActuator::set_actdim, reference()) - .property("actearly", &MjsActuator::actearly, &MjsActuator::set_actearly, reference()) - .property("actlimited", &MjsActuator::actlimited, &MjsActuator::set_actlimited, reference()) - .property("actrange", &MjsActuator::actrange) - .property("biasprm", &MjsActuator::biasprm) - .property("biastype", &MjsActuator::biastype, &MjsActuator::set_biastype, reference()) - .property("cranklength", &MjsActuator::cranklength, &MjsActuator::set_cranklength, reference()) - .property("ctrllimited", &MjsActuator::ctrllimited, &MjsActuator::set_ctrllimited, reference()) - .property("ctrlrange", &MjsActuator::ctrlrange) - .property("dynprm", &MjsActuator::dynprm) - .property("dyntype", &MjsActuator::dyntype, &MjsActuator::set_dyntype, reference()) - .property("element", &MjsActuator::element, reference()) - .property("forcelimited", &MjsActuator::forcelimited, &MjsActuator::set_forcelimited, reference()) - .property("forcerange", &MjsActuator::forcerange) - .property("gainprm", &MjsActuator::gainprm) - .property("gaintype", &MjsActuator::gaintype, &MjsActuator::set_gaintype, reference()) - .property("gear", &MjsActuator::gear) - .property("group", &MjsActuator::group, &MjsActuator::set_group, reference()) - .property("info", &MjsActuator::info, &MjsActuator::set_info, reference()) - .property("inheritrange", &MjsActuator::inheritrange, &MjsActuator::set_inheritrange, reference()) - .property("lengthrange", &MjsActuator::lengthrange) - .property("plugin", &MjsActuator::plugin, reference()) - .property("refsite", &MjsActuator::refsite, &MjsActuator::set_refsite, reference()) - .property("slidersite", &MjsActuator::slidersite, &MjsActuator::set_slidersite, reference()) - .property("target", &MjsActuator::target, &MjsActuator::set_target, reference()) - .property("trntype", &MjsActuator::trntype, &MjsActuator::set_trntype, reference()) - .property("userdata", &MjsActuator::userdata, reference()); - emscripten::class_("MjsBody") - .property("alt", &MjsBody::alt, reference()) - .property("childclass", &MjsBody::childclass, &MjsBody::set_childclass, reference()) - .property("element", &MjsBody::element, reference()) - .property("explicitinertial", &MjsBody::explicitinertial, &MjsBody::set_explicitinertial, reference()) - .property("fullinertia", &MjsBody::fullinertia) - .property("gravcomp", &MjsBody::gravcomp, &MjsBody::set_gravcomp, reference()) - .property("ialt", &MjsBody::ialt, reference()) - .property("inertia", &MjsBody::inertia) - .property("info", &MjsBody::info, &MjsBody::set_info, reference()) - .property("ipos", &MjsBody::ipos) - .property("iquat", &MjsBody::iquat) - .property("mass", &MjsBody::mass, &MjsBody::set_mass, reference()) - .property("mocap", &MjsBody::mocap, &MjsBody::set_mocap, reference()) - .property("plugin", &MjsBody::plugin, reference()) - .property("pos", &MjsBody::pos) - .property("quat", &MjsBody::quat) - .property("sleep", &MjsBody::sleep, &MjsBody::set_sleep, reference()) - .property("userdata", &MjsBody::userdata, reference()); - emscripten::class_("MjsCamera") - .property("alt", &MjsCamera::alt, reference()) - .property("element", &MjsCamera::element, reference()) - .property("focal_length", &MjsCamera::focal_length) - .property("focal_pixel", &MjsCamera::focal_pixel) - .property("fovy", &MjsCamera::fovy, &MjsCamera::set_fovy, reference()) - .property("info", &MjsCamera::info, &MjsCamera::set_info, reference()) - .property("intrinsic", &MjsCamera::intrinsic) - .property("ipd", &MjsCamera::ipd, &MjsCamera::set_ipd, reference()) - .property("mode", &MjsCamera::mode, &MjsCamera::set_mode, reference()) - .property("orthographic", &MjsCamera::orthographic, &MjsCamera::set_orthographic, reference()) - .property("pos", &MjsCamera::pos) - .property("principal_length", &MjsCamera::principal_length) - .property("principal_pixel", &MjsCamera::principal_pixel) - .property("quat", &MjsCamera::quat) - .property("resolution", &MjsCamera::resolution) - .property("sensor_size", &MjsCamera::sensor_size) - .property("targetbody", &MjsCamera::targetbody, &MjsCamera::set_targetbody, reference()) - .property("userdata", &MjsCamera::userdata, reference()); - emscripten::class_("MjsCompiler") - .property("LRopt", &MjsCompiler::LRopt, reference()) - .property("alignfree", &MjsCompiler::alignfree, &MjsCompiler::set_alignfree, reference()) - .property("autolimits", &MjsCompiler::autolimits, &MjsCompiler::set_autolimits, reference()) - .property("balanceinertia", &MjsCompiler::balanceinertia, &MjsCompiler::set_balanceinertia, reference()) - .property("boundinertia", &MjsCompiler::boundinertia, &MjsCompiler::set_boundinertia, reference()) - .property("boundmass", &MjsCompiler::boundmass, &MjsCompiler::set_boundmass, reference()) - .property("degree", &MjsCompiler::degree, &MjsCompiler::set_degree, reference()) - .property("discardvisual", &MjsCompiler::discardvisual, &MjsCompiler::set_discardvisual, reference()) - .property("eulerseq", &MjsCompiler::eulerseq) - .property("fitaabb", &MjsCompiler::fitaabb, &MjsCompiler::set_fitaabb, reference()) - .property("fusestatic", &MjsCompiler::fusestatic, &MjsCompiler::set_fusestatic, reference()) - .property("inertiafromgeom", &MjsCompiler::inertiafromgeom, &MjsCompiler::set_inertiafromgeom, reference()) - .property("inertiagrouprange", &MjsCompiler::inertiagrouprange) - .property("meshdir", &MjsCompiler::meshdir, &MjsCompiler::set_meshdir, reference()) - .property("saveinertial", &MjsCompiler::saveinertial, &MjsCompiler::set_saveinertial, reference()) - .property("settotalmass", &MjsCompiler::settotalmass, &MjsCompiler::set_settotalmass, reference()) - .property("texturedir", &MjsCompiler::texturedir, &MjsCompiler::set_texturedir, reference()) - .property("usethread", &MjsCompiler::usethread, &MjsCompiler::set_usethread, reference()); - emscripten::class_("MjsDefault") - .property("actuator", &MjsDefault::actuator, reference()) - .property("camera", &MjsDefault::camera, reference()) - .property("element", &MjsDefault::element, reference()) - .property("equality", &MjsDefault::equality, reference()) - .property("flex", &MjsDefault::flex, reference()) - .property("geom", &MjsDefault::geom, reference()) - .property("joint", &MjsDefault::joint, reference()) - .property("light", &MjsDefault::light, reference()) - .property("material", &MjsDefault::material, reference()) - .property("mesh", &MjsDefault::mesh, reference()) - .property("pair", &MjsDefault::pair, reference()) - .property("site", &MjsDefault::site, reference()) - .property("tendon", &MjsDefault::tendon, reference()); - emscripten::class_("MjsElement") - .property("elemtype", &MjsElement::elemtype, &MjsElement::set_elemtype, reference()) - .property("signature", &MjsElement::signature, &MjsElement::set_signature, reference()); - emscripten::class_("MjsEquality") - .property("active", &MjsEquality::active, &MjsEquality::set_active, reference()) - .property("data", &MjsEquality::data) - .property("element", &MjsEquality::element, reference()) - .property("info", &MjsEquality::info, &MjsEquality::set_info, reference()) - .property("name1", &MjsEquality::name1, &MjsEquality::set_name1, reference()) - .property("name2", &MjsEquality::name2, &MjsEquality::set_name2, reference()) - .property("objtype", &MjsEquality::objtype, &MjsEquality::set_objtype, reference()) - .property("solimp", &MjsEquality::solimp) - .property("solref", &MjsEquality::solref) - .property("type", &MjsEquality::type, &MjsEquality::set_type, reference()); - emscripten::class_("MjsExclude") - .property("bodyname1", &MjsExclude::bodyname1, &MjsExclude::set_bodyname1, reference()) - .property("bodyname2", &MjsExclude::bodyname2, &MjsExclude::set_bodyname2, reference()) - .property("element", &MjsExclude::element, reference()) - .property("info", &MjsExclude::info, &MjsExclude::set_info, reference()); - emscripten::class_("MjsFlex") - .property("activelayers", &MjsFlex::activelayers, &MjsFlex::set_activelayers, reference()) - .property("conaffinity", &MjsFlex::conaffinity, &MjsFlex::set_conaffinity, reference()) - .property("condim", &MjsFlex::condim, &MjsFlex::set_condim, reference()) - .property("contype", &MjsFlex::contype, &MjsFlex::set_contype, reference()) - .property("damping", &MjsFlex::damping, &MjsFlex::set_damping, reference()) - .property("dim", &MjsFlex::dim, &MjsFlex::set_dim, reference()) - .property("edgedamping", &MjsFlex::edgedamping, &MjsFlex::set_edgedamping, reference()) - .property("edgestiffness", &MjsFlex::edgestiffness, &MjsFlex::set_edgestiffness, reference()) - .property("elastic2d", &MjsFlex::elastic2d, &MjsFlex::set_elastic2d, reference()) - .property("elem", &MjsFlex::elem, reference()) - .property("element", &MjsFlex::element, reference()) - .property("elemtexcoord", &MjsFlex::elemtexcoord, reference()) - .property("flatskin", &MjsFlex::flatskin, &MjsFlex::set_flatskin, reference()) - .property("friction", &MjsFlex::friction) - .property("gap", &MjsFlex::gap, &MjsFlex::set_gap, reference()) - .property("group", &MjsFlex::group, &MjsFlex::set_group, reference()) - .property("info", &MjsFlex::info, &MjsFlex::set_info, reference()) - .property("internal", &MjsFlex::internal, &MjsFlex::set_internal, reference()) - .property("margin", &MjsFlex::margin, &MjsFlex::set_margin, reference()) - .property("material", &MjsFlex::material, &MjsFlex::set_material, reference()) - .property("node", &MjsFlex::node, reference()) - .property("nodebody", &MjsFlex::nodebody, reference()) - .property("passive", &MjsFlex::passive, &MjsFlex::set_passive, reference()) - .property("poisson", &MjsFlex::poisson, &MjsFlex::set_poisson, reference()) - .property("priority", &MjsFlex::priority, &MjsFlex::set_priority, reference()) - .property("radius", &MjsFlex::radius, &MjsFlex::set_radius, reference()) - .property("rgba", &MjsFlex::rgba) - .property("selfcollide", &MjsFlex::selfcollide, &MjsFlex::set_selfcollide, reference()) - .property("solimp", &MjsFlex::solimp) - .property("solmix", &MjsFlex::solmix, &MjsFlex::set_solmix, reference()) - .property("solref", &MjsFlex::solref) - .property("texcoord", &MjsFlex::texcoord, reference()) - .property("thickness", &MjsFlex::thickness, &MjsFlex::set_thickness, reference()) - .property("vert", &MjsFlex::vert, reference()) - .property("vertbody", &MjsFlex::vertbody, reference()) - .property("vertcollide", &MjsFlex::vertcollide, &MjsFlex::set_vertcollide, reference()) - .property("young", &MjsFlex::young, &MjsFlex::set_young, reference()); - emscripten::class_("MjsFrame") - .property("alt", &MjsFrame::alt, reference()) - .property("childclass", &MjsFrame::childclass, &MjsFrame::set_childclass, reference()) - .property("element", &MjsFrame::element, reference()) - .property("info", &MjsFrame::info, &MjsFrame::set_info, reference()) - .property("pos", &MjsFrame::pos) - .property("quat", &MjsFrame::quat); - emscripten::class_("MjsGeom") - .property("alt", &MjsGeom::alt, reference()) - .property("conaffinity", &MjsGeom::conaffinity, &MjsGeom::set_conaffinity, reference()) - .property("condim", &MjsGeom::condim, &MjsGeom::set_condim, reference()) - .property("contype", &MjsGeom::contype, &MjsGeom::set_contype, reference()) - .property("density", &MjsGeom::density, &MjsGeom::set_density, reference()) - .property("element", &MjsGeom::element, reference()) - .property("fitscale", &MjsGeom::fitscale, &MjsGeom::set_fitscale, reference()) - .property("fluid_coefs", &MjsGeom::fluid_coefs) - .property("fluid_ellipsoid", &MjsGeom::fluid_ellipsoid, &MjsGeom::set_fluid_ellipsoid, reference()) - .property("friction", &MjsGeom::friction) - .property("fromto", &MjsGeom::fromto) - .property("gap", &MjsGeom::gap, &MjsGeom::set_gap, reference()) - .property("group", &MjsGeom::group, &MjsGeom::set_group, reference()) - .property("hfieldname", &MjsGeom::hfieldname, &MjsGeom::set_hfieldname, reference()) - .property("info", &MjsGeom::info, &MjsGeom::set_info, reference()) - .property("margin", &MjsGeom::margin, &MjsGeom::set_margin, reference()) - .property("mass", &MjsGeom::mass, &MjsGeom::set_mass, reference()) - .property("material", &MjsGeom::material, &MjsGeom::set_material, reference()) - .property("meshname", &MjsGeom::meshname, &MjsGeom::set_meshname, reference()) - .property("plugin", &MjsGeom::plugin, reference()) - .property("pos", &MjsGeom::pos) - .property("priority", &MjsGeom::priority, &MjsGeom::set_priority, reference()) - .property("quat", &MjsGeom::quat) - .property("rgba", &MjsGeom::rgba) - .property("size", &MjsGeom::size) - .property("solimp", &MjsGeom::solimp) - .property("solmix", &MjsGeom::solmix, &MjsGeom::set_solmix, reference()) - .property("solref", &MjsGeom::solref) - .property("type", &MjsGeom::type, &MjsGeom::set_type, reference()) - .property("typeinertia", &MjsGeom::typeinertia, &MjsGeom::set_typeinertia, reference()) - .property("userdata", &MjsGeom::userdata, reference()); - emscripten::class_("MjsHField") - .property("content_type", &MjsHField::content_type, &MjsHField::set_content_type, reference()) - .property("element", &MjsHField::element, reference()) - .property("file", &MjsHField::file, &MjsHField::set_file, reference()) - .property("info", &MjsHField::info, &MjsHField::set_info, reference()) - .property("ncol", &MjsHField::ncol, &MjsHField::set_ncol, reference()) - .property("nrow", &MjsHField::nrow, &MjsHField::set_nrow, reference()) - .property("size", &MjsHField::size) - .property("userdata", &MjsHField::userdata, reference()); - emscripten::class_("MjsJoint") - .property("actfrclimited", &MjsJoint::actfrclimited, &MjsJoint::set_actfrclimited, reference()) - .property("actfrcrange", &MjsJoint::actfrcrange) - .property("actgravcomp", &MjsJoint::actgravcomp, &MjsJoint::set_actgravcomp, reference()) - .property("align", &MjsJoint::align, &MjsJoint::set_align, reference()) - .property("armature", &MjsJoint::armature, &MjsJoint::set_armature, reference()) - .property("axis", &MjsJoint::axis) - .property("damping", &MjsJoint::damping, &MjsJoint::set_damping, reference()) - .property("element", &MjsJoint::element, reference()) - .property("frictionloss", &MjsJoint::frictionloss, &MjsJoint::set_frictionloss, reference()) - .property("group", &MjsJoint::group, &MjsJoint::set_group, reference()) - .property("info", &MjsJoint::info, &MjsJoint::set_info, reference()) - .property("limited", &MjsJoint::limited, &MjsJoint::set_limited, reference()) - .property("margin", &MjsJoint::margin, &MjsJoint::set_margin, reference()) - .property("pos", &MjsJoint::pos) - .property("range", &MjsJoint::range) - .property("ref", &MjsJoint::ref, &MjsJoint::set_ref, reference()) - .property("solimp_friction", &MjsJoint::solimp_friction) - .property("solimp_limit", &MjsJoint::solimp_limit) - .property("solref_friction", &MjsJoint::solref_friction) - .property("solref_limit", &MjsJoint::solref_limit) - .property("springdamper", &MjsJoint::springdamper) - .property("springref", &MjsJoint::springref, &MjsJoint::set_springref, reference()) - .property("stiffness", &MjsJoint::stiffness, &MjsJoint::set_stiffness, reference()) - .property("type", &MjsJoint::type, &MjsJoint::set_type, reference()) - .property("userdata", &MjsJoint::userdata, reference()); - emscripten::class_("MjsKey") - .property("act", &MjsKey::act, reference()) - .property("ctrl", &MjsKey::ctrl, reference()) - .property("element", &MjsKey::element, reference()) - .property("info", &MjsKey::info, &MjsKey::set_info, reference()) - .property("mpos", &MjsKey::mpos, reference()) - .property("mquat", &MjsKey::mquat, reference()) - .property("qpos", &MjsKey::qpos, reference()) - .property("qvel", &MjsKey::qvel, reference()) - .property("time", &MjsKey::time, &MjsKey::set_time, reference()); - emscripten::class_("MjsLight") - .property("active", &MjsLight::active, &MjsLight::set_active, reference()) - .property("ambient", &MjsLight::ambient) - .property("attenuation", &MjsLight::attenuation) - .property("bulbradius", &MjsLight::bulbradius, &MjsLight::set_bulbradius, reference()) - .property("castshadow", &MjsLight::castshadow, &MjsLight::set_castshadow, reference()) - .property("cutoff", &MjsLight::cutoff, &MjsLight::set_cutoff, reference()) - .property("diffuse", &MjsLight::diffuse) - .property("dir", &MjsLight::dir) - .property("element", &MjsLight::element, reference()) - .property("exponent", &MjsLight::exponent, &MjsLight::set_exponent, reference()) - .property("info", &MjsLight::info, &MjsLight::set_info, reference()) - .property("intensity", &MjsLight::intensity, &MjsLight::set_intensity, reference()) - .property("mode", &MjsLight::mode, &MjsLight::set_mode, reference()) - .property("pos", &MjsLight::pos) - .property("range", &MjsLight::range, &MjsLight::set_range, reference()) - .property("specular", &MjsLight::specular) - .property("targetbody", &MjsLight::targetbody, &MjsLight::set_targetbody, reference()) - .property("texture", &MjsLight::texture, &MjsLight::set_texture, reference()) - .property("type", &MjsLight::type, &MjsLight::set_type, reference()); - emscripten::class_("MjsMaterial") - .property("element", &MjsMaterial::element, reference()) - .property("emission", &MjsMaterial::emission, &MjsMaterial::set_emission, reference()) - .property("info", &MjsMaterial::info, &MjsMaterial::set_info, reference()) - .property("metallic", &MjsMaterial::metallic, &MjsMaterial::set_metallic, reference()) - .property("reflectance", &MjsMaterial::reflectance, &MjsMaterial::set_reflectance, reference()) - .property("rgba", &MjsMaterial::rgba) - .property("roughness", &MjsMaterial::roughness, &MjsMaterial::set_roughness, reference()) - .property("shininess", &MjsMaterial::shininess, &MjsMaterial::set_shininess, reference()) - .property("specular", &MjsMaterial::specular, &MjsMaterial::set_specular, reference()) - .property("texrepeat", &MjsMaterial::texrepeat) - .property("textures", &MjsMaterial::textures, reference()) - .property("texuniform", &MjsMaterial::texuniform, &MjsMaterial::set_texuniform, reference()); - emscripten::class_("MjsMesh") - .property("content_type", &MjsMesh::content_type, &MjsMesh::set_content_type, reference()) - .property("element", &MjsMesh::element, reference()) - .property("file", &MjsMesh::file, &MjsMesh::set_file, reference()) - .property("inertia", &MjsMesh::inertia, &MjsMesh::set_inertia, reference()) - .property("info", &MjsMesh::info, &MjsMesh::set_info, reference()) - .property("material", &MjsMesh::material, &MjsMesh::set_material, reference()) - .property("maxhullvert", &MjsMesh::maxhullvert, &MjsMesh::set_maxhullvert, reference()) - .property("needsdf", &MjsMesh::needsdf, &MjsMesh::set_needsdf, reference()) - .property("plugin", &MjsMesh::plugin, reference()) - .property("refpos", &MjsMesh::refpos) - .property("refquat", &MjsMesh::refquat) - .property("scale", &MjsMesh::scale) - .property("smoothnormal", &MjsMesh::smoothnormal, &MjsMesh::set_smoothnormal, reference()) - .property("userface", &MjsMesh::userface, reference()) - .property("userfacenormal", &MjsMesh::userfacenormal, reference()) - .property("userfacetexcoord", &MjsMesh::userfacetexcoord, reference()) - .property("usernormal", &MjsMesh::usernormal, reference()) - .property("usertexcoord", &MjsMesh::usertexcoord, reference()) - .property("uservert", &MjsMesh::uservert, reference()); - emscripten::class_("MjsNumeric") - .property("data", &MjsNumeric::data, reference()) - .property("element", &MjsNumeric::element, reference()) - .property("info", &MjsNumeric::info, &MjsNumeric::set_info, reference()) - .property("size", &MjsNumeric::size, &MjsNumeric::set_size, reference()); - emscripten::class_("MjsOrientation") - .property("axisangle", &MjsOrientation::axisangle) - .property("euler", &MjsOrientation::euler) - .property("type", &MjsOrientation::type, &MjsOrientation::set_type, reference()) - .property("xyaxes", &MjsOrientation::xyaxes) - .property("zaxis", &MjsOrientation::zaxis); - emscripten::class_("MjsPair") - .property("condim", &MjsPair::condim, &MjsPair::set_condim, reference()) - .property("element", &MjsPair::element, reference()) - .property("friction", &MjsPair::friction) - .property("gap", &MjsPair::gap, &MjsPair::set_gap, reference()) - .property("geomname1", &MjsPair::geomname1, &MjsPair::set_geomname1, reference()) - .property("geomname2", &MjsPair::geomname2, &MjsPair::set_geomname2, reference()) - .property("info", &MjsPair::info, &MjsPair::set_info, reference()) - .property("margin", &MjsPair::margin, &MjsPair::set_margin, reference()) - .property("solimp", &MjsPair::solimp) - .property("solref", &MjsPair::solref) - .property("solreffriction", &MjsPair::solreffriction); - emscripten::class_("MjsPlugin") - .property("active", &MjsPlugin::active, &MjsPlugin::set_active, reference()) - .property("element", &MjsPlugin::element, reference()) - .property("info", &MjsPlugin::info, &MjsPlugin::set_info, reference()) - .property("name", &MjsPlugin::name, &MjsPlugin::set_name, reference()) - .property("plugin_name", &MjsPlugin::plugin_name, &MjsPlugin::set_plugin_name, reference()); - emscripten::class_("MjsSensor") - .property("cutoff", &MjsSensor::cutoff, &MjsSensor::set_cutoff, reference()) - .property("datatype", &MjsSensor::datatype, &MjsSensor::set_datatype, reference()) - .property("dim", &MjsSensor::dim, &MjsSensor::set_dim, reference()) - .property("element", &MjsSensor::element, reference()) - .property("info", &MjsSensor::info, &MjsSensor::set_info, reference()) - .property("intprm", &MjsSensor::intprm) - .property("needstage", &MjsSensor::needstage, &MjsSensor::set_needstage, reference()) - .property("noise", &MjsSensor::noise, &MjsSensor::set_noise, reference()) - .property("objname", &MjsSensor::objname, &MjsSensor::set_objname, reference()) - .property("objtype", &MjsSensor::objtype, &MjsSensor::set_objtype, reference()) - .property("plugin", &MjsSensor::plugin, reference()) - .property("refname", &MjsSensor::refname, &MjsSensor::set_refname, reference()) - .property("reftype", &MjsSensor::reftype, &MjsSensor::set_reftype, reference()) - .property("type", &MjsSensor::type, &MjsSensor::set_type, reference()) - .property("userdata", &MjsSensor::userdata, reference()); - emscripten::class_("MjsSite") - .property("alt", &MjsSite::alt, reference()) - .property("element", &MjsSite::element, reference()) - .property("fromto", &MjsSite::fromto) - .property("group", &MjsSite::group, &MjsSite::set_group, reference()) - .property("info", &MjsSite::info, &MjsSite::set_info, reference()) - .property("material", &MjsSite::material, &MjsSite::set_material, reference()) - .property("pos", &MjsSite::pos) - .property("quat", &MjsSite::quat) - .property("rgba", &MjsSite::rgba) - .property("size", &MjsSite::size) - .property("type", &MjsSite::type, &MjsSite::set_type, reference()) - .property("userdata", &MjsSite::userdata, reference()); - emscripten::class_("MjsSkin") - .property("bindpos", &MjsSkin::bindpos, reference()) - .property("bindquat", &MjsSkin::bindquat, reference()) - .property("bodyname", &MjsSkin::bodyname, reference()) - .property("element", &MjsSkin::element, reference()) - .property("face", &MjsSkin::face, reference()) - .property("file", &MjsSkin::file, &MjsSkin::set_file, reference()) - .property("group", &MjsSkin::group, &MjsSkin::set_group, reference()) - .property("inflate", &MjsSkin::inflate, &MjsSkin::set_inflate, reference()) - .property("info", &MjsSkin::info, &MjsSkin::set_info, reference()) - .property("material", &MjsSkin::material, &MjsSkin::set_material, reference()) - .property("rgba", &MjsSkin::rgba) - .property("texcoord", &MjsSkin::texcoord, reference()) - .property("vert", &MjsSkin::vert, reference()) - .property("vertid", &MjsSkin::vertid, reference()) - .property("vertweight", &MjsSkin::vertweight, reference()); - emscripten::class_("MjsTendon") - .property("actfrclimited", &MjsTendon::actfrclimited, &MjsTendon::set_actfrclimited, reference()) - .property("actfrcrange", &MjsTendon::actfrcrange) - .property("armature", &MjsTendon::armature, &MjsTendon::set_armature, reference()) - .property("damping", &MjsTendon::damping, &MjsTendon::set_damping, reference()) - .property("element", &MjsTendon::element, reference()) - .property("frictionloss", &MjsTendon::frictionloss, &MjsTendon::set_frictionloss, reference()) - .property("group", &MjsTendon::group, &MjsTendon::set_group, reference()) - .property("info", &MjsTendon::info, &MjsTendon::set_info, reference()) - .property("limited", &MjsTendon::limited, &MjsTendon::set_limited, reference()) - .property("margin", &MjsTendon::margin, &MjsTendon::set_margin, reference()) - .property("material", &MjsTendon::material, &MjsTendon::set_material, reference()) - .property("range", &MjsTendon::range) - .property("rgba", &MjsTendon::rgba) - .property("solimp_friction", &MjsTendon::solimp_friction) - .property("solimp_limit", &MjsTendon::solimp_limit) - .property("solref_friction", &MjsTendon::solref_friction) - .property("solref_limit", &MjsTendon::solref_limit) - .property("springlength", &MjsTendon::springlength) - .property("stiffness", &MjsTendon::stiffness, &MjsTendon::set_stiffness, reference()) - .property("userdata", &MjsTendon::userdata, reference()) - .property("width", &MjsTendon::width, &MjsTendon::set_width, reference()); - emscripten::class_("MjsText") - .property("data", &MjsText::data, &MjsText::set_data, reference()) - .property("element", &MjsText::element, reference()) - .property("info", &MjsText::info, &MjsText::set_info, reference()); - emscripten::class_("MjsTexture") - .property("builtin", &MjsTexture::builtin, &MjsTexture::set_builtin, reference()) - .property("colorspace", &MjsTexture::colorspace, &MjsTexture::set_colorspace, reference()) - .property("content_type", &MjsTexture::content_type, &MjsTexture::set_content_type, reference()) - .property("cubefiles", &MjsTexture::cubefiles, reference()) - .property("data", &MjsTexture::data, reference()) - .property("element", &MjsTexture::element, reference()) - .property("file", &MjsTexture::file, &MjsTexture::set_file, reference()) - .property("gridlayout", &MjsTexture::gridlayout) - .property("gridsize", &MjsTexture::gridsize) - .property("height", &MjsTexture::height, &MjsTexture::set_height, reference()) - .property("hflip", &MjsTexture::hflip, &MjsTexture::set_hflip, reference()) - .property("info", &MjsTexture::info, &MjsTexture::set_info, reference()) - .property("mark", &MjsTexture::mark, &MjsTexture::set_mark, reference()) - .property("markrgb", &MjsTexture::markrgb) - .property("nchannel", &MjsTexture::nchannel, &MjsTexture::set_nchannel, reference()) - .property("random", &MjsTexture::random, &MjsTexture::set_random, reference()) - .property("rgb1", &MjsTexture::rgb1) - .property("rgb2", &MjsTexture::rgb2) - .property("type", &MjsTexture::type, &MjsTexture::set_type, reference()) - .property("vflip", &MjsTexture::vflip, &MjsTexture::set_vflip, reference()) - .property("width", &MjsTexture::width, &MjsTexture::set_width, reference()); - emscripten::class_("MjsTuple") - .property("element", &MjsTuple::element, reference()) - .property("info", &MjsTuple::info, &MjsTuple::set_info, reference()) - .property("objname", &MjsTuple::objname, reference()) - .property("objprm", &MjsTuple::objprm, reference()) - .property("objtype", &MjsTuple::objtype, reference()); - emscripten::class_("MjsWrap") - .property("element", &MjsWrap::element, reference()) - .property("info", &MjsWrap::info, &MjsWrap::set_info, reference()) - .property("type", &MjsWrap::type, &MjsWrap::set_type, reference()); - emscripten::class_("MjvCamera") - .constructor<>() - .function("copy", &MjvCamera::copy, take_ownership()) - .property("azimuth", &MjvCamera::azimuth, &MjvCamera::set_azimuth, reference()) - .property("distance", &MjvCamera::distance, &MjvCamera::set_distance, reference()) - .property("elevation", &MjvCamera::elevation, &MjvCamera::set_elevation, reference()) - .property("fixedcamid", &MjvCamera::fixedcamid, &MjvCamera::set_fixedcamid, reference()) - .property("lookat", &MjvCamera::lookat) - .property("orthographic", &MjvCamera::orthographic, &MjvCamera::set_orthographic, reference()) - .property("trackbodyid", &MjvCamera::trackbodyid, &MjvCamera::set_trackbodyid, reference()) - .property("type", &MjvCamera::type, &MjvCamera::set_type, reference()); - emscripten::class_("MjvFigure") - .constructor<>() - .function("copy", &MjvFigure::copy, take_ownership()) - .property("figurergba", &MjvFigure::figurergba) - .property("flg_barplot", &MjvFigure::flg_barplot, &MjvFigure::set_flg_barplot, reference()) - .property("flg_extend", &MjvFigure::flg_extend, &MjvFigure::set_flg_extend, reference()) - .property("flg_legend", &MjvFigure::flg_legend, &MjvFigure::set_flg_legend, reference()) - .property("flg_selection", &MjvFigure::flg_selection, &MjvFigure::set_flg_selection, reference()) - .property("flg_symmetric", &MjvFigure::flg_symmetric, &MjvFigure::set_flg_symmetric, reference()) - .property("flg_ticklabel", &MjvFigure::flg_ticklabel) - .property("gridrgb", &MjvFigure::gridrgb) - .property("gridsize", &MjvFigure::gridsize) - .property("gridwidth", &MjvFigure::gridwidth, &MjvFigure::set_gridwidth, reference()) - .property("highlight", &MjvFigure::highlight) - .property("highlightid", &MjvFigure::highlightid, &MjvFigure::set_highlightid, reference()) - .property("legendoffset", &MjvFigure::legendoffset, &MjvFigure::set_legendoffset, reference()) - .property("legendrgba", &MjvFigure::legendrgba) - .property("linedata", &MjvFigure::linedata) - .property("linename", &MjvFigure::linename) - .property("linepnt", &MjvFigure::linepnt) - .property("linergb", &MjvFigure::linergb) - .property("linewidth", &MjvFigure::linewidth, &MjvFigure::set_linewidth, reference()) - .property("minwidth", &MjvFigure::minwidth) - .property("panergba", &MjvFigure::panergba) - .property("range", &MjvFigure::range) - .property("selection", &MjvFigure::selection, &MjvFigure::set_selection, reference()) - .property("subplot", &MjvFigure::subplot, &MjvFigure::set_subplot, reference()) - .property("textrgb", &MjvFigure::textrgb) - .property("title", &MjvFigure::title) - .property("xaxisdata", &MjvFigure::xaxisdata) - .property("xaxispixel", &MjvFigure::xaxispixel) - .property("xformat", &MjvFigure::xformat) - .property("xlabel", &MjvFigure::xlabel) - .property("yaxisdata", &MjvFigure::yaxisdata) - .property("yaxispixel", &MjvFigure::yaxispixel) - .property("yformat", &MjvFigure::yformat); - emscripten::class_("MjvGLCamera") - .constructor<>() - .function("copy", &MjvGLCamera::copy, take_ownership()) - .property("forward", &MjvGLCamera::forward) - .property("frustum_bottom", &MjvGLCamera::frustum_bottom, &MjvGLCamera::set_frustum_bottom, reference()) - .property("frustum_center", &MjvGLCamera::frustum_center, &MjvGLCamera::set_frustum_center, reference()) - .property("frustum_far", &MjvGLCamera::frustum_far, &MjvGLCamera::set_frustum_far, reference()) - .property("frustum_near", &MjvGLCamera::frustum_near, &MjvGLCamera::set_frustum_near, reference()) - .property("frustum_top", &MjvGLCamera::frustum_top, &MjvGLCamera::set_frustum_top, reference()) - .property("frustum_width", &MjvGLCamera::frustum_width, &MjvGLCamera::set_frustum_width, reference()) - .property("orthographic", &MjvGLCamera::orthographic, &MjvGLCamera::set_orthographic, reference()) - .property("pos", &MjvGLCamera::pos) - .property("up", &MjvGLCamera::up); - emscripten::class_("MjvGeom") - .constructor<>() - .function("copy", &MjvGeom::copy, take_ownership()) - .property("camdist", &MjvGeom::camdist, &MjvGeom::set_camdist, reference()) - .property("category", &MjvGeom::category, &MjvGeom::set_category, reference()) - .property("dataid", &MjvGeom::dataid, &MjvGeom::set_dataid, reference()) - .property("emission", &MjvGeom::emission, &MjvGeom::set_emission, reference()) - .property("label", &MjvGeom::label) - .property("mat", &MjvGeom::mat) - .property("matid", &MjvGeom::matid, &MjvGeom::set_matid, reference()) - .property("modelrbound", &MjvGeom::modelrbound, &MjvGeom::set_modelrbound, reference()) - .property("objid", &MjvGeom::objid, &MjvGeom::set_objid, reference()) - .property("objtype", &MjvGeom::objtype, &MjvGeom::set_objtype, reference()) - .property("pos", &MjvGeom::pos) - .property("reflectance", &MjvGeom::reflectance, &MjvGeom::set_reflectance, reference()) - .property("rgba", &MjvGeom::rgba) - .property("segid", &MjvGeom::segid, &MjvGeom::set_segid, reference()) - .property("shininess", &MjvGeom::shininess, &MjvGeom::set_shininess, reference()) - .property("size", &MjvGeom::size) - .property("specular", &MjvGeom::specular, &MjvGeom::set_specular, reference()) - .property("texcoord", &MjvGeom::texcoord, &MjvGeom::set_texcoord, reference()) - .property("transparent", &MjvGeom::transparent, &MjvGeom::set_transparent, reference()) - .property("type", &MjvGeom::type, &MjvGeom::set_type, reference()); - emscripten::class_("MjvLight") - .constructor<>() - .function("copy", &MjvLight::copy, take_ownership()) - .property("ambient", &MjvLight::ambient) - .property("attenuation", &MjvLight::attenuation) - .property("bulbradius", &MjvLight::bulbradius, &MjvLight::set_bulbradius, reference()) - .property("castshadow", &MjvLight::castshadow, &MjvLight::set_castshadow, reference()) - .property("cutoff", &MjvLight::cutoff, &MjvLight::set_cutoff, reference()) - .property("diffuse", &MjvLight::diffuse) - .property("dir", &MjvLight::dir) - .property("exponent", &MjvLight::exponent, &MjvLight::set_exponent, reference()) - .property("headlight", &MjvLight::headlight, &MjvLight::set_headlight, reference()) - .property("id", &MjvLight::id, &MjvLight::set_id, reference()) - .property("intensity", &MjvLight::intensity, &MjvLight::set_intensity, reference()) - .property("pos", &MjvLight::pos) - .property("range", &MjvLight::range, &MjvLight::set_range, reference()) - .property("specular", &MjvLight::specular) - .property("texid", &MjvLight::texid, &MjvLight::set_texid, reference()) - .property("type", &MjvLight::type, &MjvLight::set_type, reference()); - emscripten::class_("MjvOption") - .constructor<>() - .function("copy", &MjvOption::copy, take_ownership()) - .property("actuatorgroup", &MjvOption::actuatorgroup) - .property("bvh_depth", &MjvOption::bvh_depth, &MjvOption::set_bvh_depth, reference()) - .property("flags", &MjvOption::flags) - .property("flex_layer", &MjvOption::flex_layer, &MjvOption::set_flex_layer, reference()) - .property("flexgroup", &MjvOption::flexgroup) - .property("frame", &MjvOption::frame, &MjvOption::set_frame, reference()) - .property("geomgroup", &MjvOption::geomgroup) - .property("jointgroup", &MjvOption::jointgroup) - .property("label", &MjvOption::label, &MjvOption::set_label, reference()) - .property("sitegroup", &MjvOption::sitegroup) - .property("skingroup", &MjvOption::skingroup) - .property("tendongroup", &MjvOption::tendongroup); - emscripten::class_("MjvPerturb") - .constructor<>() - .function("copy", &MjvPerturb::copy, take_ownership()) - .property("active", &MjvPerturb::active, &MjvPerturb::set_active, reference()) - .property("active2", &MjvPerturb::active2, &MjvPerturb::set_active2, reference()) - .property("flexselect", &MjvPerturb::flexselect, &MjvPerturb::set_flexselect, reference()) - .property("localmass", &MjvPerturb::localmass, &MjvPerturb::set_localmass, reference()) - .property("localpos", &MjvPerturb::localpos) - .property("refpos", &MjvPerturb::refpos) - .property("refquat", &MjvPerturb::refquat) - .property("refselpos", &MjvPerturb::refselpos) - .property("scale", &MjvPerturb::scale, &MjvPerturb::set_scale, reference()) - .property("select", &MjvPerturb::select, &MjvPerturb::set_select, reference()) - .property("skinselect", &MjvPerturb::skinselect, &MjvPerturb::set_skinselect, reference()); - emscripten::class_("MjvScene") - .constructor() - .constructor<>() - .property("camera", &MjvScene::camera) - .property("enabletransform", &MjvScene::enabletransform, &MjvScene::set_enabletransform, reference()) - .property("flags", &MjvScene::flags) - .property("flexedge", &MjvScene::flexedge) - .property("flexedgeadr", &MjvScene::flexedgeadr) - .property("flexedgenum", &MjvScene::flexedgenum) - .property("flexedgeopt", &MjvScene::flexedgeopt, &MjvScene::set_flexedgeopt, reference()) - .property("flexface", &MjvScene::flexface) - .property("flexfaceadr", &MjvScene::flexfaceadr) - .property("flexfacenum", &MjvScene::flexfacenum) - .property("flexfaceopt", &MjvScene::flexfaceopt, &MjvScene::set_flexfaceopt, reference()) - .property("flexfaceused", &MjvScene::flexfaceused) - .property("flexnormal", &MjvScene::flexnormal) - .property("flexskinopt", &MjvScene::flexskinopt, &MjvScene::set_flexskinopt, reference()) - .property("flextexcoord", &MjvScene::flextexcoord) - .property("flexvert", &MjvScene::flexvert) - .property("flexvertadr", &MjvScene::flexvertadr) - .property("flexvertnum", &MjvScene::flexvertnum) - .property("flexvertopt", &MjvScene::flexvertopt, &MjvScene::set_flexvertopt, reference()) - .property("framergb", &MjvScene::framergb) - .property("framewidth", &MjvScene::framewidth, &MjvScene::set_framewidth, reference()) - .property("geomorder", &MjvScene::geomorder) - .property("geoms", &MjvScene::geoms) - .property("lights", &MjvScene::lights) - .property("maxgeom", &MjvScene::maxgeom, &MjvScene::set_maxgeom, reference()) - .property("nflex", &MjvScene::nflex, &MjvScene::set_nflex, reference()) - .property("ngeom", &MjvScene::ngeom, &MjvScene::set_ngeom, reference()) - .property("nlight", &MjvScene::nlight, &MjvScene::set_nlight, reference()) - .property("nskin", &MjvScene::nskin, &MjvScene::set_nskin, reference()) - .property("rotate", &MjvScene::rotate) - .property("scale", &MjvScene::scale, &MjvScene::set_scale, reference()) - .property("skinfacenum", &MjvScene::skinfacenum) - .property("skinnormal", &MjvScene::skinnormal) - .property("skinvert", &MjvScene::skinvert) - .property("skinvertadr", &MjvScene::skinvertadr) - .property("skinvertnum", &MjvScene::skinvertnum) - .property("status", &MjvScene::status, &MjvScene::set_status, reference()) - .property("stereo", &MjvScene::stereo, &MjvScene::set_stereo, reference()) - .property("translate", &MjvScene::translate); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - emscripten::register_optional(); - - // TODO: should be generated in future CLs -- // - emscripten::register_vector("MjSolverStatVec"); - emscripten::register_vector("MjTimerStatVec"); - emscripten::register_vector("MjWarningStatVec"); - emscripten::register_vector("MjContactVec"); - emscripten::register_vector("MjvLightVec"); - emscripten::register_vector("MjvGLCameraVec"); - emscripten::register_vector("MjvGeomVec"); -} - void mj_Euler_wrapper(const MjModel& m, MjData& d) { mj_Euler(m.get(), d.get()); } @@ -12401,9 +10151,2145 @@ void mjv_updateSkin_wrapper(const MjModel& m, const MjData& d, MjvScene& scn) { mjv_updateSkin(m.get(), d.get(), scn.get()); } -EMSCRIPTEN_BINDINGS(mujoco_functions) { - function("parseXMLString", &parseXMLString_wrapper, take_ownership()); - function("error", &error_wrapper); +EMSCRIPTEN_BINDINGS(mujoco_bindings) { + enum_("mjtAlignFree") + .value("mjALIGNFREE_FALSE", mjALIGNFREE_FALSE) + .value("mjALIGNFREE_TRUE", mjALIGNFREE_TRUE) + .value("mjALIGNFREE_AUTO", mjALIGNFREE_AUTO); + enum_("mjtBias") + .value("mjBIAS_NONE", mjBIAS_NONE) + .value("mjBIAS_AFFINE", mjBIAS_AFFINE) + .value("mjBIAS_MUSCLE", mjBIAS_MUSCLE) + .value("mjBIAS_USER", mjBIAS_USER); + enum_("mjtBuiltin") + .value("mjBUILTIN_NONE", mjBUILTIN_NONE) + .value("mjBUILTIN_GRADIENT", mjBUILTIN_GRADIENT) + .value("mjBUILTIN_CHECKER", mjBUILTIN_CHECKER) + .value("mjBUILTIN_FLAT", mjBUILTIN_FLAT); + enum_("mjtButton") + .value("mjBUTTON_NONE", mjBUTTON_NONE) + .value("mjBUTTON_LEFT", mjBUTTON_LEFT) + .value("mjBUTTON_RIGHT", mjBUTTON_RIGHT) + .value("mjBUTTON_MIDDLE", mjBUTTON_MIDDLE); + enum_("mjtCamLight") + .value("mjCAMLIGHT_FIXED", mjCAMLIGHT_FIXED) + .value("mjCAMLIGHT_TRACK", mjCAMLIGHT_TRACK) + .value("mjCAMLIGHT_TRACKCOM", mjCAMLIGHT_TRACKCOM) + .value("mjCAMLIGHT_TARGETBODY", mjCAMLIGHT_TARGETBODY) + .value("mjCAMLIGHT_TARGETBODYCOM", mjCAMLIGHT_TARGETBODYCOM); + enum_("mjtCamera") + .value("mjCAMERA_FREE", mjCAMERA_FREE) + .value("mjCAMERA_TRACKING", mjCAMERA_TRACKING) + .value("mjCAMERA_FIXED", mjCAMERA_FIXED) + .value("mjCAMERA_USER", mjCAMERA_USER); + enum_("mjtCatBit") + .value("mjCAT_STATIC", mjCAT_STATIC) + .value("mjCAT_DYNAMIC", mjCAT_DYNAMIC) + .value("mjCAT_DECOR", mjCAT_DECOR) + .value("mjCAT_ALL", mjCAT_ALL); + enum_("mjtColorSpace") + .value("mjCOLORSPACE_AUTO", mjCOLORSPACE_AUTO) + .value("mjCOLORSPACE_LINEAR", mjCOLORSPACE_LINEAR) + .value("mjCOLORSPACE_SRGB", mjCOLORSPACE_SRGB); + enum_("mjtConDataField") + .value("mjCONDATA_FOUND", mjCONDATA_FOUND) + .value("mjCONDATA_FORCE", mjCONDATA_FORCE) + .value("mjCONDATA_TORQUE", mjCONDATA_TORQUE) + .value("mjCONDATA_DIST", mjCONDATA_DIST) + .value("mjCONDATA_POS", mjCONDATA_POS) + .value("mjCONDATA_NORMAL", mjCONDATA_NORMAL) + .value("mjCONDATA_TANGENT", mjCONDATA_TANGENT) + .value("mjNCONDATA", mjNCONDATA); + enum_("mjtCone") + .value("mjCONE_PYRAMIDAL", mjCONE_PYRAMIDAL) + .value("mjCONE_ELLIPTIC", mjCONE_ELLIPTIC); + enum_("mjtConstraint") + .value("mjCNSTR_EQUALITY", mjCNSTR_EQUALITY) + .value("mjCNSTR_FRICTION_DOF", mjCNSTR_FRICTION_DOF) + .value("mjCNSTR_FRICTION_TENDON", mjCNSTR_FRICTION_TENDON) + .value("mjCNSTR_LIMIT_JOINT", mjCNSTR_LIMIT_JOINT) + .value("mjCNSTR_LIMIT_TENDON", mjCNSTR_LIMIT_TENDON) + .value("mjCNSTR_CONTACT_FRICTIONLESS", mjCNSTR_CONTACT_FRICTIONLESS) + .value("mjCNSTR_CONTACT_PYRAMIDAL", mjCNSTR_CONTACT_PYRAMIDAL) + .value("mjCNSTR_CONTACT_ELLIPTIC", mjCNSTR_CONTACT_ELLIPTIC); + enum_("mjtConstraintState") + .value("mjCNSTRSTATE_SATISFIED", mjCNSTRSTATE_SATISFIED) + .value("mjCNSTRSTATE_QUADRATIC", mjCNSTRSTATE_QUADRATIC) + .value("mjCNSTRSTATE_LINEARNEG", mjCNSTRSTATE_LINEARNEG) + .value("mjCNSTRSTATE_LINEARPOS", mjCNSTRSTATE_LINEARPOS) + .value("mjCNSTRSTATE_CONE", mjCNSTRSTATE_CONE); + enum_("mjtDataType") + .value("mjDATATYPE_REAL", mjDATATYPE_REAL) + .value("mjDATATYPE_POSITIVE", mjDATATYPE_POSITIVE) + .value("mjDATATYPE_AXIS", mjDATATYPE_AXIS) + .value("mjDATATYPE_QUATERNION", mjDATATYPE_QUATERNION); + enum_("mjtDepthMap") + .value("mjDEPTH_ZERONEAR", mjDEPTH_ZERONEAR) + .value("mjDEPTH_ZEROFAR", mjDEPTH_ZEROFAR); + enum_("mjtDisableBit") + .value("mjDSBL_CONSTRAINT", mjDSBL_CONSTRAINT) + .value("mjDSBL_EQUALITY", mjDSBL_EQUALITY) + .value("mjDSBL_FRICTIONLOSS", mjDSBL_FRICTIONLOSS) + .value("mjDSBL_LIMIT", mjDSBL_LIMIT) + .value("mjDSBL_CONTACT", mjDSBL_CONTACT) + .value("mjDSBL_SPRING", mjDSBL_SPRING) + .value("mjDSBL_DAMPER", mjDSBL_DAMPER) + .value("mjDSBL_GRAVITY", mjDSBL_GRAVITY) + .value("mjDSBL_CLAMPCTRL", mjDSBL_CLAMPCTRL) + .value("mjDSBL_WARMSTART", mjDSBL_WARMSTART) + .value("mjDSBL_FILTERPARENT", mjDSBL_FILTERPARENT) + .value("mjDSBL_ACTUATION", mjDSBL_ACTUATION) + .value("mjDSBL_REFSAFE", mjDSBL_REFSAFE) + .value("mjDSBL_SENSOR", mjDSBL_SENSOR) + .value("mjDSBL_MIDPHASE", mjDSBL_MIDPHASE) + .value("mjDSBL_EULERDAMP", mjDSBL_EULERDAMP) + .value("mjDSBL_AUTORESET", mjDSBL_AUTORESET) + .value("mjDSBL_NATIVECCD", mjDSBL_NATIVECCD) + .value("mjDSBL_ISLAND", mjDSBL_ISLAND) + .value("mjNDISABLE", mjNDISABLE); + enum_("mjtDyn") + .value("mjDYN_NONE", mjDYN_NONE) + .value("mjDYN_INTEGRATOR", mjDYN_INTEGRATOR) + .value("mjDYN_FILTER", mjDYN_FILTER) + .value("mjDYN_FILTEREXACT", mjDYN_FILTEREXACT) + .value("mjDYN_MUSCLE", mjDYN_MUSCLE) + .value("mjDYN_USER", mjDYN_USER); + enum_("mjtEnableBit") + .value("mjENBL_OVERRIDE", mjENBL_OVERRIDE) + .value("mjENBL_ENERGY", mjENBL_ENERGY) + .value("mjENBL_FWDINV", mjENBL_FWDINV) + .value("mjENBL_INVDISCRETE", mjENBL_INVDISCRETE) + .value("mjENBL_MULTICCD", mjENBL_MULTICCD) + .value("mjENBL_SLEEP", mjENBL_SLEEP) + .value("mjNENABLE", mjNENABLE); + enum_("mjtEq") + .value("mjEQ_CONNECT", mjEQ_CONNECT) + .value("mjEQ_WELD", mjEQ_WELD) + .value("mjEQ_JOINT", mjEQ_JOINT) + .value("mjEQ_TENDON", mjEQ_TENDON) + .value("mjEQ_FLEX", mjEQ_FLEX) + .value("mjEQ_DISTANCE", mjEQ_DISTANCE); + enum_("mjtEvent") + .value("mjEVENT_NONE", mjEVENT_NONE) + .value("mjEVENT_MOVE", mjEVENT_MOVE) + .value("mjEVENT_PRESS", mjEVENT_PRESS) + .value("mjEVENT_RELEASE", mjEVENT_RELEASE) + .value("mjEVENT_SCROLL", mjEVENT_SCROLL) + .value("mjEVENT_KEY", mjEVENT_KEY) + .value("mjEVENT_RESIZE", mjEVENT_RESIZE) + .value("mjEVENT_REDRAW", mjEVENT_REDRAW) + .value("mjEVENT_FILESDROP", mjEVENT_FILESDROP); + enum_("mjtFlexSelf") + .value("mjFLEXSELF_NONE", mjFLEXSELF_NONE) + .value("mjFLEXSELF_NARROW", mjFLEXSELF_NARROW) + .value("mjFLEXSELF_BVH", mjFLEXSELF_BVH) + .value("mjFLEXSELF_SAP", mjFLEXSELF_SAP) + .value("mjFLEXSELF_AUTO", mjFLEXSELF_AUTO); + enum_("mjtFont") + .value("mjFONT_NORMAL", mjFONT_NORMAL) + .value("mjFONT_SHADOW", mjFONT_SHADOW) + .value("mjFONT_BIG", mjFONT_BIG); + enum_("mjtFontScale") + .value("mjFONTSCALE_50", mjFONTSCALE_50) + .value("mjFONTSCALE_100", mjFONTSCALE_100) + .value("mjFONTSCALE_150", mjFONTSCALE_150) + .value("mjFONTSCALE_200", mjFONTSCALE_200) + .value("mjFONTSCALE_250", mjFONTSCALE_250) + .value("mjFONTSCALE_300", mjFONTSCALE_300); + enum_("mjtFrame") + .value("mjFRAME_NONE", mjFRAME_NONE) + .value("mjFRAME_BODY", mjFRAME_BODY) + .value("mjFRAME_GEOM", mjFRAME_GEOM) + .value("mjFRAME_SITE", mjFRAME_SITE) + .value("mjFRAME_CAMERA", mjFRAME_CAMERA) + .value("mjFRAME_LIGHT", mjFRAME_LIGHT) + .value("mjFRAME_CONTACT", mjFRAME_CONTACT) + .value("mjFRAME_WORLD", mjFRAME_WORLD) + .value("mjNFRAME", mjNFRAME); + enum_("mjtFramebuffer") + .value("mjFB_WINDOW", mjFB_WINDOW) + .value("mjFB_OFFSCREEN", mjFB_OFFSCREEN); + enum_("mjtGain") + .value("mjGAIN_FIXED", mjGAIN_FIXED) + .value("mjGAIN_AFFINE", mjGAIN_AFFINE) + .value("mjGAIN_MUSCLE", mjGAIN_MUSCLE) + .value("mjGAIN_USER", mjGAIN_USER); + enum_("mjtGeom") + .value("mjGEOM_PLANE", mjGEOM_PLANE) + .value("mjGEOM_HFIELD", mjGEOM_HFIELD) + .value("mjGEOM_SPHERE", mjGEOM_SPHERE) + .value("mjGEOM_CAPSULE", mjGEOM_CAPSULE) + .value("mjGEOM_ELLIPSOID", mjGEOM_ELLIPSOID) + .value("mjGEOM_CYLINDER", mjGEOM_CYLINDER) + .value("mjGEOM_BOX", mjGEOM_BOX) + .value("mjGEOM_MESH", mjGEOM_MESH) + .value("mjGEOM_SDF", mjGEOM_SDF) + .value("mjNGEOMTYPES", mjNGEOMTYPES) + .value("mjGEOM_ARROW", mjGEOM_ARROW) + .value("mjGEOM_ARROW1", mjGEOM_ARROW1) + .value("mjGEOM_ARROW2", mjGEOM_ARROW2) + .value("mjGEOM_LINE", mjGEOM_LINE) + .value("mjGEOM_LINEBOX", mjGEOM_LINEBOX) + .value("mjGEOM_FLEX", mjGEOM_FLEX) + .value("mjGEOM_SKIN", mjGEOM_SKIN) + .value("mjGEOM_LABEL", mjGEOM_LABEL) + .value("mjGEOM_TRIANGLE", mjGEOM_TRIANGLE) + .value("mjGEOM_NONE", mjGEOM_NONE); + enum_("mjtGeomInertia") + .value("mjINERTIA_VOLUME", mjINERTIA_VOLUME) + .value("mjINERTIA_SHELL", mjINERTIA_SHELL); + enum_("mjtGridPos") + .value("mjGRID_TOPLEFT", mjGRID_TOPLEFT) + .value("mjGRID_TOPRIGHT", mjGRID_TOPRIGHT) + .value("mjGRID_BOTTOMLEFT", mjGRID_BOTTOMLEFT) + .value("mjGRID_BOTTOMRIGHT", mjGRID_BOTTOMRIGHT) + .value("mjGRID_TOP", mjGRID_TOP) + .value("mjGRID_BOTTOM", mjGRID_BOTTOM) + .value("mjGRID_LEFT", mjGRID_LEFT) + .value("mjGRID_RIGHT", mjGRID_RIGHT); + enum_("mjtInertiaFromGeom") + .value("mjINERTIAFROMGEOM_FALSE", mjINERTIAFROMGEOM_FALSE) + .value("mjINERTIAFROMGEOM_TRUE", mjINERTIAFROMGEOM_TRUE) + .value("mjINERTIAFROMGEOM_AUTO", mjINERTIAFROMGEOM_AUTO); + enum_("mjtIntegrator") + .value("mjINT_EULER", mjINT_EULER) + .value("mjINT_RK4", mjINT_RK4) + .value("mjINT_IMPLICIT", mjINT_IMPLICIT) + .value("mjINT_IMPLICITFAST", mjINT_IMPLICITFAST); + enum_("mjtItem") + .value("mjITEM_END", mjITEM_END) + .value("mjITEM_SECTION", mjITEM_SECTION) + .value("mjITEM_SEPARATOR", mjITEM_SEPARATOR) + .value("mjITEM_STATIC", mjITEM_STATIC) + .value("mjITEM_BUTTON", mjITEM_BUTTON) + .value("mjITEM_CHECKINT", mjITEM_CHECKINT) + .value("mjITEM_CHECKBYTE", mjITEM_CHECKBYTE) + .value("mjITEM_RADIO", mjITEM_RADIO) + .value("mjITEM_RADIOLINE", mjITEM_RADIOLINE) + .value("mjITEM_SELECT", mjITEM_SELECT) + .value("mjITEM_SLIDERINT", mjITEM_SLIDERINT) + .value("mjITEM_SLIDERNUM", mjITEM_SLIDERNUM) + .value("mjITEM_EDITINT", mjITEM_EDITINT) + .value("mjITEM_EDITNUM", mjITEM_EDITNUM) + .value("mjITEM_EDITFLOAT", mjITEM_EDITFLOAT) + .value("mjITEM_EDITTXT", mjITEM_EDITTXT) + .value("mjNITEM", mjNITEM); + enum_("mjtJacobian") + .value("mjJAC_DENSE", mjJAC_DENSE) + .value("mjJAC_SPARSE", mjJAC_SPARSE) + .value("mjJAC_AUTO", mjJAC_AUTO); + enum_("mjtJoint") + .value("mjJNT_FREE", mjJNT_FREE) + .value("mjJNT_BALL", mjJNT_BALL) + .value("mjJNT_SLIDE", mjJNT_SLIDE) + .value("mjJNT_HINGE", mjJNT_HINGE); + enum_("mjtLRMode") + .value("mjLRMODE_NONE", mjLRMODE_NONE) + .value("mjLRMODE_MUSCLE", mjLRMODE_MUSCLE) + .value("mjLRMODE_MUSCLEUSER", mjLRMODE_MUSCLEUSER) + .value("mjLRMODE_ALL", mjLRMODE_ALL); + enum_("mjtLabel") + .value("mjLABEL_NONE", mjLABEL_NONE) + .value("mjLABEL_BODY", mjLABEL_BODY) + .value("mjLABEL_JOINT", mjLABEL_JOINT) + .value("mjLABEL_GEOM", mjLABEL_GEOM) + .value("mjLABEL_SITE", mjLABEL_SITE) + .value("mjLABEL_CAMERA", mjLABEL_CAMERA) + .value("mjLABEL_LIGHT", mjLABEL_LIGHT) + .value("mjLABEL_TENDON", mjLABEL_TENDON) + .value("mjLABEL_ACTUATOR", mjLABEL_ACTUATOR) + .value("mjLABEL_CONSTRAINT", mjLABEL_CONSTRAINT) + .value("mjLABEL_FLEX", mjLABEL_FLEX) + .value("mjLABEL_SKIN", mjLABEL_SKIN) + .value("mjLABEL_SELECTION", mjLABEL_SELECTION) + .value("mjLABEL_SELPNT", mjLABEL_SELPNT) + .value("mjLABEL_CONTACTPOINT", mjLABEL_CONTACTPOINT) + .value("mjLABEL_CONTACTFORCE", mjLABEL_CONTACTFORCE) + .value("mjLABEL_ISLAND", mjLABEL_ISLAND) + .value("mjNLABEL", mjNLABEL); + enum_("mjtLightType") + .value("mjLIGHT_SPOT", mjLIGHT_SPOT) + .value("mjLIGHT_DIRECTIONAL", mjLIGHT_DIRECTIONAL) + .value("mjLIGHT_POINT", mjLIGHT_POINT) + .value("mjLIGHT_IMAGE", mjLIGHT_IMAGE); + enum_("mjtLimited") + .value("mjLIMITED_FALSE", mjLIMITED_FALSE) + .value("mjLIMITED_TRUE", mjLIMITED_TRUE) + .value("mjLIMITED_AUTO", mjLIMITED_AUTO); + enum_("mjtMark") + .value("mjMARK_NONE", mjMARK_NONE) + .value("mjMARK_EDGE", mjMARK_EDGE) + .value("mjMARK_CROSS", mjMARK_CROSS) + .value("mjMARK_RANDOM", mjMARK_RANDOM); + enum_("mjtMeshBuiltin") + .value("mjMESH_BUILTIN_NONE", mjMESH_BUILTIN_NONE) + .value("mjMESH_BUILTIN_SPHERE", mjMESH_BUILTIN_SPHERE) + .value("mjMESH_BUILTIN_HEMISPHERE", mjMESH_BUILTIN_HEMISPHERE) + .value("mjMESH_BUILTIN_CONE", mjMESH_BUILTIN_CONE) + .value("mjMESH_BUILTIN_SUPERSPHERE", mjMESH_BUILTIN_SUPERSPHERE) + .value("mjMESH_BUILTIN_SUPERTORUS", mjMESH_BUILTIN_SUPERTORUS) + .value("mjMESH_BUILTIN_WEDGE", mjMESH_BUILTIN_WEDGE) + .value("mjMESH_BUILTIN_PLATE", mjMESH_BUILTIN_PLATE); + enum_("mjtMeshInertia") + .value("mjMESH_INERTIA_CONVEX", mjMESH_INERTIA_CONVEX) + .value("mjMESH_INERTIA_EXACT", mjMESH_INERTIA_EXACT) + .value("mjMESH_INERTIA_LEGACY", mjMESH_INERTIA_LEGACY) + .value("mjMESH_INERTIA_SHELL", mjMESH_INERTIA_SHELL); + enum_("mjtMouse") + .value("mjMOUSE_NONE", mjMOUSE_NONE) + .value("mjMOUSE_ROTATE_V", mjMOUSE_ROTATE_V) + .value("mjMOUSE_ROTATE_H", mjMOUSE_ROTATE_H) + .value("mjMOUSE_MOVE_V", mjMOUSE_MOVE_V) + .value("mjMOUSE_MOVE_H", mjMOUSE_MOVE_H) + .value("mjMOUSE_ZOOM", mjMOUSE_ZOOM) + .value("mjMOUSE_MOVE_V_REL", mjMOUSE_MOVE_V_REL) + .value("mjMOUSE_MOVE_H_REL", mjMOUSE_MOVE_H_REL); + enum_("mjtObj") + .value("mjOBJ_UNKNOWN", mjOBJ_UNKNOWN) + .value("mjOBJ_BODY", mjOBJ_BODY) + .value("mjOBJ_XBODY", mjOBJ_XBODY) + .value("mjOBJ_JOINT", mjOBJ_JOINT) + .value("mjOBJ_DOF", mjOBJ_DOF) + .value("mjOBJ_GEOM", mjOBJ_GEOM) + .value("mjOBJ_SITE", mjOBJ_SITE) + .value("mjOBJ_CAMERA", mjOBJ_CAMERA) + .value("mjOBJ_LIGHT", mjOBJ_LIGHT) + .value("mjOBJ_FLEX", mjOBJ_FLEX) + .value("mjOBJ_MESH", mjOBJ_MESH) + .value("mjOBJ_SKIN", mjOBJ_SKIN) + .value("mjOBJ_HFIELD", mjOBJ_HFIELD) + .value("mjOBJ_TEXTURE", mjOBJ_TEXTURE) + .value("mjOBJ_MATERIAL", mjOBJ_MATERIAL) + .value("mjOBJ_PAIR", mjOBJ_PAIR) + .value("mjOBJ_EXCLUDE", mjOBJ_EXCLUDE) + .value("mjOBJ_EQUALITY", mjOBJ_EQUALITY) + .value("mjOBJ_TENDON", mjOBJ_TENDON) + .value("mjOBJ_ACTUATOR", mjOBJ_ACTUATOR) + .value("mjOBJ_SENSOR", mjOBJ_SENSOR) + .value("mjOBJ_NUMERIC", mjOBJ_NUMERIC) + .value("mjOBJ_TEXT", mjOBJ_TEXT) + .value("mjOBJ_TUPLE", mjOBJ_TUPLE) + .value("mjOBJ_KEY", mjOBJ_KEY) + .value("mjOBJ_PLUGIN", mjOBJ_PLUGIN) + .value("mjNOBJECT", mjNOBJECT) + .value("mjOBJ_FRAME", mjOBJ_FRAME) + .value("mjOBJ_DEFAULT", mjOBJ_DEFAULT) + .value("mjOBJ_MODEL", mjOBJ_MODEL); + enum_("mjtOrientation") + .value("mjORIENTATION_QUAT", mjORIENTATION_QUAT) + .value("mjORIENTATION_AXISANGLE", mjORIENTATION_AXISANGLE) + .value("mjORIENTATION_XYAXES", mjORIENTATION_XYAXES) + .value("mjORIENTATION_ZAXIS", mjORIENTATION_ZAXIS) + .value("mjORIENTATION_EULER", mjORIENTATION_EULER); + enum_("mjtPertBit") + .value("mjPERT_TRANSLATE", mjPERT_TRANSLATE) + .value("mjPERT_ROTATE", mjPERT_ROTATE); + enum_("mjtPluginCapabilityBit") + .value("mjPLUGIN_ACTUATOR", mjPLUGIN_ACTUATOR) + .value("mjPLUGIN_SENSOR", mjPLUGIN_SENSOR) + .value("mjPLUGIN_PASSIVE", mjPLUGIN_PASSIVE) + .value("mjPLUGIN_SDF", mjPLUGIN_SDF); + enum_("mjtRndFlag") + .value("mjRND_SHADOW", mjRND_SHADOW) + .value("mjRND_WIREFRAME", mjRND_WIREFRAME) + .value("mjRND_REFLECTION", mjRND_REFLECTION) + .value("mjRND_ADDITIVE", mjRND_ADDITIVE) + .value("mjRND_SKYBOX", mjRND_SKYBOX) + .value("mjRND_FOG", mjRND_FOG) + .value("mjRND_HAZE", mjRND_HAZE) + .value("mjRND_SEGMENT", mjRND_SEGMENT) + .value("mjRND_IDCOLOR", mjRND_IDCOLOR) + .value("mjRND_CULL_FACE", mjRND_CULL_FACE) + .value("mjNRNDFLAG", mjNRNDFLAG); + enum_("mjtSDFType") + .value("mjSDFTYPE_SINGLE", mjSDFTYPE_SINGLE) + .value("mjSDFTYPE_INTERSECTION", mjSDFTYPE_INTERSECTION) + .value("mjSDFTYPE_MIDSURFACE", mjSDFTYPE_MIDSURFACE) + .value("mjSDFTYPE_COLLISION", mjSDFTYPE_COLLISION); + enum_("mjtSameFrame") + .value("mjSAMEFRAME_NONE", mjSAMEFRAME_NONE) + .value("mjSAMEFRAME_BODY", mjSAMEFRAME_BODY) + .value("mjSAMEFRAME_INERTIA", mjSAMEFRAME_INERTIA) + .value("mjSAMEFRAME_BODYROT", mjSAMEFRAME_BODYROT) + .value("mjSAMEFRAME_INERTIAROT", mjSAMEFRAME_INERTIAROT); + enum_("mjtSection") + .value("mjSECT_CLOSED", mjSECT_CLOSED) + .value("mjSECT_OPEN", mjSECT_OPEN) + .value("mjSECT_FIXED", mjSECT_FIXED); + enum_("mjtSensor") + .value("mjSENS_TOUCH", mjSENS_TOUCH) + .value("mjSENS_ACCELEROMETER", mjSENS_ACCELEROMETER) + .value("mjSENS_VELOCIMETER", mjSENS_VELOCIMETER) + .value("mjSENS_GYRO", mjSENS_GYRO) + .value("mjSENS_FORCE", mjSENS_FORCE) + .value("mjSENS_TORQUE", mjSENS_TORQUE) + .value("mjSENS_MAGNETOMETER", mjSENS_MAGNETOMETER) + .value("mjSENS_RANGEFINDER", mjSENS_RANGEFINDER) + .value("mjSENS_CAMPROJECTION", mjSENS_CAMPROJECTION) + .value("mjSENS_JOINTPOS", mjSENS_JOINTPOS) + .value("mjSENS_JOINTVEL", mjSENS_JOINTVEL) + .value("mjSENS_TENDONPOS", mjSENS_TENDONPOS) + .value("mjSENS_TENDONVEL", mjSENS_TENDONVEL) + .value("mjSENS_ACTUATORPOS", mjSENS_ACTUATORPOS) + .value("mjSENS_ACTUATORVEL", mjSENS_ACTUATORVEL) + .value("mjSENS_ACTUATORFRC", mjSENS_ACTUATORFRC) + .value("mjSENS_JOINTACTFRC", mjSENS_JOINTACTFRC) + .value("mjSENS_TENDONACTFRC", mjSENS_TENDONACTFRC) + .value("mjSENS_BALLQUAT", mjSENS_BALLQUAT) + .value("mjSENS_BALLANGVEL", mjSENS_BALLANGVEL) + .value("mjSENS_JOINTLIMITPOS", mjSENS_JOINTLIMITPOS) + .value("mjSENS_JOINTLIMITVEL", mjSENS_JOINTLIMITVEL) + .value("mjSENS_JOINTLIMITFRC", mjSENS_JOINTLIMITFRC) + .value("mjSENS_TENDONLIMITPOS", mjSENS_TENDONLIMITPOS) + .value("mjSENS_TENDONLIMITVEL", mjSENS_TENDONLIMITVEL) + .value("mjSENS_TENDONLIMITFRC", mjSENS_TENDONLIMITFRC) + .value("mjSENS_FRAMEPOS", mjSENS_FRAMEPOS) + .value("mjSENS_FRAMEQUAT", mjSENS_FRAMEQUAT) + .value("mjSENS_FRAMEXAXIS", mjSENS_FRAMEXAXIS) + .value("mjSENS_FRAMEYAXIS", mjSENS_FRAMEYAXIS) + .value("mjSENS_FRAMEZAXIS", mjSENS_FRAMEZAXIS) + .value("mjSENS_FRAMELINVEL", mjSENS_FRAMELINVEL) + .value("mjSENS_FRAMEANGVEL", mjSENS_FRAMEANGVEL) + .value("mjSENS_FRAMELINACC", mjSENS_FRAMELINACC) + .value("mjSENS_FRAMEANGACC", mjSENS_FRAMEANGACC) + .value("mjSENS_SUBTREECOM", mjSENS_SUBTREECOM) + .value("mjSENS_SUBTREELINVEL", mjSENS_SUBTREELINVEL) + .value("mjSENS_SUBTREEANGMOM", mjSENS_SUBTREEANGMOM) + .value("mjSENS_INSIDESITE", mjSENS_INSIDESITE) + .value("mjSENS_GEOMDIST", mjSENS_GEOMDIST) + .value("mjSENS_GEOMNORMAL", mjSENS_GEOMNORMAL) + .value("mjSENS_GEOMFROMTO", mjSENS_GEOMFROMTO) + .value("mjSENS_CONTACT", mjSENS_CONTACT) + .value("mjSENS_E_POTENTIAL", mjSENS_E_POTENTIAL) + .value("mjSENS_E_KINETIC", mjSENS_E_KINETIC) + .value("mjSENS_CLOCK", mjSENS_CLOCK) + .value("mjSENS_TACTILE", mjSENS_TACTILE) + .value("mjSENS_PLUGIN", mjSENS_PLUGIN) + .value("mjSENS_USER", mjSENS_USER); + enum_("mjtSleepPolicy") + .value("mjSLEEP_AUTO", mjSLEEP_AUTO) + .value("mjSLEEP_AUTO_NEVER", mjSLEEP_AUTO_NEVER) + .value("mjSLEEP_AUTO_ALLOWED", mjSLEEP_AUTO_ALLOWED) + .value("mjSLEEP_NEVER", mjSLEEP_NEVER) + .value("mjSLEEP_ALLOWED", mjSLEEP_ALLOWED) + .value("mjSLEEP_INIT", mjSLEEP_INIT); + enum_("mjtSleepState") + .value("mjS_STATIC", mjS_STATIC) + .value("mjS_ASLEEP", mjS_ASLEEP) + .value("mjS_AWAKE", mjS_AWAKE); + enum_("mjtSolver") + .value("mjSOL_PGS", mjSOL_PGS) + .value("mjSOL_CG", mjSOL_CG) + .value("mjSOL_NEWTON", mjSOL_NEWTON); + enum_("mjtStage") + .value("mjSTAGE_NONE", mjSTAGE_NONE) + .value("mjSTAGE_POS", mjSTAGE_POS) + .value("mjSTAGE_VEL", mjSTAGE_VEL) + .value("mjSTAGE_ACC", mjSTAGE_ACC); + enum_("mjtState") + .value("mjSTATE_TIME", mjSTATE_TIME) + .value("mjSTATE_QPOS", mjSTATE_QPOS) + .value("mjSTATE_QVEL", mjSTATE_QVEL) + .value("mjSTATE_ACT", mjSTATE_ACT) + .value("mjSTATE_WARMSTART", mjSTATE_WARMSTART) + .value("mjSTATE_CTRL", mjSTATE_CTRL) + .value("mjSTATE_QFRC_APPLIED", mjSTATE_QFRC_APPLIED) + .value("mjSTATE_XFRC_APPLIED", mjSTATE_XFRC_APPLIED) + .value("mjSTATE_EQ_ACTIVE", mjSTATE_EQ_ACTIVE) + .value("mjSTATE_MOCAP_POS", mjSTATE_MOCAP_POS) + .value("mjSTATE_MOCAP_QUAT", mjSTATE_MOCAP_QUAT) + .value("mjSTATE_USERDATA", mjSTATE_USERDATA) + .value("mjSTATE_PLUGIN", mjSTATE_PLUGIN) + .value("mjNSTATE", mjNSTATE) + .value("mjSTATE_PHYSICS", mjSTATE_PHYSICS) + .value("mjSTATE_FULLPHYSICS", mjSTATE_FULLPHYSICS) + .value("mjSTATE_USER", mjSTATE_USER) + .value("mjSTATE_INTEGRATION", mjSTATE_INTEGRATION); + enum_("mjtStereo") + .value("mjSTEREO_NONE", mjSTEREO_NONE) + .value("mjSTEREO_QUADBUFFERED", mjSTEREO_QUADBUFFERED) + .value("mjSTEREO_SIDEBYSIDE", mjSTEREO_SIDEBYSIDE); + enum_("mjtTaskStatus") + .value("mjTASK_NEW", mjTASK_NEW) + .value("mjTASK_QUEUED", mjTASK_QUEUED) + .value("mjTASK_COMPLETED", mjTASK_COMPLETED); + enum_("mjtTexture") + .value("mjTEXTURE_2D", mjTEXTURE_2D) + .value("mjTEXTURE_CUBE", mjTEXTURE_CUBE) + .value("mjTEXTURE_SKYBOX", mjTEXTURE_SKYBOX); + enum_("mjtTextureRole") + .value("mjTEXROLE_USER", mjTEXROLE_USER) + .value("mjTEXROLE_RGB", mjTEXROLE_RGB) + .value("mjTEXROLE_OCCLUSION", mjTEXROLE_OCCLUSION) + .value("mjTEXROLE_ROUGHNESS", mjTEXROLE_ROUGHNESS) + .value("mjTEXROLE_METALLIC", mjTEXROLE_METALLIC) + .value("mjTEXROLE_NORMAL", mjTEXROLE_NORMAL) + .value("mjTEXROLE_OPACITY", mjTEXROLE_OPACITY) + .value("mjTEXROLE_EMISSIVE", mjTEXROLE_EMISSIVE) + .value("mjTEXROLE_RGBA", mjTEXROLE_RGBA) + .value("mjTEXROLE_ORM", mjTEXROLE_ORM) + .value("mjNTEXROLE", mjNTEXROLE); + enum_("mjtTimer") + .value("mjTIMER_STEP", mjTIMER_STEP) + .value("mjTIMER_FORWARD", mjTIMER_FORWARD) + .value("mjTIMER_INVERSE", mjTIMER_INVERSE) + .value("mjTIMER_POSITION", mjTIMER_POSITION) + .value("mjTIMER_VELOCITY", mjTIMER_VELOCITY) + .value("mjTIMER_ACTUATION", mjTIMER_ACTUATION) + .value("mjTIMER_CONSTRAINT", mjTIMER_CONSTRAINT) + .value("mjTIMER_ADVANCE", mjTIMER_ADVANCE) + .value("mjTIMER_POS_KINEMATICS", mjTIMER_POS_KINEMATICS) + .value("mjTIMER_POS_INERTIA", mjTIMER_POS_INERTIA) + .value("mjTIMER_POS_COLLISION", mjTIMER_POS_COLLISION) + .value("mjTIMER_POS_MAKE", mjTIMER_POS_MAKE) + .value("mjTIMER_POS_PROJECT", mjTIMER_POS_PROJECT) + .value("mjTIMER_COL_BROAD", mjTIMER_COL_BROAD) + .value("mjTIMER_COL_NARROW", mjTIMER_COL_NARROW) + .value("mjNTIMER", mjNTIMER); + enum_("mjtTrn") + .value("mjTRN_JOINT", mjTRN_JOINT) + .value("mjTRN_JOINTINPARENT", mjTRN_JOINTINPARENT) + .value("mjTRN_SLIDERCRANK", mjTRN_SLIDERCRANK) + .value("mjTRN_TENDON", mjTRN_TENDON) + .value("mjTRN_SITE", mjTRN_SITE) + .value("mjTRN_BODY", mjTRN_BODY) + .value("mjTRN_UNDEFINED", mjTRN_UNDEFINED); + enum_("mjtVisFlag") + .value("mjVIS_CONVEXHULL", mjVIS_CONVEXHULL) + .value("mjVIS_TEXTURE", mjVIS_TEXTURE) + .value("mjVIS_JOINT", mjVIS_JOINT) + .value("mjVIS_CAMERA", mjVIS_CAMERA) + .value("mjVIS_ACTUATOR", mjVIS_ACTUATOR) + .value("mjVIS_ACTIVATION", mjVIS_ACTIVATION) + .value("mjVIS_LIGHT", mjVIS_LIGHT) + .value("mjVIS_TENDON", mjVIS_TENDON) + .value("mjVIS_RANGEFINDER", mjVIS_RANGEFINDER) + .value("mjVIS_CONSTRAINT", mjVIS_CONSTRAINT) + .value("mjVIS_INERTIA", mjVIS_INERTIA) + .value("mjVIS_SCLINERTIA", mjVIS_SCLINERTIA) + .value("mjVIS_PERTFORCE", mjVIS_PERTFORCE) + .value("mjVIS_PERTOBJ", mjVIS_PERTOBJ) + .value("mjVIS_CONTACTPOINT", mjVIS_CONTACTPOINT) + .value("mjVIS_ISLAND", mjVIS_ISLAND) + .value("mjVIS_CONTACTFORCE", mjVIS_CONTACTFORCE) + .value("mjVIS_CONTACTSPLIT", mjVIS_CONTACTSPLIT) + .value("mjVIS_TRANSPARENT", mjVIS_TRANSPARENT) + .value("mjVIS_AUTOCONNECT", mjVIS_AUTOCONNECT) + .value("mjVIS_COM", mjVIS_COM) + .value("mjVIS_SELECT", mjVIS_SELECT) + .value("mjVIS_STATIC", mjVIS_STATIC) + .value("mjVIS_SKIN", mjVIS_SKIN) + .value("mjVIS_FLEXVERT", mjVIS_FLEXVERT) + .value("mjVIS_FLEXEDGE", mjVIS_FLEXEDGE) + .value("mjVIS_FLEXFACE", mjVIS_FLEXFACE) + .value("mjVIS_FLEXSKIN", mjVIS_FLEXSKIN) + .value("mjVIS_BODYBVH", mjVIS_BODYBVH) + .value("mjVIS_MESHBVH", mjVIS_MESHBVH) + .value("mjVIS_SDFITER", mjVIS_SDFITER) + .value("mjNVISFLAG", mjNVISFLAG); + enum_("mjtWarning") + .value("mjWARN_INERTIA", mjWARN_INERTIA) + .value("mjWARN_CONTACTFULL", mjWARN_CONTACTFULL) + .value("mjWARN_CNSTRFULL", mjWARN_CNSTRFULL) + .value("mjWARN_VGEOMFULL", mjWARN_VGEOMFULL) + .value("mjWARN_BADQPOS", mjWARN_BADQPOS) + .value("mjWARN_BADQVEL", mjWARN_BADQVEL) + .value("mjWARN_BADQACC", mjWARN_BADQACC) + .value("mjWARN_BADCTRL", mjWARN_BADCTRL) + .value("mjNWARNING", mjNWARNING); + enum_("mjtWrap") + .value("mjWRAP_NONE", mjWRAP_NONE) + .value("mjWRAP_JOINT", mjWRAP_JOINT) + .value("mjWRAP_PULLEY", mjWRAP_PULLEY) + .value("mjWRAP_SITE", mjWRAP_SITE) + .value("mjWRAP_SPHERE", mjWRAP_SPHERE) + .value("mjWRAP_CYLINDER", mjWRAP_CYLINDER); + + emscripten::class_("MjContact") + .constructor<>() + .function("copy", &MjContact::copy, take_ownership()) + .property("H", &MjContact::H) + .property("dim", &MjContact::dim, &MjContact::set_dim, reference()) + .property("dist", &MjContact::dist, &MjContact::set_dist, reference()) + .property("efc_address", &MjContact::efc_address, &MjContact::set_efc_address, reference()) + .property("elem", &MjContact::elem) + .property("exclude", &MjContact::exclude, &MjContact::set_exclude, reference()) + .property("flex", &MjContact::flex) + .property("frame", &MjContact::frame) + .property("friction", &MjContact::friction) + .property("geom", &MjContact::geom) + .property("geom1", &MjContact::geom1, &MjContact::set_geom1, reference()) + .property("geom2", &MjContact::geom2, &MjContact::set_geom2, reference()) + .property("includemargin", &MjContact::includemargin, &MjContact::set_includemargin, reference()) + .property("mu", &MjContact::mu, &MjContact::set_mu, reference()) + .property("pos", &MjContact::pos) + .property("solimp", &MjContact::solimp) + .property("solref", &MjContact::solref) + .property("solreffriction", &MjContact::solreffriction) + .property("vert", &MjContact::vert); + emscripten::class_("MjData") + .constructor() + .constructor() + .property("M", &MjData::M) + .property("act", &MjData::act) + .property("act_dot", &MjData::act_dot) + .property("actuator_force", &MjData::actuator_force) + .property("actuator_length", &MjData::actuator_length) + .property("actuator_moment", &MjData::actuator_moment) + .property("actuator_velocity", &MjData::actuator_velocity) + .property("arena", &MjData::arena) + .property("body_awake", &MjData::body_awake) + .property("body_awake_ind", &MjData::body_awake_ind) + .property("buffer", &MjData::buffer) + .property("bvh_aabb_dyn", &MjData::bvh_aabb_dyn) + .property("bvh_active", &MjData::bvh_active) + .property("cacc", &MjData::cacc) + .property("cam_xmat", &MjData::cam_xmat) + .property("cam_xpos", &MjData::cam_xpos) + .property("cdof", &MjData::cdof) + .property("cdof_dot", &MjData::cdof_dot) + .property("cfrc_ext", &MjData::cfrc_ext) + .property("cfrc_int", &MjData::cfrc_int) + .property("cinert", &MjData::cinert) + .property("contact", &MjData::contact) + .property("crb", &MjData::crb) + .property("ctrl", &MjData::ctrl) + .property("cvel", &MjData::cvel) + .property("dof_awake_ind", &MjData::dof_awake_ind) + .property("dof_island", &MjData::dof_island) + .property("efc_AR", &MjData::efc_AR) + .property("efc_AR_colind", &MjData::efc_AR_colind) + .property("efc_AR_rowadr", &MjData::efc_AR_rowadr) + .property("efc_AR_rownnz", &MjData::efc_AR_rownnz) + .property("efc_D", &MjData::efc_D) + .property("efc_J", &MjData::efc_J) + .property("efc_J_colind", &MjData::efc_J_colind) + .property("efc_J_rowadr", &MjData::efc_J_rowadr) + .property("efc_J_rownnz", &MjData::efc_J_rownnz) + .property("efc_J_rowsuper", &MjData::efc_J_rowsuper) + .property("efc_KBIP", &MjData::efc_KBIP) + .property("efc_R", &MjData::efc_R) + .property("efc_aref", &MjData::efc_aref) + .property("efc_b", &MjData::efc_b) + .property("efc_diagApprox", &MjData::efc_diagApprox) + .property("efc_force", &MjData::efc_force) + .property("efc_frictionloss", &MjData::efc_frictionloss) + .property("efc_id", &MjData::efc_id) + .property("efc_island", &MjData::efc_island) + .property("efc_margin", &MjData::efc_margin) + .property("efc_pos", &MjData::efc_pos) + .property("efc_state", &MjData::efc_state) + .property("efc_type", &MjData::efc_type) + .property("efc_vel", &MjData::efc_vel) + .property("energy", &MjData::energy) + .property("eq_active", &MjData::eq_active) + .property("flexedge_J", &MjData::flexedge_J) + .property("flexedge_J_colind", &MjData::flexedge_J_colind) + .property("flexedge_J_rowadr", &MjData::flexedge_J_rowadr) + .property("flexedge_J_rownnz", &MjData::flexedge_J_rownnz) + .property("flexedge_length", &MjData::flexedge_length) + .property("flexedge_velocity", &MjData::flexedge_velocity) + .property("flexelem_aabb", &MjData::flexelem_aabb) + .property("flexvert_xpos", &MjData::flexvert_xpos) + .property("geom_xmat", &MjData::geom_xmat) + .property("geom_xpos", &MjData::geom_xpos) + .property("iLD", &MjData::iLD) + .property("iLDiagInv", &MjData::iLDiagInv) + .property("iM", &MjData::iM) + .property("iM_colind", &MjData::iM_colind) + .property("iM_rowadr", &MjData::iM_rowadr) + .property("iM_rownnz", &MjData::iM_rownnz) + .property("iacc", &MjData::iacc) + .property("iacc_smooth", &MjData::iacc_smooth) + .property("iefc_D", &MjData::iefc_D) + .property("iefc_J", &MjData::iefc_J) + .property("iefc_J_colind", &MjData::iefc_J_colind) + .property("iefc_J_rowadr", &MjData::iefc_J_rowadr) + .property("iefc_J_rownnz", &MjData::iefc_J_rownnz) + .property("iefc_J_rowsuper", &MjData::iefc_J_rowsuper) + .property("iefc_R", &MjData::iefc_R) + .property("iefc_aref", &MjData::iefc_aref) + .property("iefc_force", &MjData::iefc_force) + .property("iefc_frictionloss", &MjData::iefc_frictionloss) + .property("iefc_id", &MjData::iefc_id) + .property("iefc_state", &MjData::iefc_state) + .property("iefc_type", &MjData::iefc_type) + .property("ifrc_constraint", &MjData::ifrc_constraint) + .property("ifrc_smooth", &MjData::ifrc_smooth) + .property("island_dofadr", &MjData::island_dofadr) + .property("island_idofadr", &MjData::island_idofadr) + .property("island_iefcadr", &MjData::island_iefcadr) + .property("island_itreeadr", &MjData::island_itreeadr) + .property("island_ne", &MjData::island_ne) + .property("island_nefc", &MjData::island_nefc) + .property("island_nf", &MjData::island_nf) + .property("island_ntree", &MjData::island_ntree) + .property("island_nv", &MjData::island_nv) + .property("light_xdir", &MjData::light_xdir) + .property("light_xpos", &MjData::light_xpos) + .property("map_dof2idof", &MjData::map_dof2idof) + .property("map_efc2iefc", &MjData::map_efc2iefc) + .property("map_idof2dof", &MjData::map_idof2dof) + .property("map_iefc2efc", &MjData::map_iefc2efc) + .property("map_itree2tree", &MjData::map_itree2tree) + .property("maxuse_arena", &MjData::maxuse_arena, &MjData::set_maxuse_arena, reference()) + .property("maxuse_con", &MjData::maxuse_con, &MjData::set_maxuse_con, reference()) + .property("maxuse_efc", &MjData::maxuse_efc, &MjData::set_maxuse_efc, reference()) + .property("maxuse_stack", &MjData::maxuse_stack, &MjData::set_maxuse_stack, reference()) + .property("maxuse_threadstack", &MjData::maxuse_threadstack) + .property("mocap_pos", &MjData::mocap_pos) + .property("mocap_quat", &MjData::mocap_quat) + .property("moment_colind", &MjData::moment_colind) + .property("moment_rowadr", &MjData::moment_rowadr) + .property("moment_rownnz", &MjData::moment_rownnz) + .property("nA", &MjData::nA, &MjData::set_nA, reference()) + .property("nJ", &MjData::nJ, &MjData::set_nJ, reference()) + .property("narena", &MjData::narena, &MjData::set_narena, reference()) + .property("nbody_awake", &MjData::nbody_awake, &MjData::set_nbody_awake, reference()) + .property("nbuffer", &MjData::nbuffer, &MjData::set_nbuffer, reference()) + .property("ncon", &MjData::ncon, &MjData::set_ncon, reference()) + .property("ne", &MjData::ne, &MjData::set_ne, reference()) + .property("nefc", &MjData::nefc, &MjData::set_nefc, reference()) + .property("nf", &MjData::nf, &MjData::set_nf, reference()) + .property("nidof", &MjData::nidof, &MjData::set_nidof, reference()) + .property("nisland", &MjData::nisland, &MjData::set_nisland, reference()) + .property("nl", &MjData::nl, &MjData::set_nl, reference()) + .property("nparent_awake", &MjData::nparent_awake, &MjData::set_nparent_awake, reference()) + .property("nplugin", &MjData::nplugin, &MjData::set_nplugin, reference()) + .property("ntree_awake", &MjData::ntree_awake, &MjData::set_ntree_awake, reference()) + .property("nv_awake", &MjData::nv_awake, &MjData::set_nv_awake, reference()) + .property("parena", &MjData::parena, &MjData::set_parena, reference()) + .property("parent_awake_ind", &MjData::parent_awake_ind) + .property("pbase", &MjData::pbase, &MjData::set_pbase, reference()) + .property("plugin", &MjData::plugin) + .property("plugin_data", &MjData::plugin_data) + .property("plugin_state", &MjData::plugin_state) + .property("pstack", &MjData::pstack, &MjData::set_pstack, reference()) + .property("qDeriv", &MjData::qDeriv) + .property("qH", &MjData::qH) + .property("qHDiagInv", &MjData::qHDiagInv) + .property("qLD", &MjData::qLD) + .property("qLDiagInv", &MjData::qLDiagInv) + .property("qLU", &MjData::qLU) + .property("qM", &MjData::qM) + .property("qacc", &MjData::qacc) + .property("qacc_smooth", &MjData::qacc_smooth) + .property("qacc_warmstart", &MjData::qacc_warmstart) + .property("qfrc_actuator", &MjData::qfrc_actuator) + .property("qfrc_applied", &MjData::qfrc_applied) + .property("qfrc_bias", &MjData::qfrc_bias) + .property("qfrc_constraint", &MjData::qfrc_constraint) + .property("qfrc_damper", &MjData::qfrc_damper) + .property("qfrc_fluid", &MjData::qfrc_fluid) + .property("qfrc_gravcomp", &MjData::qfrc_gravcomp) + .property("qfrc_inverse", &MjData::qfrc_inverse) + .property("qfrc_passive", &MjData::qfrc_passive) + .property("qfrc_smooth", &MjData::qfrc_smooth) + .property("qfrc_spring", &MjData::qfrc_spring) + .property("qpos", &MjData::qpos) + .property("qvel", &MjData::qvel) + .property("sensordata", &MjData::sensordata) + .property("signature", &MjData::signature, &MjData::set_signature, reference()) + .property("site_xmat", &MjData::site_xmat) + .property("site_xpos", &MjData::site_xpos) + .property("solver", &MjData::solver, reference()) + .property("solver_fwdinv", &MjData::solver_fwdinv) + .property("solver_niter", &MjData::solver_niter) + .property("solver_nnz", &MjData::solver_nnz) + .property("subtree_angmom", &MjData::subtree_angmom) + .property("subtree_com", &MjData::subtree_com) + .property("subtree_linvel", &MjData::subtree_linvel) + .property("ten_J", &MjData::ten_J) + .property("ten_J_colind", &MjData::ten_J_colind) + .property("ten_J_rowadr", &MjData::ten_J_rowadr) + .property("ten_J_rownnz", &MjData::ten_J_rownnz) + .property("ten_length", &MjData::ten_length) + .property("ten_velocity", &MjData::ten_velocity) + .property("ten_wrapadr", &MjData::ten_wrapadr) + .property("ten_wrapnum", &MjData::ten_wrapnum) + .property("tendon_efcadr", &MjData::tendon_efcadr) + .property("threadpool", &MjData::threadpool, &MjData::set_threadpool, reference()) + .property("time", &MjData::time, &MjData::set_time, reference()) + .property("timer", &MjData::timer, reference()) + .property("tree_asleep", &MjData::tree_asleep) + .property("tree_awake", &MjData::tree_awake) + .property("tree_island", &MjData::tree_island) + .property("userdata", &MjData::userdata) + .property("warning", &MjData::warning, reference()) + .property("wrap_obj", &MjData::wrap_obj) + .property("wrap_xpos", &MjData::wrap_xpos) + .property("xanchor", &MjData::xanchor) + .property("xaxis", &MjData::xaxis) + .property("xfrc_applied", &MjData::xfrc_applied) + .property("ximat", &MjData::ximat) + .property("xipos", &MjData::xipos) + .property("xmat", &MjData::xmat) + .property("xpos", &MjData::xpos) + .property("xquat", &MjData::xquat); + emscripten::class_("MjLROpt") + .constructor<>() + .function("copy", &MjLROpt::copy, take_ownership()) + .property("accel", &MjLROpt::accel, &MjLROpt::set_accel, reference()) + .property("interval", &MjLROpt::interval, &MjLROpt::set_interval, reference()) + .property("inttotal", &MjLROpt::inttotal, &MjLROpt::set_inttotal, reference()) + .property("maxforce", &MjLROpt::maxforce, &MjLROpt::set_maxforce, reference()) + .property("mode", &MjLROpt::mode, &MjLROpt::set_mode, reference()) + .property("timeconst", &MjLROpt::timeconst, &MjLROpt::set_timeconst, reference()) + .property("timestep", &MjLROpt::timestep, &MjLROpt::set_timestep, reference()) + .property("tolrange", &MjLROpt::tolrange, &MjLROpt::set_tolrange, reference()) + .property("useexisting", &MjLROpt::useexisting, &MjLROpt::set_useexisting, reference()) + .property("uselimit", &MjLROpt::uselimit, &MjLROpt::set_uselimit, reference()); + emscripten::class_("MjModel") + .class_function("loadFromXML", &loadFromXML_wrapper, take_ownership()) + .constructor() + .property("B_colind", &MjModel::B_colind) + .property("B_rowadr", &MjModel::B_rowadr) + .property("B_rownnz", &MjModel::B_rownnz) + .property("D_colind", &MjModel::D_colind) + .property("D_diag", &MjModel::D_diag) + .property("D_rowadr", &MjModel::D_rowadr) + .property("D_rownnz", &MjModel::D_rownnz) + .property("M_colind", &MjModel::M_colind) + .property("M_rowadr", &MjModel::M_rowadr) + .property("M_rownnz", &MjModel::M_rownnz) + .property("actuator_acc0", &MjModel::actuator_acc0) + .property("actuator_actadr", &MjModel::actuator_actadr) + .property("actuator_actearly", &MjModel::actuator_actearly) + .property("actuator_actlimited", &MjModel::actuator_actlimited) + .property("actuator_actnum", &MjModel::actuator_actnum) + .property("actuator_actrange", &MjModel::actuator_actrange) + .property("actuator_biasprm", &MjModel::actuator_biasprm) + .property("actuator_biastype", &MjModel::actuator_biastype) + .property("actuator_cranklength", &MjModel::actuator_cranklength) + .property("actuator_ctrllimited", &MjModel::actuator_ctrllimited) + .property("actuator_ctrlrange", &MjModel::actuator_ctrlrange) + .property("actuator_dynprm", &MjModel::actuator_dynprm) + .property("actuator_dyntype", &MjModel::actuator_dyntype) + .property("actuator_forcelimited", &MjModel::actuator_forcelimited) + .property("actuator_forcerange", &MjModel::actuator_forcerange) + .property("actuator_gainprm", &MjModel::actuator_gainprm) + .property("actuator_gaintype", &MjModel::actuator_gaintype) + .property("actuator_gear", &MjModel::actuator_gear) + .property("actuator_group", &MjModel::actuator_group) + .property("actuator_length0", &MjModel::actuator_length0) + .property("actuator_lengthrange", &MjModel::actuator_lengthrange) + .property("actuator_plugin", &MjModel::actuator_plugin) + .property("actuator_trnid", &MjModel::actuator_trnid) + .property("actuator_trntype", &MjModel::actuator_trntype) + .property("actuator_user", &MjModel::actuator_user) + .property("body_bvhadr", &MjModel::body_bvhadr) + .property("body_bvhnum", &MjModel::body_bvhnum) + .property("body_conaffinity", &MjModel::body_conaffinity) + .property("body_contype", &MjModel::body_contype) + .property("body_dofadr", &MjModel::body_dofadr) + .property("body_dofnum", &MjModel::body_dofnum) + .property("body_geomadr", &MjModel::body_geomadr) + .property("body_geomnum", &MjModel::body_geomnum) + .property("body_gravcomp", &MjModel::body_gravcomp) + .property("body_inertia", &MjModel::body_inertia) + .property("body_invweight0", &MjModel::body_invweight0) + .property("body_ipos", &MjModel::body_ipos) + .property("body_iquat", &MjModel::body_iquat) + .property("body_jntadr", &MjModel::body_jntadr) + .property("body_jntnum", &MjModel::body_jntnum) + .property("body_margin", &MjModel::body_margin) + .property("body_mass", &MjModel::body_mass) + .property("body_mocapid", &MjModel::body_mocapid) + .property("body_parentid", &MjModel::body_parentid) + .property("body_plugin", &MjModel::body_plugin) + .property("body_pos", &MjModel::body_pos) + .property("body_quat", &MjModel::body_quat) + .property("body_rootid", &MjModel::body_rootid) + .property("body_sameframe", &MjModel::body_sameframe) + .property("body_simple", &MjModel::body_simple) + .property("body_subtreemass", &MjModel::body_subtreemass) + .property("body_treeid", &MjModel::body_treeid) + .property("body_user", &MjModel::body_user) + .property("body_weldid", &MjModel::body_weldid) + .property("buffer", &MjModel::buffer) + .property("bvh_aabb", &MjModel::bvh_aabb) + .property("bvh_child", &MjModel::bvh_child) + .property("bvh_depth", &MjModel::bvh_depth) + .property("bvh_nodeid", &MjModel::bvh_nodeid) + .property("cam_bodyid", &MjModel::cam_bodyid) + .property("cam_fovy", &MjModel::cam_fovy) + .property("cam_intrinsic", &MjModel::cam_intrinsic) + .property("cam_ipd", &MjModel::cam_ipd) + .property("cam_mat0", &MjModel::cam_mat0) + .property("cam_mode", &MjModel::cam_mode) + .property("cam_orthographic", &MjModel::cam_orthographic) + .property("cam_pos", &MjModel::cam_pos) + .property("cam_pos0", &MjModel::cam_pos0) + .property("cam_poscom0", &MjModel::cam_poscom0) + .property("cam_quat", &MjModel::cam_quat) + .property("cam_resolution", &MjModel::cam_resolution) + .property("cam_sensorsize", &MjModel::cam_sensorsize) + .property("cam_targetbodyid", &MjModel::cam_targetbodyid) + .property("cam_user", &MjModel::cam_user) + .property("dof_M0", &MjModel::dof_M0) + .property("dof_Madr", &MjModel::dof_Madr) + .property("dof_armature", &MjModel::dof_armature) + .property("dof_bodyid", &MjModel::dof_bodyid) + .property("dof_damping", &MjModel::dof_damping) + .property("dof_frictionloss", &MjModel::dof_frictionloss) + .property("dof_invweight0", &MjModel::dof_invweight0) + .property("dof_jntid", &MjModel::dof_jntid) + .property("dof_length", &MjModel::dof_length) + .property("dof_parentid", &MjModel::dof_parentid) + .property("dof_simplenum", &MjModel::dof_simplenum) + .property("dof_solimp", &MjModel::dof_solimp) + .property("dof_solref", &MjModel::dof_solref) + .property("dof_treeid", &MjModel::dof_treeid) + .property("eq_active0", &MjModel::eq_active0) + .property("eq_data", &MjModel::eq_data) + .property("eq_obj1id", &MjModel::eq_obj1id) + .property("eq_obj2id", &MjModel::eq_obj2id) + .property("eq_objtype", &MjModel::eq_objtype) + .property("eq_solimp", &MjModel::eq_solimp) + .property("eq_solref", &MjModel::eq_solref) + .property("eq_type", &MjModel::eq_type) + .property("exclude_signature", &MjModel::exclude_signature) + .property("flex_activelayers", &MjModel::flex_activelayers) + .property("flex_bending", &MjModel::flex_bending) + .property("flex_bvhadr", &MjModel::flex_bvhadr) + .property("flex_bvhnum", &MjModel::flex_bvhnum) + .property("flex_centered", &MjModel::flex_centered) + .property("flex_conaffinity", &MjModel::flex_conaffinity) + .property("flex_condim", &MjModel::flex_condim) + .property("flex_contype", &MjModel::flex_contype) + .property("flex_damping", &MjModel::flex_damping) + .property("flex_dim", &MjModel::flex_dim) + .property("flex_edge", &MjModel::flex_edge) + .property("flex_edgeadr", &MjModel::flex_edgeadr) + .property("flex_edgedamping", &MjModel::flex_edgedamping) + .property("flex_edgeequality", &MjModel::flex_edgeequality) + .property("flex_edgeflap", &MjModel::flex_edgeflap) + .property("flex_edgenum", &MjModel::flex_edgenum) + .property("flex_edgestiffness", &MjModel::flex_edgestiffness) + .property("flex_elem", &MjModel::flex_elem) + .property("flex_elemadr", &MjModel::flex_elemadr) + .property("flex_elemdataadr", &MjModel::flex_elemdataadr) + .property("flex_elemedge", &MjModel::flex_elemedge) + .property("flex_elemedgeadr", &MjModel::flex_elemedgeadr) + .property("flex_elemlayer", &MjModel::flex_elemlayer) + .property("flex_elemnum", &MjModel::flex_elemnum) + .property("flex_elemtexcoord", &MjModel::flex_elemtexcoord) + .property("flex_evpair", &MjModel::flex_evpair) + .property("flex_evpairadr", &MjModel::flex_evpairadr) + .property("flex_evpairnum", &MjModel::flex_evpairnum) + .property("flex_flatskin", &MjModel::flex_flatskin) + .property("flex_friction", &MjModel::flex_friction) + .property("flex_gap", &MjModel::flex_gap) + .property("flex_group", &MjModel::flex_group) + .property("flex_internal", &MjModel::flex_internal) + .property("flex_interp", &MjModel::flex_interp) + .property("flex_margin", &MjModel::flex_margin) + .property("flex_matid", &MjModel::flex_matid) + .property("flex_node", &MjModel::flex_node) + .property("flex_node0", &MjModel::flex_node0) + .property("flex_nodeadr", &MjModel::flex_nodeadr) + .property("flex_nodebodyid", &MjModel::flex_nodebodyid) + .property("flex_nodenum", &MjModel::flex_nodenum) + .property("flex_passive", &MjModel::flex_passive) + .property("flex_priority", &MjModel::flex_priority) + .property("flex_radius", &MjModel::flex_radius) + .property("flex_rgba", &MjModel::flex_rgba) + .property("flex_rigid", &MjModel::flex_rigid) + .property("flex_selfcollide", &MjModel::flex_selfcollide) + .property("flex_shell", &MjModel::flex_shell) + .property("flex_shelldataadr", &MjModel::flex_shelldataadr) + .property("flex_shellnum", &MjModel::flex_shellnum) + .property("flex_solimp", &MjModel::flex_solimp) + .property("flex_solmix", &MjModel::flex_solmix) + .property("flex_solref", &MjModel::flex_solref) + .property("flex_stiffness", &MjModel::flex_stiffness) + .property("flex_texcoord", &MjModel::flex_texcoord) + .property("flex_texcoordadr", &MjModel::flex_texcoordadr) + .property("flex_vert", &MjModel::flex_vert) + .property("flex_vert0", &MjModel::flex_vert0) + .property("flex_vertadr", &MjModel::flex_vertadr) + .property("flex_vertbodyid", &MjModel::flex_vertbodyid) + .property("flex_vertnum", &MjModel::flex_vertnum) + .property("flexedge_invweight0", &MjModel::flexedge_invweight0) + .property("flexedge_length0", &MjModel::flexedge_length0) + .property("flexedge_rigid", &MjModel::flexedge_rigid) + .property("geom_aabb", &MjModel::geom_aabb) + .property("geom_bodyid", &MjModel::geom_bodyid) + .property("geom_conaffinity", &MjModel::geom_conaffinity) + .property("geom_condim", &MjModel::geom_condim) + .property("geom_contype", &MjModel::geom_contype) + .property("geom_dataid", &MjModel::geom_dataid) + .property("geom_fluid", &MjModel::geom_fluid) + .property("geom_friction", &MjModel::geom_friction) + .property("geom_gap", &MjModel::geom_gap) + .property("geom_group", &MjModel::geom_group) + .property("geom_margin", &MjModel::geom_margin) + .property("geom_matid", &MjModel::geom_matid) + .property("geom_plugin", &MjModel::geom_plugin) + .property("geom_pos", &MjModel::geom_pos) + .property("geom_priority", &MjModel::geom_priority) + .property("geom_quat", &MjModel::geom_quat) + .property("geom_rbound", &MjModel::geom_rbound) + .property("geom_rgba", &MjModel::geom_rgba) + .property("geom_sameframe", &MjModel::geom_sameframe) + .property("geom_size", &MjModel::geom_size) + .property("geom_solimp", &MjModel::geom_solimp) + .property("geom_solmix", &MjModel::geom_solmix) + .property("geom_solref", &MjModel::geom_solref) + .property("geom_type", &MjModel::geom_type) + .property("geom_user", &MjModel::geom_user) + .property("hfield_adr", &MjModel::hfield_adr) + .property("hfield_data", &MjModel::hfield_data) + .property("hfield_ncol", &MjModel::hfield_ncol) + .property("hfield_nrow", &MjModel::hfield_nrow) + .property("hfield_pathadr", &MjModel::hfield_pathadr) + .property("hfield_size", &MjModel::hfield_size) + .property("jnt_actfrclimited", &MjModel::jnt_actfrclimited) + .property("jnt_actfrcrange", &MjModel::jnt_actfrcrange) + .property("jnt_actgravcomp", &MjModel::jnt_actgravcomp) + .property("jnt_axis", &MjModel::jnt_axis) + .property("jnt_bodyid", &MjModel::jnt_bodyid) + .property("jnt_dofadr", &MjModel::jnt_dofadr) + .property("jnt_group", &MjModel::jnt_group) + .property("jnt_limited", &MjModel::jnt_limited) + .property("jnt_margin", &MjModel::jnt_margin) + .property("jnt_pos", &MjModel::jnt_pos) + .property("jnt_qposadr", &MjModel::jnt_qposadr) + .property("jnt_range", &MjModel::jnt_range) + .property("jnt_solimp", &MjModel::jnt_solimp) + .property("jnt_solref", &MjModel::jnt_solref) + .property("jnt_stiffness", &MjModel::jnt_stiffness) + .property("jnt_type", &MjModel::jnt_type) + .property("jnt_user", &MjModel::jnt_user) + .property("key_act", &MjModel::key_act) + .property("key_ctrl", &MjModel::key_ctrl) + .property("key_mpos", &MjModel::key_mpos) + .property("key_mquat", &MjModel::key_mquat) + .property("key_qpos", &MjModel::key_qpos) + .property("key_qvel", &MjModel::key_qvel) + .property("key_time", &MjModel::key_time) + .property("light_active", &MjModel::light_active) + .property("light_ambient", &MjModel::light_ambient) + .property("light_attenuation", &MjModel::light_attenuation) + .property("light_bodyid", &MjModel::light_bodyid) + .property("light_bulbradius", &MjModel::light_bulbradius) + .property("light_castshadow", &MjModel::light_castshadow) + .property("light_cutoff", &MjModel::light_cutoff) + .property("light_diffuse", &MjModel::light_diffuse) + .property("light_dir", &MjModel::light_dir) + .property("light_dir0", &MjModel::light_dir0) + .property("light_exponent", &MjModel::light_exponent) + .property("light_intensity", &MjModel::light_intensity) + .property("light_mode", &MjModel::light_mode) + .property("light_pos", &MjModel::light_pos) + .property("light_pos0", &MjModel::light_pos0) + .property("light_poscom0", &MjModel::light_poscom0) + .property("light_range", &MjModel::light_range) + .property("light_specular", &MjModel::light_specular) + .property("light_targetbodyid", &MjModel::light_targetbodyid) + .property("light_texid", &MjModel::light_texid) + .property("light_type", &MjModel::light_type) + .property("mapD2M", &MjModel::mapD2M) + .property("mapM2D", &MjModel::mapM2D) + .property("mapM2M", &MjModel::mapM2M) + .property("mat_emission", &MjModel::mat_emission) + .property("mat_metallic", &MjModel::mat_metallic) + .property("mat_reflectance", &MjModel::mat_reflectance) + .property("mat_rgba", &MjModel::mat_rgba) + .property("mat_roughness", &MjModel::mat_roughness) + .property("mat_shininess", &MjModel::mat_shininess) + .property("mat_specular", &MjModel::mat_specular) + .property("mat_texid", &MjModel::mat_texid) + .property("mat_texrepeat", &MjModel::mat_texrepeat) + .property("mat_texuniform", &MjModel::mat_texuniform) + .property("mesh_bvhadr", &MjModel::mesh_bvhadr) + .property("mesh_bvhnum", &MjModel::mesh_bvhnum) + .property("mesh_face", &MjModel::mesh_face) + .property("mesh_faceadr", &MjModel::mesh_faceadr) + .property("mesh_facenormal", &MjModel::mesh_facenormal) + .property("mesh_facenum", &MjModel::mesh_facenum) + .property("mesh_facetexcoord", &MjModel::mesh_facetexcoord) + .property("mesh_graph", &MjModel::mesh_graph) + .property("mesh_graphadr", &MjModel::mesh_graphadr) + .property("mesh_normal", &MjModel::mesh_normal) + .property("mesh_normaladr", &MjModel::mesh_normaladr) + .property("mesh_normalnum", &MjModel::mesh_normalnum) + .property("mesh_octadr", &MjModel::mesh_octadr) + .property("mesh_octnum", &MjModel::mesh_octnum) + .property("mesh_pathadr", &MjModel::mesh_pathadr) + .property("mesh_polyadr", &MjModel::mesh_polyadr) + .property("mesh_polymap", &MjModel::mesh_polymap) + .property("mesh_polymapadr", &MjModel::mesh_polymapadr) + .property("mesh_polymapnum", &MjModel::mesh_polymapnum) + .property("mesh_polynormal", &MjModel::mesh_polynormal) + .property("mesh_polynum", &MjModel::mesh_polynum) + .property("mesh_polyvert", &MjModel::mesh_polyvert) + .property("mesh_polyvertadr", &MjModel::mesh_polyvertadr) + .property("mesh_polyvertnum", &MjModel::mesh_polyvertnum) + .property("mesh_pos", &MjModel::mesh_pos) + .property("mesh_quat", &MjModel::mesh_quat) + .property("mesh_scale", &MjModel::mesh_scale) + .property("mesh_texcoord", &MjModel::mesh_texcoord) + .property("mesh_texcoordadr", &MjModel::mesh_texcoordadr) + .property("mesh_texcoordnum", &MjModel::mesh_texcoordnum) + .property("mesh_vert", &MjModel::mesh_vert) + .property("mesh_vertadr", &MjModel::mesh_vertadr) + .property("mesh_vertnum", &MjModel::mesh_vertnum) + .property("nB", &MjModel::nB, &MjModel::set_nB, reference()) + .property("nC", &MjModel::nC, &MjModel::set_nC, reference()) + .property("nD", &MjModel::nD, &MjModel::set_nD, reference()) + .property("nJmom", &MjModel::nJmom, &MjModel::set_nJmom, reference()) + .property("nM", &MjModel::nM, &MjModel::set_nM, reference()) + .property("na", &MjModel::na, &MjModel::set_na, reference()) + .property("name_actuatoradr", &MjModel::name_actuatoradr) + .property("name_bodyadr", &MjModel::name_bodyadr) + .property("name_camadr", &MjModel::name_camadr) + .property("name_eqadr", &MjModel::name_eqadr) + .property("name_excludeadr", &MjModel::name_excludeadr) + .property("name_flexadr", &MjModel::name_flexadr) + .property("name_geomadr", &MjModel::name_geomadr) + .property("name_hfieldadr", &MjModel::name_hfieldadr) + .property("name_jntadr", &MjModel::name_jntadr) + .property("name_keyadr", &MjModel::name_keyadr) + .property("name_lightadr", &MjModel::name_lightadr) + .property("name_matadr", &MjModel::name_matadr) + .property("name_meshadr", &MjModel::name_meshadr) + .property("name_numericadr", &MjModel::name_numericadr) + .property("name_pairadr", &MjModel::name_pairadr) + .property("name_pluginadr", &MjModel::name_pluginadr) + .property("name_sensoradr", &MjModel::name_sensoradr) + .property("name_siteadr", &MjModel::name_siteadr) + .property("name_skinadr", &MjModel::name_skinadr) + .property("name_tendonadr", &MjModel::name_tendonadr) + .property("name_texadr", &MjModel::name_texadr) + .property("name_textadr", &MjModel::name_textadr) + .property("name_tupleadr", &MjModel::name_tupleadr) + .property("names", &MjModel::names) + .property("names_map", &MjModel::names_map) + .property("narena", &MjModel::narena, &MjModel::set_narena, reference()) + .property("nbody", &MjModel::nbody, &MjModel::set_nbody, reference()) + .property("nbuffer", &MjModel::nbuffer, &MjModel::set_nbuffer, reference()) + .property("nbvh", &MjModel::nbvh, &MjModel::set_nbvh, reference()) + .property("nbvhdynamic", &MjModel::nbvhdynamic, &MjModel::set_nbvhdynamic, reference()) + .property("nbvhstatic", &MjModel::nbvhstatic, &MjModel::set_nbvhstatic, reference()) + .property("ncam", &MjModel::ncam, &MjModel::set_ncam, reference()) + .property("nconmax", &MjModel::nconmax, &MjModel::set_nconmax, reference()) + .property("nemax", &MjModel::nemax, &MjModel::set_nemax, reference()) + .property("neq", &MjModel::neq, &MjModel::set_neq, reference()) + .property("nexclude", &MjModel::nexclude, &MjModel::set_nexclude, reference()) + .property("nflex", &MjModel::nflex, &MjModel::set_nflex, reference()) + .property("nflexedge", &MjModel::nflexedge, &MjModel::set_nflexedge, reference()) + .property("nflexelem", &MjModel::nflexelem, &MjModel::set_nflexelem, reference()) + .property("nflexelemdata", &MjModel::nflexelemdata, &MjModel::set_nflexelemdata, reference()) + .property("nflexelemedge", &MjModel::nflexelemedge, &MjModel::set_nflexelemedge, reference()) + .property("nflexevpair", &MjModel::nflexevpair, &MjModel::set_nflexevpair, reference()) + .property("nflexnode", &MjModel::nflexnode, &MjModel::set_nflexnode, reference()) + .property("nflexshelldata", &MjModel::nflexshelldata, &MjModel::set_nflexshelldata, reference()) + .property("nflextexcoord", &MjModel::nflextexcoord, &MjModel::set_nflextexcoord, reference()) + .property("nflexvert", &MjModel::nflexvert, &MjModel::set_nflexvert, reference()) + .property("ngeom", &MjModel::ngeom, &MjModel::set_ngeom, reference()) + .property("ngravcomp", &MjModel::ngravcomp, &MjModel::set_ngravcomp, reference()) + .property("nhfield", &MjModel::nhfield, &MjModel::set_nhfield, reference()) + .property("nhfielddata", &MjModel::nhfielddata, &MjModel::set_nhfielddata, reference()) + .property("njmax", &MjModel::njmax, &MjModel::set_njmax, reference()) + .property("njnt", &MjModel::njnt, &MjModel::set_njnt, reference()) + .property("nkey", &MjModel::nkey, &MjModel::set_nkey, reference()) + .property("nlight", &MjModel::nlight, &MjModel::set_nlight, reference()) + .property("nmat", &MjModel::nmat, &MjModel::set_nmat, reference()) + .property("nmesh", &MjModel::nmesh, &MjModel::set_nmesh, reference()) + .property("nmeshface", &MjModel::nmeshface, &MjModel::set_nmeshface, reference()) + .property("nmeshgraph", &MjModel::nmeshgraph, &MjModel::set_nmeshgraph, reference()) + .property("nmeshnormal", &MjModel::nmeshnormal, &MjModel::set_nmeshnormal, reference()) + .property("nmeshpoly", &MjModel::nmeshpoly, &MjModel::set_nmeshpoly, reference()) + .property("nmeshpolymap", &MjModel::nmeshpolymap, &MjModel::set_nmeshpolymap, reference()) + .property("nmeshpolyvert", &MjModel::nmeshpolyvert, &MjModel::set_nmeshpolyvert, reference()) + .property("nmeshtexcoord", &MjModel::nmeshtexcoord, &MjModel::set_nmeshtexcoord, reference()) + .property("nmeshvert", &MjModel::nmeshvert, &MjModel::set_nmeshvert, reference()) + .property("nmocap", &MjModel::nmocap, &MjModel::set_nmocap, reference()) + .property("nnames", &MjModel::nnames, &MjModel::set_nnames, reference()) + .property("nnames_map", &MjModel::nnames_map, &MjModel::set_nnames_map, reference()) + .property("nnumeric", &MjModel::nnumeric, &MjModel::set_nnumeric, reference()) + .property("nnumericdata", &MjModel::nnumericdata, &MjModel::set_nnumericdata, reference()) + .property("noct", &MjModel::noct, &MjModel::set_noct, reference()) + .property("npair", &MjModel::npair, &MjModel::set_npair, reference()) + .property("npaths", &MjModel::npaths, &MjModel::set_npaths, reference()) + .property("nplugin", &MjModel::nplugin, &MjModel::set_nplugin, reference()) + .property("npluginattr", &MjModel::npluginattr, &MjModel::set_npluginattr, reference()) + .property("npluginstate", &MjModel::npluginstate, &MjModel::set_npluginstate, reference()) + .property("nq", &MjModel::nq, &MjModel::set_nq, reference()) + .property("nsensor", &MjModel::nsensor, &MjModel::set_nsensor, reference()) + .property("nsensordata", &MjModel::nsensordata, &MjModel::set_nsensordata, reference()) + .property("nsite", &MjModel::nsite, &MjModel::set_nsite, reference()) + .property("nskin", &MjModel::nskin, &MjModel::set_nskin, reference()) + .property("nskinbone", &MjModel::nskinbone, &MjModel::set_nskinbone, reference()) + .property("nskinbonevert", &MjModel::nskinbonevert, &MjModel::set_nskinbonevert, reference()) + .property("nskinface", &MjModel::nskinface, &MjModel::set_nskinface, reference()) + .property("nskintexvert", &MjModel::nskintexvert, &MjModel::set_nskintexvert, reference()) + .property("nskinvert", &MjModel::nskinvert, &MjModel::set_nskinvert, reference()) + .property("ntendon", &MjModel::ntendon, &MjModel::set_ntendon, reference()) + .property("ntex", &MjModel::ntex, &MjModel::set_ntex, reference()) + .property("ntexdata", &MjModel::ntexdata, &MjModel::set_ntexdata, reference()) + .property("ntext", &MjModel::ntext, &MjModel::set_ntext, reference()) + .property("ntextdata", &MjModel::ntextdata, &MjModel::set_ntextdata, reference()) + .property("ntree", &MjModel::ntree, &MjModel::set_ntree, reference()) + .property("ntuple", &MjModel::ntuple, &MjModel::set_ntuple, reference()) + .property("ntupledata", &MjModel::ntupledata, &MjModel::set_ntupledata, reference()) + .property("nu", &MjModel::nu, &MjModel::set_nu, reference()) + .property("numeric_adr", &MjModel::numeric_adr) + .property("numeric_data", &MjModel::numeric_data) + .property("numeric_size", &MjModel::numeric_size) + .property("nuser_actuator", &MjModel::nuser_actuator, &MjModel::set_nuser_actuator, reference()) + .property("nuser_body", &MjModel::nuser_body, &MjModel::set_nuser_body, reference()) + .property("nuser_cam", &MjModel::nuser_cam, &MjModel::set_nuser_cam, reference()) + .property("nuser_geom", &MjModel::nuser_geom, &MjModel::set_nuser_geom, reference()) + .property("nuser_jnt", &MjModel::nuser_jnt, &MjModel::set_nuser_jnt, reference()) + .property("nuser_sensor", &MjModel::nuser_sensor, &MjModel::set_nuser_sensor, reference()) + .property("nuser_site", &MjModel::nuser_site, &MjModel::set_nuser_site, reference()) + .property("nuser_tendon", &MjModel::nuser_tendon, &MjModel::set_nuser_tendon, reference()) + .property("nuserdata", &MjModel::nuserdata, &MjModel::set_nuserdata, reference()) + .property("nv", &MjModel::nv, &MjModel::set_nv, reference()) + .property("nwrap", &MjModel::nwrap, &MjModel::set_nwrap, reference()) + .property("oct_aabb", &MjModel::oct_aabb) + .property("oct_child", &MjModel::oct_child) + .property("oct_coeff", &MjModel::oct_coeff) + .property("oct_depth", &MjModel::oct_depth) + .property("opt", &MjModel::opt, reference()) + .property("pair_dim", &MjModel::pair_dim) + .property("pair_friction", &MjModel::pair_friction) + .property("pair_gap", &MjModel::pair_gap) + .property("pair_geom1", &MjModel::pair_geom1) + .property("pair_geom2", &MjModel::pair_geom2) + .property("pair_margin", &MjModel::pair_margin) + .property("pair_signature", &MjModel::pair_signature) + .property("pair_solimp", &MjModel::pair_solimp) + .property("pair_solref", &MjModel::pair_solref) + .property("pair_solreffriction", &MjModel::pair_solreffriction) + .property("paths", &MjModel::paths) + .property("plugin", &MjModel::plugin) + .property("plugin_attr", &MjModel::plugin_attr) + .property("plugin_attradr", &MjModel::plugin_attradr) + .property("plugin_stateadr", &MjModel::plugin_stateadr) + .property("plugin_statenum", &MjModel::plugin_statenum) + .property("qpos0", &MjModel::qpos0) + .property("qpos_spring", &MjModel::qpos_spring) + .property("sensor_adr", &MjModel::sensor_adr) + .property("sensor_cutoff", &MjModel::sensor_cutoff) + .property("sensor_datatype", &MjModel::sensor_datatype) + .property("sensor_dim", &MjModel::sensor_dim) + .property("sensor_intprm", &MjModel::sensor_intprm) + .property("sensor_needstage", &MjModel::sensor_needstage) + .property("sensor_noise", &MjModel::sensor_noise) + .property("sensor_objid", &MjModel::sensor_objid) + .property("sensor_objtype", &MjModel::sensor_objtype) + .property("sensor_plugin", &MjModel::sensor_plugin) + .property("sensor_refid", &MjModel::sensor_refid) + .property("sensor_reftype", &MjModel::sensor_reftype) + .property("sensor_type", &MjModel::sensor_type) + .property("sensor_user", &MjModel::sensor_user) + .property("signature", &MjModel::signature, &MjModel::set_signature, reference()) + .property("site_bodyid", &MjModel::site_bodyid) + .property("site_group", &MjModel::site_group) + .property("site_matid", &MjModel::site_matid) + .property("site_pos", &MjModel::site_pos) + .property("site_quat", &MjModel::site_quat) + .property("site_rgba", &MjModel::site_rgba) + .property("site_sameframe", &MjModel::site_sameframe) + .property("site_size", &MjModel::site_size) + .property("site_type", &MjModel::site_type) + .property("site_user", &MjModel::site_user) + .property("skin_boneadr", &MjModel::skin_boneadr) + .property("skin_bonebindpos", &MjModel::skin_bonebindpos) + .property("skin_bonebindquat", &MjModel::skin_bonebindquat) + .property("skin_bonebodyid", &MjModel::skin_bonebodyid) + .property("skin_bonenum", &MjModel::skin_bonenum) + .property("skin_bonevertadr", &MjModel::skin_bonevertadr) + .property("skin_bonevertid", &MjModel::skin_bonevertid) + .property("skin_bonevertnum", &MjModel::skin_bonevertnum) + .property("skin_bonevertweight", &MjModel::skin_bonevertweight) + .property("skin_face", &MjModel::skin_face) + .property("skin_faceadr", &MjModel::skin_faceadr) + .property("skin_facenum", &MjModel::skin_facenum) + .property("skin_group", &MjModel::skin_group) + .property("skin_inflate", &MjModel::skin_inflate) + .property("skin_matid", &MjModel::skin_matid) + .property("skin_pathadr", &MjModel::skin_pathadr) + .property("skin_rgba", &MjModel::skin_rgba) + .property("skin_texcoord", &MjModel::skin_texcoord) + .property("skin_texcoordadr", &MjModel::skin_texcoordadr) + .property("skin_vert", &MjModel::skin_vert) + .property("skin_vertadr", &MjModel::skin_vertadr) + .property("skin_vertnum", &MjModel::skin_vertnum) + .property("stat", &MjModel::stat, reference()) + .property("tendon_actfrclimited", &MjModel::tendon_actfrclimited) + .property("tendon_actfrcrange", &MjModel::tendon_actfrcrange) + .property("tendon_adr", &MjModel::tendon_adr) + .property("tendon_armature", &MjModel::tendon_armature) + .property("tendon_damping", &MjModel::tendon_damping) + .property("tendon_frictionloss", &MjModel::tendon_frictionloss) + .property("tendon_group", &MjModel::tendon_group) + .property("tendon_invweight0", &MjModel::tendon_invweight0) + .property("tendon_length0", &MjModel::tendon_length0) + .property("tendon_lengthspring", &MjModel::tendon_lengthspring) + .property("tendon_limited", &MjModel::tendon_limited) + .property("tendon_margin", &MjModel::tendon_margin) + .property("tendon_matid", &MjModel::tendon_matid) + .property("tendon_num", &MjModel::tendon_num) + .property("tendon_range", &MjModel::tendon_range) + .property("tendon_rgba", &MjModel::tendon_rgba) + .property("tendon_solimp_fri", &MjModel::tendon_solimp_fri) + .property("tendon_solimp_lim", &MjModel::tendon_solimp_lim) + .property("tendon_solref_fri", &MjModel::tendon_solref_fri) + .property("tendon_solref_lim", &MjModel::tendon_solref_lim) + .property("tendon_stiffness", &MjModel::tendon_stiffness) + .property("tendon_treeid", &MjModel::tendon_treeid) + .property("tendon_treenum", &MjModel::tendon_treenum) + .property("tendon_user", &MjModel::tendon_user) + .property("tendon_width", &MjModel::tendon_width) + .property("tex_adr", &MjModel::tex_adr) + .property("tex_colorspace", &MjModel::tex_colorspace) + .property("tex_data", &MjModel::tex_data) + .property("tex_height", &MjModel::tex_height) + .property("tex_nchannel", &MjModel::tex_nchannel) + .property("tex_pathadr", &MjModel::tex_pathadr) + .property("tex_type", &MjModel::tex_type) + .property("tex_width", &MjModel::tex_width) + .property("text_adr", &MjModel::text_adr) + .property("text_data", &MjModel::text_data) + .property("text_size", &MjModel::text_size) + .property("tree_bodyadr", &MjModel::tree_bodyadr) + .property("tree_bodynum", &MjModel::tree_bodynum) + .property("tree_dofadr", &MjModel::tree_dofadr) + .property("tree_dofnum", &MjModel::tree_dofnum) + .property("tree_sleep_policy", &MjModel::tree_sleep_policy) + .property("tuple_adr", &MjModel::tuple_adr) + .property("tuple_objid", &MjModel::tuple_objid) + .property("tuple_objprm", &MjModel::tuple_objprm) + .property("tuple_objtype", &MjModel::tuple_objtype) + .property("tuple_size", &MjModel::tuple_size) + .property("vis", &MjModel::vis, reference()) + .property("wrap_objid", &MjModel::wrap_objid) + .property("wrap_prm", &MjModel::wrap_prm) + .property("wrap_type", &MjModel::wrap_type); + emscripten::class_("MjOption") + .constructor<>() + .function("copy", &MjOption::copy, take_ownership()) + .property("ccd_iterations", &MjOption::ccd_iterations, &MjOption::set_ccd_iterations, reference()) + .property("ccd_tolerance", &MjOption::ccd_tolerance, &MjOption::set_ccd_tolerance, reference()) + .property("cone", &MjOption::cone, &MjOption::set_cone, reference()) + .property("density", &MjOption::density, &MjOption::set_density, reference()) + .property("disableactuator", &MjOption::disableactuator, &MjOption::set_disableactuator, reference()) + .property("disableflags", &MjOption::disableflags, &MjOption::set_disableflags, reference()) + .property("enableflags", &MjOption::enableflags, &MjOption::set_enableflags, reference()) + .property("gravity", &MjOption::gravity) + .property("impratio", &MjOption::impratio, &MjOption::set_impratio, reference()) + .property("integrator", &MjOption::integrator, &MjOption::set_integrator, reference()) + .property("iterations", &MjOption::iterations, &MjOption::set_iterations, reference()) + .property("jacobian", &MjOption::jacobian, &MjOption::set_jacobian, reference()) + .property("ls_iterations", &MjOption::ls_iterations, &MjOption::set_ls_iterations, reference()) + .property("ls_tolerance", &MjOption::ls_tolerance, &MjOption::set_ls_tolerance, reference()) + .property("magnetic", &MjOption::magnetic) + .property("noslip_iterations", &MjOption::noslip_iterations, &MjOption::set_noslip_iterations, reference()) + .property("noslip_tolerance", &MjOption::noslip_tolerance, &MjOption::set_noslip_tolerance, reference()) + .property("o_friction", &MjOption::o_friction) + .property("o_margin", &MjOption::o_margin, &MjOption::set_o_margin, reference()) + .property("o_solimp", &MjOption::o_solimp) + .property("o_solref", &MjOption::o_solref) + .property("sdf_initpoints", &MjOption::sdf_initpoints, &MjOption::set_sdf_initpoints, reference()) + .property("sdf_iterations", &MjOption::sdf_iterations, &MjOption::set_sdf_iterations, reference()) + .property("sleep_tolerance", &MjOption::sleep_tolerance, &MjOption::set_sleep_tolerance, reference()) + .property("solver", &MjOption::solver, &MjOption::set_solver, reference()) + .property("timestep", &MjOption::timestep, &MjOption::set_timestep, reference()) + .property("tolerance", &MjOption::tolerance, &MjOption::set_tolerance, reference()) + .property("viscosity", &MjOption::viscosity, &MjOption::set_viscosity, reference()) + .property("wind", &MjOption::wind); + emscripten::class_("MjSolverStat") + .constructor<>() + .function("copy", &MjSolverStat::copy, take_ownership()) + .property("gradient", &MjSolverStat::gradient, &MjSolverStat::set_gradient, reference()) + .property("improvement", &MjSolverStat::improvement, &MjSolverStat::set_improvement, reference()) + .property("lineslope", &MjSolverStat::lineslope, &MjSolverStat::set_lineslope, reference()) + .property("nactive", &MjSolverStat::nactive, &MjSolverStat::set_nactive, reference()) + .property("nchange", &MjSolverStat::nchange, &MjSolverStat::set_nchange, reference()) + .property("neval", &MjSolverStat::neval, &MjSolverStat::set_neval, reference()) + .property("nupdate", &MjSolverStat::nupdate, &MjSolverStat::set_nupdate, reference()); + emscripten::class_("MjSpec") + .constructor() + .property("comment", &MjSpec::comment, &MjSpec::set_comment, reference()) + .property("compiler", &MjSpec::compiler, reference()) + .property("element", &MjSpec::element, reference()) + .property("hasImplicitPluginElem", &MjSpec::hasImplicitPluginElem, &MjSpec::set_hasImplicitPluginElem, reference()) + .property("memory", &MjSpec::memory, &MjSpec::set_memory, reference()) + .property("modelfiledir", &MjSpec::modelfiledir, &MjSpec::set_modelfiledir, reference()) + .property("modelname", &MjSpec::modelname, &MjSpec::set_modelname, reference()) + .property("nconmax", &MjSpec::nconmax, &MjSpec::set_nconmax, reference()) + .property("nemax", &MjSpec::nemax, &MjSpec::set_nemax, reference()) + .property("njmax", &MjSpec::njmax, &MjSpec::set_njmax, reference()) + .property("nkey", &MjSpec::nkey, &MjSpec::set_nkey, reference()) + .property("nstack", &MjSpec::nstack, &MjSpec::set_nstack, reference()) + .property("nuser_actuator", &MjSpec::nuser_actuator, &MjSpec::set_nuser_actuator, reference()) + .property("nuser_body", &MjSpec::nuser_body, &MjSpec::set_nuser_body, reference()) + .property("nuser_cam", &MjSpec::nuser_cam, &MjSpec::set_nuser_cam, reference()) + .property("nuser_geom", &MjSpec::nuser_geom, &MjSpec::set_nuser_geom, reference()) + .property("nuser_jnt", &MjSpec::nuser_jnt, &MjSpec::set_nuser_jnt, reference()) + .property("nuser_sensor", &MjSpec::nuser_sensor, &MjSpec::set_nuser_sensor, reference()) + .property("nuser_site", &MjSpec::nuser_site, &MjSpec::set_nuser_site, reference()) + .property("nuser_tendon", &MjSpec::nuser_tendon, &MjSpec::set_nuser_tendon, reference()) + .property("nuserdata", &MjSpec::nuserdata, &MjSpec::set_nuserdata, reference()) + .property("option", &MjSpec::option, reference()) + .property("stat", &MjSpec::stat, reference()) + .property("strippath", &MjSpec::strippath, &MjSpec::set_strippath, reference()) + .property("visual", &MjSpec::visual, reference()); + emscripten::class_("MjStatistic") + .constructor<>() + .function("copy", &MjStatistic::copy, take_ownership()) + .property("center", &MjStatistic::center) + .property("extent", &MjStatistic::extent, &MjStatistic::set_extent, reference()) + .property("meaninertia", &MjStatistic::meaninertia, &MjStatistic::set_meaninertia, reference()) + .property("meanmass", &MjStatistic::meanmass, &MjStatistic::set_meanmass, reference()) + .property("meansize", &MjStatistic::meansize, &MjStatistic::set_meansize, reference()); + emscripten::class_("MjTimerStat") + .constructor<>() + .function("copy", &MjTimerStat::copy, take_ownership()) + .property("duration", &MjTimerStat::duration, &MjTimerStat::set_duration, reference()) + .property("number", &MjTimerStat::number, &MjTimerStat::set_number, reference()); + emscripten::class_("MjVisual") + .constructor<>() + .function("copy", &MjVisual::copy, take_ownership()) + .property("global", &MjVisual::global, reference()) + .property("headlight", &MjVisual::headlight, reference()) + .property("map", &MjVisual::map, reference()) + .property("quality", &MjVisual::quality, reference()) + .property("rgba", &MjVisual::rgba, reference()) + .property("scale", &MjVisual::scale, reference()); + emscripten::class_("MjVisualGlobal") + .constructor<>() + .function("copy", &MjVisualGlobal::copy, take_ownership()) + .property("azimuth", &MjVisualGlobal::azimuth, &MjVisualGlobal::set_azimuth, reference()) + .property("bvactive", &MjVisualGlobal::bvactive, &MjVisualGlobal::set_bvactive, reference()) + .property("cameraid", &MjVisualGlobal::cameraid, &MjVisualGlobal::set_cameraid, reference()) + .property("elevation", &MjVisualGlobal::elevation, &MjVisualGlobal::set_elevation, reference()) + .property("ellipsoidinertia", &MjVisualGlobal::ellipsoidinertia, &MjVisualGlobal::set_ellipsoidinertia, reference()) + .property("fovy", &MjVisualGlobal::fovy, &MjVisualGlobal::set_fovy, reference()) + .property("glow", &MjVisualGlobal::glow, &MjVisualGlobal::set_glow, reference()) + .property("ipd", &MjVisualGlobal::ipd, &MjVisualGlobal::set_ipd, reference()) + .property("linewidth", &MjVisualGlobal::linewidth, &MjVisualGlobal::set_linewidth, reference()) + .property("offheight", &MjVisualGlobal::offheight, &MjVisualGlobal::set_offheight, reference()) + .property("offwidth", &MjVisualGlobal::offwidth, &MjVisualGlobal::set_offwidth, reference()) + .property("orthographic", &MjVisualGlobal::orthographic, &MjVisualGlobal::set_orthographic, reference()) + .property("realtime", &MjVisualGlobal::realtime, &MjVisualGlobal::set_realtime, reference()); + emscripten::class_("MjVisualHeadlight") + .constructor<>() + .function("copy", &MjVisualHeadlight::copy, take_ownership()) + .property("active", &MjVisualHeadlight::active, &MjVisualHeadlight::set_active, reference()) + .property("ambient", &MjVisualHeadlight::ambient) + .property("diffuse", &MjVisualHeadlight::diffuse) + .property("specular", &MjVisualHeadlight::specular); + emscripten::class_("MjVisualMap") + .constructor<>() + .function("copy", &MjVisualMap::copy, take_ownership()) + .property("actuatortendon", &MjVisualMap::actuatortendon, &MjVisualMap::set_actuatortendon, reference()) + .property("alpha", &MjVisualMap::alpha, &MjVisualMap::set_alpha, reference()) + .property("fogend", &MjVisualMap::fogend, &MjVisualMap::set_fogend, reference()) + .property("fogstart", &MjVisualMap::fogstart, &MjVisualMap::set_fogstart, reference()) + .property("force", &MjVisualMap::force, &MjVisualMap::set_force, reference()) + .property("haze", &MjVisualMap::haze, &MjVisualMap::set_haze, reference()) + .property("shadowclip", &MjVisualMap::shadowclip, &MjVisualMap::set_shadowclip, reference()) + .property("shadowscale", &MjVisualMap::shadowscale, &MjVisualMap::set_shadowscale, reference()) + .property("stiffness", &MjVisualMap::stiffness, &MjVisualMap::set_stiffness, reference()) + .property("stiffnessrot", &MjVisualMap::stiffnessrot, &MjVisualMap::set_stiffnessrot, reference()) + .property("torque", &MjVisualMap::torque, &MjVisualMap::set_torque, reference()) + .property("zfar", &MjVisualMap::zfar, &MjVisualMap::set_zfar, reference()) + .property("znear", &MjVisualMap::znear, &MjVisualMap::set_znear, reference()); + emscripten::class_("MjVisualQuality") + .constructor<>() + .function("copy", &MjVisualQuality::copy, take_ownership()) + .property("numquads", &MjVisualQuality::numquads, &MjVisualQuality::set_numquads, reference()) + .property("numslices", &MjVisualQuality::numslices, &MjVisualQuality::set_numslices, reference()) + .property("numstacks", &MjVisualQuality::numstacks, &MjVisualQuality::set_numstacks, reference()) + .property("offsamples", &MjVisualQuality::offsamples, &MjVisualQuality::set_offsamples, reference()) + .property("shadowsize", &MjVisualQuality::shadowsize, &MjVisualQuality::set_shadowsize, reference()); + emscripten::class_("MjVisualRgba") + .constructor<>() + .function("copy", &MjVisualRgba::copy, take_ownership()) + .property("actuator", &MjVisualRgba::actuator) + .property("actuatornegative", &MjVisualRgba::actuatornegative) + .property("actuatorpositive", &MjVisualRgba::actuatorpositive) + .property("bv", &MjVisualRgba::bv) + .property("bvactive", &MjVisualRgba::bvactive) + .property("camera", &MjVisualRgba::camera) + .property("com", &MjVisualRgba::com) + .property("connect", &MjVisualRgba::connect) + .property("constraint", &MjVisualRgba::constraint) + .property("contactforce", &MjVisualRgba::contactforce) + .property("contactfriction", &MjVisualRgba::contactfriction) + .property("contactgap", &MjVisualRgba::contactgap) + .property("contactpoint", &MjVisualRgba::contactpoint) + .property("contacttorque", &MjVisualRgba::contacttorque) + .property("crankbroken", &MjVisualRgba::crankbroken) + .property("fog", &MjVisualRgba::fog) + .property("force", &MjVisualRgba::force) + .property("frustum", &MjVisualRgba::frustum) + .property("haze", &MjVisualRgba::haze) + .property("inertia", &MjVisualRgba::inertia) + .property("joint", &MjVisualRgba::joint) + .property("light", &MjVisualRgba::light) + .property("rangefinder", &MjVisualRgba::rangefinder) + .property("selectpoint", &MjVisualRgba::selectpoint) + .property("slidercrank", &MjVisualRgba::slidercrank); + emscripten::class_("MjVisualScale") + .constructor<>() + .function("copy", &MjVisualScale::copy, take_ownership()) + .property("actuatorlength", &MjVisualScale::actuatorlength, &MjVisualScale::set_actuatorlength, reference()) + .property("actuatorwidth", &MjVisualScale::actuatorwidth, &MjVisualScale::set_actuatorwidth, reference()) + .property("camera", &MjVisualScale::camera, &MjVisualScale::set_camera, reference()) + .property("com", &MjVisualScale::com, &MjVisualScale::set_com, reference()) + .property("connect", &MjVisualScale::connect, &MjVisualScale::set_connect, reference()) + .property("constraint", &MjVisualScale::constraint, &MjVisualScale::set_constraint, reference()) + .property("contactheight", &MjVisualScale::contactheight, &MjVisualScale::set_contactheight, reference()) + .property("contactwidth", &MjVisualScale::contactwidth, &MjVisualScale::set_contactwidth, reference()) + .property("forcewidth", &MjVisualScale::forcewidth, &MjVisualScale::set_forcewidth, reference()) + .property("framelength", &MjVisualScale::framelength, &MjVisualScale::set_framelength, reference()) + .property("framewidth", &MjVisualScale::framewidth, &MjVisualScale::set_framewidth, reference()) + .property("frustum", &MjVisualScale::frustum, &MjVisualScale::set_frustum, reference()) + .property("jointlength", &MjVisualScale::jointlength, &MjVisualScale::set_jointlength, reference()) + .property("jointwidth", &MjVisualScale::jointwidth, &MjVisualScale::set_jointwidth, reference()) + .property("light", &MjVisualScale::light, &MjVisualScale::set_light, reference()) + .property("selectpoint", &MjVisualScale::selectpoint, &MjVisualScale::set_selectpoint, reference()) + .property("slidercrank", &MjVisualScale::slidercrank, &MjVisualScale::set_slidercrank, reference()); + emscripten::class_("MjWarningStat") + .constructor<>() + .function("copy", &MjWarningStat::copy, take_ownership()) + .property("lastinfo", &MjWarningStat::lastinfo, &MjWarningStat::set_lastinfo, reference()) + .property("number", &MjWarningStat::number, &MjWarningStat::set_number, reference()); + emscripten::class_("MjsActuator") + .property("actdim", &MjsActuator::actdim, &MjsActuator::set_actdim, reference()) + .property("actearly", &MjsActuator::actearly, &MjsActuator::set_actearly, reference()) + .property("actlimited", &MjsActuator::actlimited, &MjsActuator::set_actlimited, reference()) + .property("actrange", &MjsActuator::actrange) + .property("biasprm", &MjsActuator::biasprm) + .property("biastype", &MjsActuator::biastype, &MjsActuator::set_biastype, reference()) + .property("cranklength", &MjsActuator::cranklength, &MjsActuator::set_cranklength, reference()) + .property("ctrllimited", &MjsActuator::ctrllimited, &MjsActuator::set_ctrllimited, reference()) + .property("ctrlrange", &MjsActuator::ctrlrange) + .property("dynprm", &MjsActuator::dynprm) + .property("dyntype", &MjsActuator::dyntype, &MjsActuator::set_dyntype, reference()) + .property("element", &MjsActuator::element, reference()) + .property("forcelimited", &MjsActuator::forcelimited, &MjsActuator::set_forcelimited, reference()) + .property("forcerange", &MjsActuator::forcerange) + .property("gainprm", &MjsActuator::gainprm) + .property("gaintype", &MjsActuator::gaintype, &MjsActuator::set_gaintype, reference()) + .property("gear", &MjsActuator::gear) + .property("group", &MjsActuator::group, &MjsActuator::set_group, reference()) + .property("info", &MjsActuator::info, &MjsActuator::set_info, reference()) + .property("inheritrange", &MjsActuator::inheritrange, &MjsActuator::set_inheritrange, reference()) + .property("lengthrange", &MjsActuator::lengthrange) + .property("plugin", &MjsActuator::plugin, reference()) + .property("refsite", &MjsActuator::refsite, &MjsActuator::set_refsite, reference()) + .property("slidersite", &MjsActuator::slidersite, &MjsActuator::set_slidersite, reference()) + .property("target", &MjsActuator::target, &MjsActuator::set_target, reference()) + .property("trntype", &MjsActuator::trntype, &MjsActuator::set_trntype, reference()) + .property("userdata", &MjsActuator::userdata, reference()); + emscripten::class_("MjsBody") + .property("alt", &MjsBody::alt, reference()) + .property("childclass", &MjsBody::childclass, &MjsBody::set_childclass, reference()) + .property("element", &MjsBody::element, reference()) + .property("explicitinertial", &MjsBody::explicitinertial, &MjsBody::set_explicitinertial, reference()) + .property("fullinertia", &MjsBody::fullinertia) + .property("gravcomp", &MjsBody::gravcomp, &MjsBody::set_gravcomp, reference()) + .property("ialt", &MjsBody::ialt, reference()) + .property("inertia", &MjsBody::inertia) + .property("info", &MjsBody::info, &MjsBody::set_info, reference()) + .property("ipos", &MjsBody::ipos) + .property("iquat", &MjsBody::iquat) + .property("mass", &MjsBody::mass, &MjsBody::set_mass, reference()) + .property("mocap", &MjsBody::mocap, &MjsBody::set_mocap, reference()) + .property("plugin", &MjsBody::plugin, reference()) + .property("pos", &MjsBody::pos) + .property("quat", &MjsBody::quat) + .property("sleep", &MjsBody::sleep, &MjsBody::set_sleep, reference()) + .property("userdata", &MjsBody::userdata, reference()); + emscripten::class_("MjsCamera") + .property("alt", &MjsCamera::alt, reference()) + .property("element", &MjsCamera::element, reference()) + .property("focal_length", &MjsCamera::focal_length) + .property("focal_pixel", &MjsCamera::focal_pixel) + .property("fovy", &MjsCamera::fovy, &MjsCamera::set_fovy, reference()) + .property("info", &MjsCamera::info, &MjsCamera::set_info, reference()) + .property("intrinsic", &MjsCamera::intrinsic) + .property("ipd", &MjsCamera::ipd, &MjsCamera::set_ipd, reference()) + .property("mode", &MjsCamera::mode, &MjsCamera::set_mode, reference()) + .property("orthographic", &MjsCamera::orthographic, &MjsCamera::set_orthographic, reference()) + .property("pos", &MjsCamera::pos) + .property("principal_length", &MjsCamera::principal_length) + .property("principal_pixel", &MjsCamera::principal_pixel) + .property("quat", &MjsCamera::quat) + .property("resolution", &MjsCamera::resolution) + .property("sensor_size", &MjsCamera::sensor_size) + .property("targetbody", &MjsCamera::targetbody, &MjsCamera::set_targetbody, reference()) + .property("userdata", &MjsCamera::userdata, reference()); + emscripten::class_("MjsCompiler") + .property("LRopt", &MjsCompiler::LRopt, reference()) + .property("alignfree", &MjsCompiler::alignfree, &MjsCompiler::set_alignfree, reference()) + .property("autolimits", &MjsCompiler::autolimits, &MjsCompiler::set_autolimits, reference()) + .property("balanceinertia", &MjsCompiler::balanceinertia, &MjsCompiler::set_balanceinertia, reference()) + .property("boundinertia", &MjsCompiler::boundinertia, &MjsCompiler::set_boundinertia, reference()) + .property("boundmass", &MjsCompiler::boundmass, &MjsCompiler::set_boundmass, reference()) + .property("degree", &MjsCompiler::degree, &MjsCompiler::set_degree, reference()) + .property("discardvisual", &MjsCompiler::discardvisual, &MjsCompiler::set_discardvisual, reference()) + .property("eulerseq", &MjsCompiler::eulerseq) + .property("fitaabb", &MjsCompiler::fitaabb, &MjsCompiler::set_fitaabb, reference()) + .property("fusestatic", &MjsCompiler::fusestatic, &MjsCompiler::set_fusestatic, reference()) + .property("inertiafromgeom", &MjsCompiler::inertiafromgeom, &MjsCompiler::set_inertiafromgeom, reference()) + .property("inertiagrouprange", &MjsCompiler::inertiagrouprange) + .property("meshdir", &MjsCompiler::meshdir, &MjsCompiler::set_meshdir, reference()) + .property("saveinertial", &MjsCompiler::saveinertial, &MjsCompiler::set_saveinertial, reference()) + .property("settotalmass", &MjsCompiler::settotalmass, &MjsCompiler::set_settotalmass, reference()) + .property("texturedir", &MjsCompiler::texturedir, &MjsCompiler::set_texturedir, reference()) + .property("usethread", &MjsCompiler::usethread, &MjsCompiler::set_usethread, reference()); + emscripten::class_("MjsDefault") + .property("actuator", &MjsDefault::actuator, reference()) + .property("camera", &MjsDefault::camera, reference()) + .property("element", &MjsDefault::element, reference()) + .property("equality", &MjsDefault::equality, reference()) + .property("flex", &MjsDefault::flex, reference()) + .property("geom", &MjsDefault::geom, reference()) + .property("joint", &MjsDefault::joint, reference()) + .property("light", &MjsDefault::light, reference()) + .property("material", &MjsDefault::material, reference()) + .property("mesh", &MjsDefault::mesh, reference()) + .property("pair", &MjsDefault::pair, reference()) + .property("site", &MjsDefault::site, reference()) + .property("tendon", &MjsDefault::tendon, reference()); + emscripten::class_("MjsElement") + .property("elemtype", &MjsElement::elemtype, &MjsElement::set_elemtype, reference()) + .property("signature", &MjsElement::signature, &MjsElement::set_signature, reference()); + emscripten::class_("MjsEquality") + .property("active", &MjsEquality::active, &MjsEquality::set_active, reference()) + .property("data", &MjsEquality::data) + .property("element", &MjsEquality::element, reference()) + .property("info", &MjsEquality::info, &MjsEquality::set_info, reference()) + .property("name1", &MjsEquality::name1, &MjsEquality::set_name1, reference()) + .property("name2", &MjsEquality::name2, &MjsEquality::set_name2, reference()) + .property("objtype", &MjsEquality::objtype, &MjsEquality::set_objtype, reference()) + .property("solimp", &MjsEquality::solimp) + .property("solref", &MjsEquality::solref) + .property("type", &MjsEquality::type, &MjsEquality::set_type, reference()); + emscripten::class_("MjsExclude") + .property("bodyname1", &MjsExclude::bodyname1, &MjsExclude::set_bodyname1, reference()) + .property("bodyname2", &MjsExclude::bodyname2, &MjsExclude::set_bodyname2, reference()) + .property("element", &MjsExclude::element, reference()) + .property("info", &MjsExclude::info, &MjsExclude::set_info, reference()); + emscripten::class_("MjsFlex") + .property("activelayers", &MjsFlex::activelayers, &MjsFlex::set_activelayers, reference()) + .property("conaffinity", &MjsFlex::conaffinity, &MjsFlex::set_conaffinity, reference()) + .property("condim", &MjsFlex::condim, &MjsFlex::set_condim, reference()) + .property("contype", &MjsFlex::contype, &MjsFlex::set_contype, reference()) + .property("damping", &MjsFlex::damping, &MjsFlex::set_damping, reference()) + .property("dim", &MjsFlex::dim, &MjsFlex::set_dim, reference()) + .property("edgedamping", &MjsFlex::edgedamping, &MjsFlex::set_edgedamping, reference()) + .property("edgestiffness", &MjsFlex::edgestiffness, &MjsFlex::set_edgestiffness, reference()) + .property("elastic2d", &MjsFlex::elastic2d, &MjsFlex::set_elastic2d, reference()) + .property("elem", &MjsFlex::elem, reference()) + .property("element", &MjsFlex::element, reference()) + .property("elemtexcoord", &MjsFlex::elemtexcoord, reference()) + .property("flatskin", &MjsFlex::flatskin, &MjsFlex::set_flatskin, reference()) + .property("friction", &MjsFlex::friction) + .property("gap", &MjsFlex::gap, &MjsFlex::set_gap, reference()) + .property("group", &MjsFlex::group, &MjsFlex::set_group, reference()) + .property("info", &MjsFlex::info, &MjsFlex::set_info, reference()) + .property("internal", &MjsFlex::internal, &MjsFlex::set_internal, reference()) + .property("margin", &MjsFlex::margin, &MjsFlex::set_margin, reference()) + .property("material", &MjsFlex::material, &MjsFlex::set_material, reference()) + .property("node", &MjsFlex::node, reference()) + .property("nodebody", &MjsFlex::nodebody, reference()) + .property("passive", &MjsFlex::passive, &MjsFlex::set_passive, reference()) + .property("poisson", &MjsFlex::poisson, &MjsFlex::set_poisson, reference()) + .property("priority", &MjsFlex::priority, &MjsFlex::set_priority, reference()) + .property("radius", &MjsFlex::radius, &MjsFlex::set_radius, reference()) + .property("rgba", &MjsFlex::rgba) + .property("selfcollide", &MjsFlex::selfcollide, &MjsFlex::set_selfcollide, reference()) + .property("solimp", &MjsFlex::solimp) + .property("solmix", &MjsFlex::solmix, &MjsFlex::set_solmix, reference()) + .property("solref", &MjsFlex::solref) + .property("texcoord", &MjsFlex::texcoord, reference()) + .property("thickness", &MjsFlex::thickness, &MjsFlex::set_thickness, reference()) + .property("vert", &MjsFlex::vert, reference()) + .property("vertbody", &MjsFlex::vertbody, reference()) + .property("vertcollide", &MjsFlex::vertcollide, &MjsFlex::set_vertcollide, reference()) + .property("young", &MjsFlex::young, &MjsFlex::set_young, reference()); + emscripten::class_("MjsFrame") + .property("alt", &MjsFrame::alt, reference()) + .property("childclass", &MjsFrame::childclass, &MjsFrame::set_childclass, reference()) + .property("element", &MjsFrame::element, reference()) + .property("info", &MjsFrame::info, &MjsFrame::set_info, reference()) + .property("pos", &MjsFrame::pos) + .property("quat", &MjsFrame::quat); + emscripten::class_("MjsGeom") + .property("alt", &MjsGeom::alt, reference()) + .property("conaffinity", &MjsGeom::conaffinity, &MjsGeom::set_conaffinity, reference()) + .property("condim", &MjsGeom::condim, &MjsGeom::set_condim, reference()) + .property("contype", &MjsGeom::contype, &MjsGeom::set_contype, reference()) + .property("density", &MjsGeom::density, &MjsGeom::set_density, reference()) + .property("element", &MjsGeom::element, reference()) + .property("fitscale", &MjsGeom::fitscale, &MjsGeom::set_fitscale, reference()) + .property("fluid_coefs", &MjsGeom::fluid_coefs) + .property("fluid_ellipsoid", &MjsGeom::fluid_ellipsoid, &MjsGeom::set_fluid_ellipsoid, reference()) + .property("friction", &MjsGeom::friction) + .property("fromto", &MjsGeom::fromto) + .property("gap", &MjsGeom::gap, &MjsGeom::set_gap, reference()) + .property("group", &MjsGeom::group, &MjsGeom::set_group, reference()) + .property("hfieldname", &MjsGeom::hfieldname, &MjsGeom::set_hfieldname, reference()) + .property("info", &MjsGeom::info, &MjsGeom::set_info, reference()) + .property("margin", &MjsGeom::margin, &MjsGeom::set_margin, reference()) + .property("mass", &MjsGeom::mass, &MjsGeom::set_mass, reference()) + .property("material", &MjsGeom::material, &MjsGeom::set_material, reference()) + .property("meshname", &MjsGeom::meshname, &MjsGeom::set_meshname, reference()) + .property("plugin", &MjsGeom::plugin, reference()) + .property("pos", &MjsGeom::pos) + .property("priority", &MjsGeom::priority, &MjsGeom::set_priority, reference()) + .property("quat", &MjsGeom::quat) + .property("rgba", &MjsGeom::rgba) + .property("size", &MjsGeom::size) + .property("solimp", &MjsGeom::solimp) + .property("solmix", &MjsGeom::solmix, &MjsGeom::set_solmix, reference()) + .property("solref", &MjsGeom::solref) + .property("type", &MjsGeom::type, &MjsGeom::set_type, reference()) + .property("typeinertia", &MjsGeom::typeinertia, &MjsGeom::set_typeinertia, reference()) + .property("userdata", &MjsGeom::userdata, reference()); + emscripten::class_("MjsHField") + .property("content_type", &MjsHField::content_type, &MjsHField::set_content_type, reference()) + .property("element", &MjsHField::element, reference()) + .property("file", &MjsHField::file, &MjsHField::set_file, reference()) + .property("info", &MjsHField::info, &MjsHField::set_info, reference()) + .property("ncol", &MjsHField::ncol, &MjsHField::set_ncol, reference()) + .property("nrow", &MjsHField::nrow, &MjsHField::set_nrow, reference()) + .property("size", &MjsHField::size) + .property("userdata", &MjsHField::userdata, reference()); + emscripten::class_("MjsJoint") + .property("actfrclimited", &MjsJoint::actfrclimited, &MjsJoint::set_actfrclimited, reference()) + .property("actfrcrange", &MjsJoint::actfrcrange) + .property("actgravcomp", &MjsJoint::actgravcomp, &MjsJoint::set_actgravcomp, reference()) + .property("align", &MjsJoint::align, &MjsJoint::set_align, reference()) + .property("armature", &MjsJoint::armature, &MjsJoint::set_armature, reference()) + .property("axis", &MjsJoint::axis) + .property("damping", &MjsJoint::damping, &MjsJoint::set_damping, reference()) + .property("element", &MjsJoint::element, reference()) + .property("frictionloss", &MjsJoint::frictionloss, &MjsJoint::set_frictionloss, reference()) + .property("group", &MjsJoint::group, &MjsJoint::set_group, reference()) + .property("info", &MjsJoint::info, &MjsJoint::set_info, reference()) + .property("limited", &MjsJoint::limited, &MjsJoint::set_limited, reference()) + .property("margin", &MjsJoint::margin, &MjsJoint::set_margin, reference()) + .property("pos", &MjsJoint::pos) + .property("range", &MjsJoint::range) + .property("ref", &MjsJoint::ref, &MjsJoint::set_ref, reference()) + .property("solimp_friction", &MjsJoint::solimp_friction) + .property("solimp_limit", &MjsJoint::solimp_limit) + .property("solref_friction", &MjsJoint::solref_friction) + .property("solref_limit", &MjsJoint::solref_limit) + .property("springdamper", &MjsJoint::springdamper) + .property("springref", &MjsJoint::springref, &MjsJoint::set_springref, reference()) + .property("stiffness", &MjsJoint::stiffness, &MjsJoint::set_stiffness, reference()) + .property("type", &MjsJoint::type, &MjsJoint::set_type, reference()) + .property("userdata", &MjsJoint::userdata, reference()); + emscripten::class_("MjsKey") + .property("act", &MjsKey::act, reference()) + .property("ctrl", &MjsKey::ctrl, reference()) + .property("element", &MjsKey::element, reference()) + .property("info", &MjsKey::info, &MjsKey::set_info, reference()) + .property("mpos", &MjsKey::mpos, reference()) + .property("mquat", &MjsKey::mquat, reference()) + .property("qpos", &MjsKey::qpos, reference()) + .property("qvel", &MjsKey::qvel, reference()) + .property("time", &MjsKey::time, &MjsKey::set_time, reference()); + emscripten::class_("MjsLight") + .property("active", &MjsLight::active, &MjsLight::set_active, reference()) + .property("ambient", &MjsLight::ambient) + .property("attenuation", &MjsLight::attenuation) + .property("bulbradius", &MjsLight::bulbradius, &MjsLight::set_bulbradius, reference()) + .property("castshadow", &MjsLight::castshadow, &MjsLight::set_castshadow, reference()) + .property("cutoff", &MjsLight::cutoff, &MjsLight::set_cutoff, reference()) + .property("diffuse", &MjsLight::diffuse) + .property("dir", &MjsLight::dir) + .property("element", &MjsLight::element, reference()) + .property("exponent", &MjsLight::exponent, &MjsLight::set_exponent, reference()) + .property("info", &MjsLight::info, &MjsLight::set_info, reference()) + .property("intensity", &MjsLight::intensity, &MjsLight::set_intensity, reference()) + .property("mode", &MjsLight::mode, &MjsLight::set_mode, reference()) + .property("pos", &MjsLight::pos) + .property("range", &MjsLight::range, &MjsLight::set_range, reference()) + .property("specular", &MjsLight::specular) + .property("targetbody", &MjsLight::targetbody, &MjsLight::set_targetbody, reference()) + .property("texture", &MjsLight::texture, &MjsLight::set_texture, reference()) + .property("type", &MjsLight::type, &MjsLight::set_type, reference()); + emscripten::class_("MjsMaterial") + .property("element", &MjsMaterial::element, reference()) + .property("emission", &MjsMaterial::emission, &MjsMaterial::set_emission, reference()) + .property("info", &MjsMaterial::info, &MjsMaterial::set_info, reference()) + .property("metallic", &MjsMaterial::metallic, &MjsMaterial::set_metallic, reference()) + .property("reflectance", &MjsMaterial::reflectance, &MjsMaterial::set_reflectance, reference()) + .property("rgba", &MjsMaterial::rgba) + .property("roughness", &MjsMaterial::roughness, &MjsMaterial::set_roughness, reference()) + .property("shininess", &MjsMaterial::shininess, &MjsMaterial::set_shininess, reference()) + .property("specular", &MjsMaterial::specular, &MjsMaterial::set_specular, reference()) + .property("texrepeat", &MjsMaterial::texrepeat) + .property("textures", &MjsMaterial::textures, reference()) + .property("texuniform", &MjsMaterial::texuniform, &MjsMaterial::set_texuniform, reference()); + emscripten::class_("MjsMesh") + .property("content_type", &MjsMesh::content_type, &MjsMesh::set_content_type, reference()) + .property("element", &MjsMesh::element, reference()) + .property("file", &MjsMesh::file, &MjsMesh::set_file, reference()) + .property("inertia", &MjsMesh::inertia, &MjsMesh::set_inertia, reference()) + .property("info", &MjsMesh::info, &MjsMesh::set_info, reference()) + .property("material", &MjsMesh::material, &MjsMesh::set_material, reference()) + .property("maxhullvert", &MjsMesh::maxhullvert, &MjsMesh::set_maxhullvert, reference()) + .property("needsdf", &MjsMesh::needsdf, &MjsMesh::set_needsdf, reference()) + .property("plugin", &MjsMesh::plugin, reference()) + .property("refpos", &MjsMesh::refpos) + .property("refquat", &MjsMesh::refquat) + .property("scale", &MjsMesh::scale) + .property("smoothnormal", &MjsMesh::smoothnormal, &MjsMesh::set_smoothnormal, reference()) + .property("userface", &MjsMesh::userface, reference()) + .property("userfacenormal", &MjsMesh::userfacenormal, reference()) + .property("userfacetexcoord", &MjsMesh::userfacetexcoord, reference()) + .property("usernormal", &MjsMesh::usernormal, reference()) + .property("usertexcoord", &MjsMesh::usertexcoord, reference()) + .property("uservert", &MjsMesh::uservert, reference()); + emscripten::class_("MjsNumeric") + .property("data", &MjsNumeric::data, reference()) + .property("element", &MjsNumeric::element, reference()) + .property("info", &MjsNumeric::info, &MjsNumeric::set_info, reference()) + .property("size", &MjsNumeric::size, &MjsNumeric::set_size, reference()); + emscripten::class_("MjsOrientation") + .property("axisangle", &MjsOrientation::axisangle) + .property("euler", &MjsOrientation::euler) + .property("type", &MjsOrientation::type, &MjsOrientation::set_type, reference()) + .property("xyaxes", &MjsOrientation::xyaxes) + .property("zaxis", &MjsOrientation::zaxis); + emscripten::class_("MjsPair") + .property("condim", &MjsPair::condim, &MjsPair::set_condim, reference()) + .property("element", &MjsPair::element, reference()) + .property("friction", &MjsPair::friction) + .property("gap", &MjsPair::gap, &MjsPair::set_gap, reference()) + .property("geomname1", &MjsPair::geomname1, &MjsPair::set_geomname1, reference()) + .property("geomname2", &MjsPair::geomname2, &MjsPair::set_geomname2, reference()) + .property("info", &MjsPair::info, &MjsPair::set_info, reference()) + .property("margin", &MjsPair::margin, &MjsPair::set_margin, reference()) + .property("solimp", &MjsPair::solimp) + .property("solref", &MjsPair::solref) + .property("solreffriction", &MjsPair::solreffriction); + emscripten::class_("MjsPlugin") + .property("active", &MjsPlugin::active, &MjsPlugin::set_active, reference()) + .property("element", &MjsPlugin::element, reference()) + .property("info", &MjsPlugin::info, &MjsPlugin::set_info, reference()) + .property("name", &MjsPlugin::name, &MjsPlugin::set_name, reference()) + .property("plugin_name", &MjsPlugin::plugin_name, &MjsPlugin::set_plugin_name, reference()); + emscripten::class_("MjsSensor") + .property("cutoff", &MjsSensor::cutoff, &MjsSensor::set_cutoff, reference()) + .property("datatype", &MjsSensor::datatype, &MjsSensor::set_datatype, reference()) + .property("dim", &MjsSensor::dim, &MjsSensor::set_dim, reference()) + .property("element", &MjsSensor::element, reference()) + .property("info", &MjsSensor::info, &MjsSensor::set_info, reference()) + .property("intprm", &MjsSensor::intprm) + .property("needstage", &MjsSensor::needstage, &MjsSensor::set_needstage, reference()) + .property("noise", &MjsSensor::noise, &MjsSensor::set_noise, reference()) + .property("objname", &MjsSensor::objname, &MjsSensor::set_objname, reference()) + .property("objtype", &MjsSensor::objtype, &MjsSensor::set_objtype, reference()) + .property("plugin", &MjsSensor::plugin, reference()) + .property("refname", &MjsSensor::refname, &MjsSensor::set_refname, reference()) + .property("reftype", &MjsSensor::reftype, &MjsSensor::set_reftype, reference()) + .property("type", &MjsSensor::type, &MjsSensor::set_type, reference()) + .property("userdata", &MjsSensor::userdata, reference()); + emscripten::class_("MjsSite") + .property("alt", &MjsSite::alt, reference()) + .property("element", &MjsSite::element, reference()) + .property("fromto", &MjsSite::fromto) + .property("group", &MjsSite::group, &MjsSite::set_group, reference()) + .property("info", &MjsSite::info, &MjsSite::set_info, reference()) + .property("material", &MjsSite::material, &MjsSite::set_material, reference()) + .property("pos", &MjsSite::pos) + .property("quat", &MjsSite::quat) + .property("rgba", &MjsSite::rgba) + .property("size", &MjsSite::size) + .property("type", &MjsSite::type, &MjsSite::set_type, reference()) + .property("userdata", &MjsSite::userdata, reference()); + emscripten::class_("MjsSkin") + .property("bindpos", &MjsSkin::bindpos, reference()) + .property("bindquat", &MjsSkin::bindquat, reference()) + .property("bodyname", &MjsSkin::bodyname, reference()) + .property("element", &MjsSkin::element, reference()) + .property("face", &MjsSkin::face, reference()) + .property("file", &MjsSkin::file, &MjsSkin::set_file, reference()) + .property("group", &MjsSkin::group, &MjsSkin::set_group, reference()) + .property("inflate", &MjsSkin::inflate, &MjsSkin::set_inflate, reference()) + .property("info", &MjsSkin::info, &MjsSkin::set_info, reference()) + .property("material", &MjsSkin::material, &MjsSkin::set_material, reference()) + .property("rgba", &MjsSkin::rgba) + .property("texcoord", &MjsSkin::texcoord, reference()) + .property("vert", &MjsSkin::vert, reference()) + .property("vertid", &MjsSkin::vertid, reference()) + .property("vertweight", &MjsSkin::vertweight, reference()); + emscripten::class_("MjsTendon") + .property("actfrclimited", &MjsTendon::actfrclimited, &MjsTendon::set_actfrclimited, reference()) + .property("actfrcrange", &MjsTendon::actfrcrange) + .property("armature", &MjsTendon::armature, &MjsTendon::set_armature, reference()) + .property("damping", &MjsTendon::damping, &MjsTendon::set_damping, reference()) + .property("element", &MjsTendon::element, reference()) + .property("frictionloss", &MjsTendon::frictionloss, &MjsTendon::set_frictionloss, reference()) + .property("group", &MjsTendon::group, &MjsTendon::set_group, reference()) + .property("info", &MjsTendon::info, &MjsTendon::set_info, reference()) + .property("limited", &MjsTendon::limited, &MjsTendon::set_limited, reference()) + .property("margin", &MjsTendon::margin, &MjsTendon::set_margin, reference()) + .property("material", &MjsTendon::material, &MjsTendon::set_material, reference()) + .property("range", &MjsTendon::range) + .property("rgba", &MjsTendon::rgba) + .property("solimp_friction", &MjsTendon::solimp_friction) + .property("solimp_limit", &MjsTendon::solimp_limit) + .property("solref_friction", &MjsTendon::solref_friction) + .property("solref_limit", &MjsTendon::solref_limit) + .property("springlength", &MjsTendon::springlength) + .property("stiffness", &MjsTendon::stiffness, &MjsTendon::set_stiffness, reference()) + .property("userdata", &MjsTendon::userdata, reference()) + .property("width", &MjsTendon::width, &MjsTendon::set_width, reference()); + emscripten::class_("MjsText") + .property("data", &MjsText::data, &MjsText::set_data, reference()) + .property("element", &MjsText::element, reference()) + .property("info", &MjsText::info, &MjsText::set_info, reference()); + emscripten::class_("MjsTexture") + .property("builtin", &MjsTexture::builtin, &MjsTexture::set_builtin, reference()) + .property("colorspace", &MjsTexture::colorspace, &MjsTexture::set_colorspace, reference()) + .property("content_type", &MjsTexture::content_type, &MjsTexture::set_content_type, reference()) + .property("cubefiles", &MjsTexture::cubefiles, reference()) + .property("data", &MjsTexture::data, reference()) + .property("element", &MjsTexture::element, reference()) + .property("file", &MjsTexture::file, &MjsTexture::set_file, reference()) + .property("gridlayout", &MjsTexture::gridlayout) + .property("gridsize", &MjsTexture::gridsize) + .property("height", &MjsTexture::height, &MjsTexture::set_height, reference()) + .property("hflip", &MjsTexture::hflip, &MjsTexture::set_hflip, reference()) + .property("info", &MjsTexture::info, &MjsTexture::set_info, reference()) + .property("mark", &MjsTexture::mark, &MjsTexture::set_mark, reference()) + .property("markrgb", &MjsTexture::markrgb) + .property("nchannel", &MjsTexture::nchannel, &MjsTexture::set_nchannel, reference()) + .property("random", &MjsTexture::random, &MjsTexture::set_random, reference()) + .property("rgb1", &MjsTexture::rgb1) + .property("rgb2", &MjsTexture::rgb2) + .property("type", &MjsTexture::type, &MjsTexture::set_type, reference()) + .property("vflip", &MjsTexture::vflip, &MjsTexture::set_vflip, reference()) + .property("width", &MjsTexture::width, &MjsTexture::set_width, reference()); + emscripten::class_("MjsTuple") + .property("element", &MjsTuple::element, reference()) + .property("info", &MjsTuple::info, &MjsTuple::set_info, reference()) + .property("objname", &MjsTuple::objname, reference()) + .property("objprm", &MjsTuple::objprm, reference()) + .property("objtype", &MjsTuple::objtype, reference()); + emscripten::class_("MjsWrap") + .property("element", &MjsWrap::element, reference()) + .property("info", &MjsWrap::info, &MjsWrap::set_info, reference()) + .property("type", &MjsWrap::type, &MjsWrap::set_type, reference()); + emscripten::class_("MjvCamera") + .constructor<>() + .function("copy", &MjvCamera::copy, take_ownership()) + .property("azimuth", &MjvCamera::azimuth, &MjvCamera::set_azimuth, reference()) + .property("distance", &MjvCamera::distance, &MjvCamera::set_distance, reference()) + .property("elevation", &MjvCamera::elevation, &MjvCamera::set_elevation, reference()) + .property("fixedcamid", &MjvCamera::fixedcamid, &MjvCamera::set_fixedcamid, reference()) + .property("lookat", &MjvCamera::lookat) + .property("orthographic", &MjvCamera::orthographic, &MjvCamera::set_orthographic, reference()) + .property("trackbodyid", &MjvCamera::trackbodyid, &MjvCamera::set_trackbodyid, reference()) + .property("type", &MjvCamera::type, &MjvCamera::set_type, reference()); + emscripten::class_("MjvFigure") + .constructor<>() + .function("copy", &MjvFigure::copy, take_ownership()) + .property("figurergba", &MjvFigure::figurergba) + .property("flg_barplot", &MjvFigure::flg_barplot, &MjvFigure::set_flg_barplot, reference()) + .property("flg_extend", &MjvFigure::flg_extend, &MjvFigure::set_flg_extend, reference()) + .property("flg_legend", &MjvFigure::flg_legend, &MjvFigure::set_flg_legend, reference()) + .property("flg_selection", &MjvFigure::flg_selection, &MjvFigure::set_flg_selection, reference()) + .property("flg_symmetric", &MjvFigure::flg_symmetric, &MjvFigure::set_flg_symmetric, reference()) + .property("flg_ticklabel", &MjvFigure::flg_ticklabel) + .property("gridrgb", &MjvFigure::gridrgb) + .property("gridsize", &MjvFigure::gridsize) + .property("gridwidth", &MjvFigure::gridwidth, &MjvFigure::set_gridwidth, reference()) + .property("highlight", &MjvFigure::highlight) + .property("highlightid", &MjvFigure::highlightid, &MjvFigure::set_highlightid, reference()) + .property("legendoffset", &MjvFigure::legendoffset, &MjvFigure::set_legendoffset, reference()) + .property("legendrgba", &MjvFigure::legendrgba) + .property("linedata", &MjvFigure::linedata) + .property("linename", &MjvFigure::linename) + .property("linepnt", &MjvFigure::linepnt) + .property("linergb", &MjvFigure::linergb) + .property("linewidth", &MjvFigure::linewidth, &MjvFigure::set_linewidth, reference()) + .property("minwidth", &MjvFigure::minwidth) + .property("panergba", &MjvFigure::panergba) + .property("range", &MjvFigure::range) + .property("selection", &MjvFigure::selection, &MjvFigure::set_selection, reference()) + .property("subplot", &MjvFigure::subplot, &MjvFigure::set_subplot, reference()) + .property("textrgb", &MjvFigure::textrgb) + .property("title", &MjvFigure::title) + .property("xaxisdata", &MjvFigure::xaxisdata) + .property("xaxispixel", &MjvFigure::xaxispixel) + .property("xformat", &MjvFigure::xformat) + .property("xlabel", &MjvFigure::xlabel) + .property("yaxisdata", &MjvFigure::yaxisdata) + .property("yaxispixel", &MjvFigure::yaxispixel) + .property("yformat", &MjvFigure::yformat); + emscripten::class_("MjvGLCamera") + .constructor<>() + .function("copy", &MjvGLCamera::copy, take_ownership()) + .property("forward", &MjvGLCamera::forward) + .property("frustum_bottom", &MjvGLCamera::frustum_bottom, &MjvGLCamera::set_frustum_bottom, reference()) + .property("frustum_center", &MjvGLCamera::frustum_center, &MjvGLCamera::set_frustum_center, reference()) + .property("frustum_far", &MjvGLCamera::frustum_far, &MjvGLCamera::set_frustum_far, reference()) + .property("frustum_near", &MjvGLCamera::frustum_near, &MjvGLCamera::set_frustum_near, reference()) + .property("frustum_top", &MjvGLCamera::frustum_top, &MjvGLCamera::set_frustum_top, reference()) + .property("frustum_width", &MjvGLCamera::frustum_width, &MjvGLCamera::set_frustum_width, reference()) + .property("orthographic", &MjvGLCamera::orthographic, &MjvGLCamera::set_orthographic, reference()) + .property("pos", &MjvGLCamera::pos) + .property("up", &MjvGLCamera::up); + emscripten::class_("MjvGeom") + .constructor<>() + .function("copy", &MjvGeom::copy, take_ownership()) + .property("camdist", &MjvGeom::camdist, &MjvGeom::set_camdist, reference()) + .property("category", &MjvGeom::category, &MjvGeom::set_category, reference()) + .property("dataid", &MjvGeom::dataid, &MjvGeom::set_dataid, reference()) + .property("emission", &MjvGeom::emission, &MjvGeom::set_emission, reference()) + .property("label", &MjvGeom::label) + .property("mat", &MjvGeom::mat) + .property("matid", &MjvGeom::matid, &MjvGeom::set_matid, reference()) + .property("modelrbound", &MjvGeom::modelrbound, &MjvGeom::set_modelrbound, reference()) + .property("objid", &MjvGeom::objid, &MjvGeom::set_objid, reference()) + .property("objtype", &MjvGeom::objtype, &MjvGeom::set_objtype, reference()) + .property("pos", &MjvGeom::pos) + .property("reflectance", &MjvGeom::reflectance, &MjvGeom::set_reflectance, reference()) + .property("rgba", &MjvGeom::rgba) + .property("segid", &MjvGeom::segid, &MjvGeom::set_segid, reference()) + .property("shininess", &MjvGeom::shininess, &MjvGeom::set_shininess, reference()) + .property("size", &MjvGeom::size) + .property("specular", &MjvGeom::specular, &MjvGeom::set_specular, reference()) + .property("texcoord", &MjvGeom::texcoord, &MjvGeom::set_texcoord, reference()) + .property("transparent", &MjvGeom::transparent, &MjvGeom::set_transparent, reference()) + .property("type", &MjvGeom::type, &MjvGeom::set_type, reference()); + emscripten::class_("MjvLight") + .constructor<>() + .function("copy", &MjvLight::copy, take_ownership()) + .property("ambient", &MjvLight::ambient) + .property("attenuation", &MjvLight::attenuation) + .property("bulbradius", &MjvLight::bulbradius, &MjvLight::set_bulbradius, reference()) + .property("castshadow", &MjvLight::castshadow, &MjvLight::set_castshadow, reference()) + .property("cutoff", &MjvLight::cutoff, &MjvLight::set_cutoff, reference()) + .property("diffuse", &MjvLight::diffuse) + .property("dir", &MjvLight::dir) + .property("exponent", &MjvLight::exponent, &MjvLight::set_exponent, reference()) + .property("headlight", &MjvLight::headlight, &MjvLight::set_headlight, reference()) + .property("id", &MjvLight::id, &MjvLight::set_id, reference()) + .property("intensity", &MjvLight::intensity, &MjvLight::set_intensity, reference()) + .property("pos", &MjvLight::pos) + .property("range", &MjvLight::range, &MjvLight::set_range, reference()) + .property("specular", &MjvLight::specular) + .property("texid", &MjvLight::texid, &MjvLight::set_texid, reference()) + .property("type", &MjvLight::type, &MjvLight::set_type, reference()); + emscripten::class_("MjvOption") + .constructor<>() + .function("copy", &MjvOption::copy, take_ownership()) + .property("actuatorgroup", &MjvOption::actuatorgroup) + .property("bvh_depth", &MjvOption::bvh_depth, &MjvOption::set_bvh_depth, reference()) + .property("flags", &MjvOption::flags) + .property("flex_layer", &MjvOption::flex_layer, &MjvOption::set_flex_layer, reference()) + .property("flexgroup", &MjvOption::flexgroup) + .property("frame", &MjvOption::frame, &MjvOption::set_frame, reference()) + .property("geomgroup", &MjvOption::geomgroup) + .property("jointgroup", &MjvOption::jointgroup) + .property("label", &MjvOption::label, &MjvOption::set_label, reference()) + .property("sitegroup", &MjvOption::sitegroup) + .property("skingroup", &MjvOption::skingroup) + .property("tendongroup", &MjvOption::tendongroup); + emscripten::class_("MjvPerturb") + .constructor<>() + .function("copy", &MjvPerturb::copy, take_ownership()) + .property("active", &MjvPerturb::active, &MjvPerturb::set_active, reference()) + .property("active2", &MjvPerturb::active2, &MjvPerturb::set_active2, reference()) + .property("flexselect", &MjvPerturb::flexselect, &MjvPerturb::set_flexselect, reference()) + .property("localmass", &MjvPerturb::localmass, &MjvPerturb::set_localmass, reference()) + .property("localpos", &MjvPerturb::localpos) + .property("refpos", &MjvPerturb::refpos) + .property("refquat", &MjvPerturb::refquat) + .property("refselpos", &MjvPerturb::refselpos) + .property("scale", &MjvPerturb::scale, &MjvPerturb::set_scale, reference()) + .property("select", &MjvPerturb::select, &MjvPerturb::set_select, reference()) + .property("skinselect", &MjvPerturb::skinselect, &MjvPerturb::set_skinselect, reference()); + emscripten::class_("MjvScene") + .constructor() + .constructor<>() + .property("camera", &MjvScene::camera) + .property("enabletransform", &MjvScene::enabletransform, &MjvScene::set_enabletransform, reference()) + .property("flags", &MjvScene::flags) + .property("flexedge", &MjvScene::flexedge) + .property("flexedgeadr", &MjvScene::flexedgeadr) + .property("flexedgenum", &MjvScene::flexedgenum) + .property("flexedgeopt", &MjvScene::flexedgeopt, &MjvScene::set_flexedgeopt, reference()) + .property("flexface", &MjvScene::flexface) + .property("flexfaceadr", &MjvScene::flexfaceadr) + .property("flexfacenum", &MjvScene::flexfacenum) + .property("flexfaceopt", &MjvScene::flexfaceopt, &MjvScene::set_flexfaceopt, reference()) + .property("flexfaceused", &MjvScene::flexfaceused) + .property("flexnormal", &MjvScene::flexnormal) + .property("flexskinopt", &MjvScene::flexskinopt, &MjvScene::set_flexskinopt, reference()) + .property("flextexcoord", &MjvScene::flextexcoord) + .property("flexvert", &MjvScene::flexvert) + .property("flexvertadr", &MjvScene::flexvertadr) + .property("flexvertnum", &MjvScene::flexvertnum) + .property("flexvertopt", &MjvScene::flexvertopt, &MjvScene::set_flexvertopt, reference()) + .property("framergb", &MjvScene::framergb) + .property("framewidth", &MjvScene::framewidth, &MjvScene::set_framewidth, reference()) + .property("geomorder", &MjvScene::geomorder) + .property("geoms", &MjvScene::geoms) + .property("lights", &MjvScene::lights) + .property("maxgeom", &MjvScene::maxgeom, &MjvScene::set_maxgeom, reference()) + .property("nflex", &MjvScene::nflex, &MjvScene::set_nflex, reference()) + .property("ngeom", &MjvScene::ngeom, &MjvScene::set_ngeom, reference()) + .property("nlight", &MjvScene::nlight, &MjvScene::set_nlight, reference()) + .property("nskin", &MjvScene::nskin, &MjvScene::set_nskin, reference()) + .property("rotate", &MjvScene::rotate) + .property("scale", &MjvScene::scale, &MjvScene::set_scale, reference()) + .property("skinfacenum", &MjvScene::skinfacenum) + .property("skinnormal", &MjvScene::skinnormal) + .property("skinvert", &MjvScene::skinvert) + .property("skinvertadr", &MjvScene::skinvertadr) + .property("skinvertnum", &MjvScene::skinvertnum) + .property("status", &MjvScene::status, &MjvScene::set_status, reference()) + .property("stereo", &MjvScene::stereo, &MjvScene::set_stereo, reference()) + .property("translate", &MjvScene::translate); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + emscripten::register_optional(); + function("mj_Euler", &mj_Euler_wrapper); function("mj_RungeKutta", &mj_RungeKutta_wrapper); function("mj_addContact", &mj_addContact_wrapper); @@ -12778,34 +12664,80 @@ EMSCRIPTEN_BINDINGS(mujoco_functions) { function("mjv_updateCamera", &mjv_updateCamera_wrapper); function("mjv_updateScene", &mjv_updateScene_wrapper); function("mjv_updateSkin", &mjv_updateSkin_wrapper); + + function("parseXMLString", &parseXMLString_wrapper, take_ownership()); + function("error", &error_wrapper); + emscripten::class_>("FloatBuffer") .constructor() .class_function("FromArray", &WasmBuffer::FromArray) .function("GetPointer", &WasmBuffer::GetPointer) .function("GetElementCount", &WasmBuffer::GetElementCount) .function("GetView", &WasmBuffer::GetView); + emscripten::class_>("DoubleBuffer") .constructor() .class_function("FromArray", &WasmBuffer::FromArray) .function("GetPointer", &WasmBuffer::GetPointer) .function("GetElementCount", &WasmBuffer::GetElementCount) .function("GetView", &WasmBuffer::GetView); + emscripten::class_>("IntBuffer") .constructor() .class_function("FromArray", &WasmBuffer::FromArray) .function("GetPointer", &WasmBuffer::GetPointer) .function("GetElementCount", &WasmBuffer::GetElementCount) .function("GetView", &WasmBuffer::GetView); - // register_type gives better type information (val is mapped to any by default) + emscripten::register_vector("mjStringVec"); emscripten::register_vector("mjIntVec"); emscripten::register_vector("mjIntVecVec"); emscripten::register_vector("mjFloatVec"); emscripten::register_vector("mjFloatVecVec"); emscripten::register_vector("mjDoubleVec"); + emscripten::register_vector("mjByteVec"); + emscripten::register_vector("MjSolverStatVec"); + emscripten::register_vector("MjTimerStatVec"); + emscripten::register_vector("MjWarningStatVec"); + emscripten::register_vector("MjContactVec"); + emscripten::register_vector("MjvLightVec"); + emscripten::register_vector("MjvGLCameraVec"); + emscripten::register_vector("MjvGeomVec"); + + // register_type() improves type information (val is mapped to any by default) emscripten::register_type("number[]"); emscripten::register_type("string"); - emscripten::register_vector("mjByteVec"); + + emscripten::constant("mjMAXCONPAIR", mjMAXCONPAIR); + emscripten::constant("mjMAXIMP", mjMAXIMP); + emscripten::constant("mjMAXLIGHT", mjMAXLIGHT); + emscripten::constant("mjMAXLINE", mjMAXLINE); + emscripten::constant("mjMAXLINEPNT", mjMAXLINEPNT); + emscripten::constant("mjMAXOVERLAY", mjMAXOVERLAY); + emscripten::constant("mjMAXPLANEGRID", mjMAXPLANEGRID); + emscripten::constant("mjMAXVAL", mjMAXVAL); + emscripten::constant("mjMINIMP", mjMINIMP); + emscripten::constant("mjMINMU", mjMINMU); + emscripten::constant("mjMINVAL", mjMINVAL); + emscripten::constant("mjNBIAS", mjNBIAS); + emscripten::constant("mjNDYN", mjNDYN); + emscripten::constant("mjNEQDATA", mjNEQDATA); + emscripten::constant("mjNGAIN", mjNGAIN); + emscripten::constant("mjNGROUP", mjNGROUP); + emscripten::constant("mjNIMP", mjNIMP); + emscripten::constant("mjNREF", mjNREF); + emscripten::constant("mjNSOLVER", mjNSOLVER); + emscripten::constant("mjPI", mjPI); + emscripten::constant("mjVERSION_HEADER", mjVERSION_HEADER); + + // These complex constants are bound using function() rather than constant() + emscripten::function("get_mjDISABLESTRING", &get_mjDISABLESTRING); + emscripten::function("get_mjENABLESTRING", &get_mjENABLESTRING); + emscripten::function("get_mjFRAMESTRING", &get_mjFRAMESTRING); + emscripten::function("get_mjLABELSTRING", &get_mjLABELSTRING); + emscripten::function("get_mjRNDSTRING", &get_mjRNDSTRING); + emscripten::function("get_mjTIMERSTRING", &get_mjTIMERSTRING); + emscripten::function("get_mjVISSTRING", &get_mjVISSTRING); } } // namespace mujoco::wasm diff --git a/wasm/codegen/generators/enums.py b/wasm/codegen/generators/enums.py index 8e687083..85ff9194 100644 --- a/wasm/codegen/generators/enums.py +++ b/wasm/codegen/generators/enums.py @@ -27,15 +27,13 @@ def generate( """Generates all Embind code for the provided enums.""" builder = code_builder.CodeBuilder() - with builder.block('EMSCRIPTEN_BINDINGS(mujoco_enums)'): - for e in sorted(enums, key=lambda e: e.name): - if e.values: # Skip empty enums. - with builder.block(f'enum_<{e.name}>("{e.name}")', braces=False): - names = list(e.values.keys()) - for name in names[:-1]: - builder.line(f'.value("{name}", {name})') - builder.line(f'.value("{names[-1]}", {names[-1]});') - builder.newline() + for e in sorted(enums, key=lambda e: e.name): + if e.values: # Skip empty enums. + with builder.block(f'enum_<{e.name}>("{e.name}")', braces=False): + names = list(e.values.keys()) + for name in names[:-1]: + builder.line(f'.value("{name}", {name})') + builder.line(f'.value("{names[-1]}", {names[-1]});') content = builder.to_string() marker = '// {{ ENUM_BINDINGS }}' diff --git a/wasm/codegen/templates/bindings.cc b/wasm/codegen/templates/bindings.cc index 1db0553b..6dab67e2 100644 --- a/wasm/codegen/templates/bindings.cc +++ b/wasm/codegen/templates/bindings.cc @@ -108,49 +108,6 @@ val get_mjFRAMESTRING() { return MakeValArray(mjFRAMESTRING); } val get_mjVISSTRING() { return MakeValArray3(mjVISSTRING); } val get_mjRNDSTRING() { return MakeValArray3(mjRNDSTRING); } -EMSCRIPTEN_BINDINGS(mujoco_constants) { - // from mjmodel.h - emscripten::constant("mjPI", mjPI); - emscripten::constant("mjMAXVAL", mjMAXVAL); - emscripten::constant("mjMINMU", mjMINMU); - emscripten::constant("mjMINIMP", mjMINIMP); - emscripten::constant("mjMAXIMP", mjMAXIMP); - emscripten::constant("mjMAXCONPAIR", mjMAXCONPAIR); - emscripten::constant("mjNEQDATA", mjNEQDATA); - emscripten::constant("mjNDYN", mjNDYN); - emscripten::constant("mjNGAIN", mjNGAIN); - emscripten::constant("mjNBIAS", mjNBIAS); - emscripten::constant("mjNREF", mjNREF); - emscripten::constant("mjNIMP", mjNIMP); - emscripten::constant("mjNSOLVER", mjNSOLVER); - - // from mjvisualize.h - emscripten::constant("mjNGROUP", mjNGROUP); - emscripten::constant("mjMAXLIGHT", mjMAXLIGHT); - emscripten::constant("mjMAXOVERLAY", mjMAXOVERLAY); - emscripten::constant("mjMAXLINE", mjMAXLINE); - emscripten::constant("mjMAXLINEPNT", mjMAXLINEPNT); - emscripten::constant("mjMAXPLANEGRID", mjMAXPLANEGRID); - - // from mujoco.h - emscripten::constant("mjVERSION_HEADER", mjVERSION_HEADER); - - // from mjtnum.h - emscripten::constant("mjMINVAL", mjMINVAL); - - // emscripten::constant() is designed for simple, compile-time literal values - // (like numbers or a single string literal), complex values need to be - // bound as functions. - emscripten::function("get_mjDISABLESTRING", &get_mjDISABLESTRING); - emscripten::function("get_mjENABLESTRING", &get_mjENABLESTRING); - emscripten::function("get_mjTIMERSTRING", &get_mjTIMERSTRING); - emscripten::function("get_mjLABELSTRING", &get_mjLABELSTRING); - emscripten::function("get_mjFRAMESTRING", &get_mjFRAMESTRING); - emscripten::function("get_mjVISSTRING", &get_mjVISSTRING); - emscripten::function("get_mjRNDSTRING", &get_mjRNDSTRING); -} - -// {{ ENUM_BINDINGS }} // {{ ANONYMOUS_STRUCT_TYPEDEFS }} @@ -254,48 +211,54 @@ struct MjvScene { std::vector camera; }; -// =============== MjModel =============== // -MjModel::MjModel(mjModel *ptr) +MjModel::MjModel(mjModel* ptr) : ptr_(ptr), opt(&ptr->opt), vis(&ptr->vis), stat(&ptr->stat) {} -MjModel::MjModel(const MjModel &other) + +MjModel::MjModel(const MjModel& other) : ptr_(mj_copyModel(nullptr, other.get())), opt(&ptr_->opt), vis(&ptr_->vis), stat(&ptr_->stat) {} + MjModel::~MjModel() { if (ptr_) { mj_deleteModel(ptr_); } } -mjModel* MjModel::get() const { return ptr_; } -void MjModel::set(mjModel *ptr) { ptr_ = ptr; } -// TODO(manevi): Consider passing `const MjModel& m` here, mj_makeData uses a const model. -// =============== MjData =============== // -MjData::MjData(MjModel *m) { +mjModel* MjModel::get() const { return ptr_; } + +void MjModel::set(mjModel* ptr) { ptr_ = ptr; } + +MjData::MjData(MjModel* m) { model = m->get(); ptr_ = mj_makeData(model); if (ptr_) { - solver = InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); + solver = + InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); timer = InitWrapperArray(get()->timer, mjNTIMER); warning = InitWrapperArray(get()->warning, mjNWARNING); } } -MjData::MjData(const MjModel &model, const MjData &other) + +MjData::MjData(const MjModel& model, const MjData& other) : ptr_(mj_copyData(nullptr, model.get(), other.get())), model(model.get()) { if (ptr_) { - solver = InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); + solver = + InitWrapperArray(get()->solver, mjNSOLVER * mjNISLAND); timer = InitWrapperArray(get()->timer, mjNTIMER); warning = InitWrapperArray(get()->warning, mjNWARNING); } } + MjData::~MjData() { if (ptr_) { mj_deleteData(ptr_); } } mjData* MjData::get() const { return ptr_; } -void MjData::set(mjData *ptr) { ptr_ = ptr; } + +void MjData::set(mjData* ptr) { ptr_ = ptr; } std::vector MjData::contact() const { return InitWrapperArray(get()->contact, get()->ncon); @@ -310,7 +273,7 @@ MjvScene::MjvScene() { camera = InitWrapperArray(ptr_->camera, 2); }; -MjvScene::MjvScene(MjModel *m, int maxgeom) { +MjvScene::MjvScene(MjModel* m, int maxgeom) { owned_ = true; model = m->get(); ptr_ = new mjvScene; @@ -319,6 +282,7 @@ MjvScene::MjvScene(MjModel *m, int maxgeom) { lights = InitWrapperArray(ptr_->lights, mjMAXLIGHT); camera = InitWrapperArray(ptr_->camera, 2); }; + MjvScene::~MjvScene() { if (owned_ && ptr_) { mjv_freeScene(ptr_); @@ -327,7 +291,7 @@ MjvScene::~MjvScene() { } mjvScene* MjvScene::get() const { return ptr_; } -void MjvScene::set(mjvScene *ptr) { ptr_ = ptr; } +void MjvScene::set(mjvScene* ptr) { ptr_ = ptr; } // Taken from the python mujoco bindings code for MjvScene Wrapper int MjvScene::GetSumFlexFaces() const { @@ -422,7 +386,6 @@ MjSpec::~MjSpec() { mjSpec *MjSpec::get() const { return ptr_; } void MjSpec::set(mjSpec *ptr) { ptr_ = ptr; } -// ======= FACTORY AND HELPER FUNCTIONS ========= // std::unique_ptr loadFromXML_wrapper(std::string filename) { char error[1000]; mjModel *model = mj_loadXML(filename.c_str(), nullptr, error, sizeof(error)); @@ -464,10 +427,46 @@ int mj_setLengthRange_wrapper(const MjModel& m, const MjData& d, int index, cons return result; } -EMSCRIPTEN_BINDINGS(mujoco_structs) { +// {{ WRAPPER_FUNCTIONS }} + +EMSCRIPTEN_BINDINGS(mujoco_bindings) { + // {{ ENUM_BINDINGS }} + // {{ STRUCTS_BINDINGS }} - // TODO: should be generated in future CLs -- // + // {{ FUNCTION_BINDINGS }} + + function("parseXMLString", &parseXMLString_wrapper, take_ownership()); + function("error", &error_wrapper); + + emscripten::class_>("FloatBuffer") + .constructor() + .class_function("FromArray", &WasmBuffer::FromArray) + .function("GetPointer", &WasmBuffer::GetPointer) + .function("GetElementCount", &WasmBuffer::GetElementCount) + .function("GetView", &WasmBuffer::GetView); + + emscripten::class_>("DoubleBuffer") + .constructor() + .class_function("FromArray", &WasmBuffer::FromArray) + .function("GetPointer", &WasmBuffer::GetPointer) + .function("GetElementCount", &WasmBuffer::GetElementCount) + .function("GetView", &WasmBuffer::GetView); + + emscripten::class_>("IntBuffer") + .constructor() + .class_function("FromArray", &WasmBuffer::FromArray) + .function("GetPointer", &WasmBuffer::GetPointer) + .function("GetElementCount", &WasmBuffer::GetElementCount) + .function("GetView", &WasmBuffer::GetView); + + emscripten::register_vector("mjStringVec"); + emscripten::register_vector("mjIntVec"); + emscripten::register_vector("mjIntVecVec"); + emscripten::register_vector("mjFloatVec"); + emscripten::register_vector("mjFloatVecVec"); + emscripten::register_vector("mjDoubleVec"); + emscripten::register_vector("mjByteVec"); emscripten::register_vector("MjSolverStatVec"); emscripten::register_vector("MjTimerStatVec"); emscripten::register_vector("MjWarningStatVec"); @@ -475,42 +474,41 @@ EMSCRIPTEN_BINDINGS(mujoco_structs) { emscripten::register_vector("MjvLightVec"); emscripten::register_vector("MjvGLCameraVec"); emscripten::register_vector("MjvGeomVec"); -} -// {{ WRAPPER_FUNCTIONS }} - -EMSCRIPTEN_BINDINGS(mujoco_functions) { - function("parseXMLString", &parseXMLString_wrapper, take_ownership()); - function("error", &error_wrapper); - // {{ FUNCTION_BINDINGS }} - emscripten::class_>("FloatBuffer") - .constructor() - .class_function("FromArray", &WasmBuffer::FromArray) - .function("GetPointer", &WasmBuffer::GetPointer) - .function("GetElementCount", &WasmBuffer::GetElementCount) - .function("GetView", &WasmBuffer::GetView); - emscripten::class_>("DoubleBuffer") - .constructor() - .class_function("FromArray", &WasmBuffer::FromArray) - .function("GetPointer", &WasmBuffer::GetPointer) - .function("GetElementCount", &WasmBuffer::GetElementCount) - .function("GetView", &WasmBuffer::GetView); - emscripten::class_>("IntBuffer") - .constructor() - .class_function("FromArray", &WasmBuffer::FromArray) - .function("GetPointer", &WasmBuffer::GetPointer) - .function("GetElementCount", &WasmBuffer::GetElementCount) - .function("GetView", &WasmBuffer::GetView); - // register_type gives better type information (val is mapped to any by default) - emscripten::register_vector("mjStringVec"); - emscripten::register_vector("mjIntVec"); - emscripten::register_vector("mjIntVecVec"); - emscripten::register_vector("mjFloatVec"); - emscripten::register_vector("mjFloatVecVec"); - emscripten::register_vector("mjDoubleVec"); + // register_type() improves type information (val is mapped to any by default) emscripten::register_type("number[]"); emscripten::register_type("string"); - emscripten::register_vector("mjByteVec"); + + emscripten::constant("mjMAXCONPAIR", mjMAXCONPAIR); + emscripten::constant("mjMAXIMP", mjMAXIMP); + emscripten::constant("mjMAXLIGHT", mjMAXLIGHT); + emscripten::constant("mjMAXLINE", mjMAXLINE); + emscripten::constant("mjMAXLINEPNT", mjMAXLINEPNT); + emscripten::constant("mjMAXOVERLAY", mjMAXOVERLAY); + emscripten::constant("mjMAXPLANEGRID", mjMAXPLANEGRID); + emscripten::constant("mjMAXVAL", mjMAXVAL); + emscripten::constant("mjMINIMP", mjMINIMP); + emscripten::constant("mjMINMU", mjMINMU); + emscripten::constant("mjMINVAL", mjMINVAL); + emscripten::constant("mjNBIAS", mjNBIAS); + emscripten::constant("mjNDYN", mjNDYN); + emscripten::constant("mjNEQDATA", mjNEQDATA); + emscripten::constant("mjNGAIN", mjNGAIN); + emscripten::constant("mjNGROUP", mjNGROUP); + emscripten::constant("mjNIMP", mjNIMP); + emscripten::constant("mjNREF", mjNREF); + emscripten::constant("mjNSOLVER", mjNSOLVER); + emscripten::constant("mjPI", mjPI); + emscripten::constant("mjVERSION_HEADER", mjVERSION_HEADER); + + // These complex constants are bound using function() rather than constant() + emscripten::function("get_mjDISABLESTRING", &get_mjDISABLESTRING); + emscripten::function("get_mjENABLESTRING", &get_mjENABLESTRING); + emscripten::function("get_mjFRAMESTRING", &get_mjFRAMESTRING); + emscripten::function("get_mjLABELSTRING", &get_mjLABELSTRING); + emscripten::function("get_mjRNDSTRING", &get_mjRNDSTRING); + emscripten::function("get_mjTIMERSTRING", &get_mjTIMERSTRING); + emscripten::function("get_mjVISSTRING", &get_mjVISSTRING); } } // namespace mujoco::wasm diff --git a/wasm/codegen/tests/generators_test.py b/wasm/codegen/tests/generators_test.py index 2feb667e..05499343 100644 --- a/wasm/codegen/tests/generators_test.py +++ b/wasm/codegen/tests/generators_test.py @@ -801,17 +801,14 @@ class EnumsGeneratorTest(absltest.TestCase): def test_generate_enum_bindings(self): expected_code = """ -EMSCRIPTEN_BINDINGS(mujoco_enums) { - enum_("AnotherEnum") - .value("ALPHA", ALPHA) - .value("BETA", BETA); - - enum_("TestEnum") - .value("FIRST_VAL", FIRST_VAL) - .value("SECOND_VAL", SECOND_VAL) - .value("THIRD_VAL", THIRD_VAL); - -}""".strip() +enum_("AnotherEnum") + .value("ALPHA", ALPHA) + .value("BETA", BETA); +enum_("TestEnum") + .value("FIRST_VAL", FIRST_VAL) + .value("SECOND_VAL", SECOND_VAL) + .value("THIRD_VAL", THIRD_VAL); +""".strip() markers_and_content = enums.generate([ ast_nodes.EnumDecl(