Cleanup WASM bindings struct generation
PiperOrigin-RevId: 827949686 Change-Id: I4115e397f64963244e3c30a7eaff5be7534aadf2
This commit is contained in:
committed by
Copybara-Service
parent
4b79a58fa0
commit
776fc32eb4
+570
-439
File diff suppressed because it is too large
Load Diff
@@ -294,6 +294,11 @@ class StructConstructorCodeBuilderTest(absltest.TestCase):
|
|||||||
wrapped_structs["mjLROpt"].wrapped_source,
|
wrapped_structs["mjLROpt"].wrapped_source,
|
||||||
"""
|
"""
|
||||||
MjLROpt::MjLROpt(mjLROpt *ptr) : ptr_(ptr) {}
|
MjLROpt::MjLROpt(mjLROpt *ptr) : ptr_(ptr) {}
|
||||||
|
MjLROpt::~MjLROpt() {
|
||||||
|
if (owned_ && ptr_) {
|
||||||
|
delete ptr_;
|
||||||
|
}
|
||||||
|
}
|
||||||
MjLROpt::MjLROpt() : ptr_(new mjLROpt) {
|
MjLROpt::MjLROpt() : ptr_(new mjLROpt) {
|
||||||
owned_ = true;
|
owned_ = true;
|
||||||
mj_defaultLROpt(ptr_);
|
mj_defaultLROpt(ptr_);
|
||||||
@@ -308,14 +313,15 @@ MjLROpt& MjLROpt::operator=(const MjLROpt &other) {
|
|||||||
*ptr_ = *other.get();
|
*ptr_ = *other.get();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
MjLROpt::~MjLROpt() {
|
|
||||||
if (owned_ && ptr_) {
|
|
||||||
delete ptr_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::unique_ptr<MjLROpt> MjLROpt::copy() {
|
std::unique_ptr<MjLROpt> MjLROpt::copy() {
|
||||||
return std::make_unique<MjLROpt>(*this);
|
return std::make_unique<MjLROpt>(*this);
|
||||||
}
|
}
|
||||||
|
mjLROpt* MjLROpt::get() const {
|
||||||
|
return ptr_;
|
||||||
|
}
|
||||||
|
void MjLROpt::set(mjLROpt* ptr) {
|
||||||
|
ptr_ = ptr;
|
||||||
|
}
|
||||||
""".strip(),
|
""".strip(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -326,8 +332,11 @@ std::unique_ptr<MjLROpt> MjLROpt::copy() {
|
|||||||
"""
|
"""
|
||||||
MjsElement::MjsElement(mjsElement *ptr) : ptr_(ptr) {}
|
MjsElement::MjsElement(mjsElement *ptr) : ptr_(ptr) {}
|
||||||
MjsElement::~MjsElement() {}
|
MjsElement::~MjsElement() {}
|
||||||
std::unique_ptr<MjsElement> MjsElement::copy() {
|
mjsElement* MjsElement::get() const {
|
||||||
return std::make_unique<MjsElement>(*this);
|
return ptr_;
|
||||||
|
}
|
||||||
|
void MjsElement::set(mjsElement* ptr) {
|
||||||
|
ptr_ = ptr;
|
||||||
}
|
}
|
||||||
""".strip(),
|
""".strip(),
|
||||||
)
|
)
|
||||||
@@ -351,6 +360,12 @@ std::unique_ptr<MjsElement> MjsElement::copy() {
|
|||||||
"""
|
"""
|
||||||
MjsTexture::MjsTexture(mjsTexture *ptr) : ptr_(ptr), element(ptr_->element) {}
|
MjsTexture::MjsTexture(mjsTexture *ptr) : ptr_(ptr), element(ptr_->element) {}
|
||||||
MjsTexture::~MjsTexture() {}
|
MjsTexture::~MjsTexture() {}
|
||||||
|
mjsTexture* MjsTexture::get() const {
|
||||||
|
return ptr_;
|
||||||
|
}
|
||||||
|
void MjsTexture::set(mjsTexture* ptr) {
|
||||||
|
ptr_ = ptr;
|
||||||
|
}
|
||||||
""".strip(),
|
""".strip(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -358,6 +373,11 @@ MjsTexture::~MjsTexture() {}
|
|||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
structs.build_struct_source("mjvLight", []),
|
structs.build_struct_source("mjvLight", []),
|
||||||
"""MjvLight::MjvLight(mjvLight *ptr) : ptr_(ptr) {}
|
"""MjvLight::MjvLight(mjvLight *ptr) : ptr_(ptr) {}
|
||||||
|
MjvLight::~MjvLight() {
|
||||||
|
if (owned_ && ptr_) {
|
||||||
|
delete ptr_;
|
||||||
|
}
|
||||||
|
}
|
||||||
MjvLight::MjvLight() : ptr_(new mjvLight) {
|
MjvLight::MjvLight() : ptr_(new mjvLight) {
|
||||||
owned_ = true;
|
owned_ = true;
|
||||||
}
|
}
|
||||||
@@ -371,14 +391,16 @@ MjvLight& MjvLight::operator=(const MjvLight &other) {
|
|||||||
*ptr_ = *other.get();
|
*ptr_ = *other.get();
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
MjvLight::~MjvLight() {
|
|
||||||
if (owned_ && ptr_) {
|
|
||||||
delete ptr_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
std::unique_ptr<MjvLight> MjvLight::copy() {
|
std::unique_ptr<MjvLight> MjvLight::copy() {
|
||||||
return std::make_unique<MjvLight>(*this);
|
return std::make_unique<MjvLight>(*this);
|
||||||
}""".strip(),
|
}
|
||||||
|
mjvLight* MjvLight::get() const {
|
||||||
|
return ptr_;
|
||||||
|
}
|
||||||
|
void MjvLight::set(mjvLight* ptr) {
|
||||||
|
ptr_ = ptr;
|
||||||
|
}
|
||||||
|
""".strip(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -459,28 +459,25 @@ def _build_struct_header_internal(
|
|||||||
|
|
||||||
builder = code_builder.CodeBuilder()
|
builder = code_builder.CodeBuilder()
|
||||||
with builder.struct(f"{w}"):
|
with builder.struct(f"{w}"):
|
||||||
if not is_mjs:
|
|
||||||
builder.line(f"{w}();")
|
|
||||||
builder.line(f"{w}(const {w} &);")
|
|
||||||
builder.line(f"{w} &operator=(const {w} &);")
|
|
||||||
|
|
||||||
builder.line(f"explicit {w}({s} *ptr);")
|
builder.line(f"explicit {w}({s} *ptr);")
|
||||||
builder.line(f"~{w}();")
|
builder.line(f"~{w}();")
|
||||||
|
|
||||||
if shallow_copy:
|
if not is_mjs:
|
||||||
|
builder.line(f"{w}();")
|
||||||
|
|
||||||
|
if shallow_copy and not is_mjs:
|
||||||
|
builder.line(f"{w}(const {w} &);")
|
||||||
|
builder.line(f"{w} &operator=(const {w} &);")
|
||||||
builder.line(f"std::unique_ptr<{w}> copy();")
|
builder.line(f"std::unique_ptr<{w}> copy();")
|
||||||
|
|
||||||
|
builder.line(f"{s}* get() const;")
|
||||||
|
builder.line(f"void set({s}* ptr);")
|
||||||
|
|
||||||
for field in wrapped_fields:
|
for field in wrapped_fields:
|
||||||
if field.definition and field not in fields_with_init:
|
if field.definition and field not in fields_with_init:
|
||||||
for line in field.definition.splitlines():
|
for line in field.definition.splitlines():
|
||||||
builder.line(line)
|
builder.line(line)
|
||||||
|
|
||||||
with builder.function(f"{s}* get() const"):
|
|
||||||
builder.line("return ptr_;")
|
|
||||||
|
|
||||||
with builder.function(f"void set({s}* ptr)"):
|
|
||||||
builder.line("ptr_ = ptr;")
|
|
||||||
|
|
||||||
builder.private()
|
builder.private()
|
||||||
builder.line(f"{s}* ptr_;")
|
builder.line(f"{s}* ptr_;")
|
||||||
if not is_mjs:
|
if not is_mjs:
|
||||||
@@ -491,6 +488,7 @@ def _build_struct_header_internal(
|
|||||||
for field in fields_with_init:
|
for field in fields_with_init:
|
||||||
if field.definition:
|
if field.definition:
|
||||||
builder.line(f"{field.definition}")
|
builder.line(f"{field.definition}")
|
||||||
|
|
||||||
return builder.to_string() + ";"
|
return builder.to_string() + ";"
|
||||||
|
|
||||||
|
|
||||||
@@ -600,8 +598,15 @@ def build_struct_source(
|
|||||||
with builder.function(f"{w}::{w}({s} *ptr) : ptr_(ptr){fields_init}"):
|
with builder.function(f"{w}::{w}({s} *ptr) : ptr_(ptr){fields_init}"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# constructor with default values
|
# destructor
|
||||||
|
with builder.function(f"{w}::~{w}()"):
|
||||||
if not is_mjs:
|
if not is_mjs:
|
||||||
|
with builder.block("if (owned_ && ptr_)"):
|
||||||
|
delete_ptr = _delete_ptr_statement(s)
|
||||||
|
builder.line(delete_ptr)
|
||||||
|
|
||||||
|
if not is_mjs:
|
||||||
|
# default constructor
|
||||||
with builder.function(f"{w}::{w}() : ptr_(new {s}){fields_init}"):
|
with builder.function(f"{w}::{w}() : ptr_(new {s}){fields_init}"):
|
||||||
builder.line("owned_ = true;")
|
builder.line("owned_ = true;")
|
||||||
default_func = _default_function_statement(s)
|
default_func = _default_function_statement(s)
|
||||||
@@ -626,18 +631,16 @@ def build_struct_source(
|
|||||||
builder.line(field_with_init.ptr_copy_reset)
|
builder.line(field_with_init.ptr_copy_reset)
|
||||||
builder.line("return *this;")
|
builder.line("return *this;")
|
||||||
|
|
||||||
# destructor
|
# explicit copy function
|
||||||
with builder.function(f"{w}::~{w}()"):
|
|
||||||
if not is_mjs:
|
|
||||||
with builder.block("if (owned_ && ptr_)"):
|
|
||||||
delete_ptr = _delete_ptr_statement(s)
|
|
||||||
builder.line(delete_ptr)
|
|
||||||
|
|
||||||
# copy function
|
|
||||||
if shallow_copy:
|
|
||||||
with builder.function(f"std::unique_ptr<{w}> {w}::copy()"):
|
with builder.function(f"std::unique_ptr<{w}> {w}::copy()"):
|
||||||
builder.line(f"return std::make_unique<{w}>(*this);")
|
builder.line(f"return std::make_unique<{w}>(*this);")
|
||||||
|
|
||||||
|
with builder.function(f"{s}* {w}::get() const"):
|
||||||
|
builder.line("return ptr_;")
|
||||||
|
|
||||||
|
with builder.function(f"void {w}::set({s}* ptr)"):
|
||||||
|
builder.line("ptr_ = ptr;")
|
||||||
|
|
||||||
return builder.to_string()
|
return builder.to_string()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ struct MjVisualGlobal {
|
|||||||
MjVisualGlobal &operator=(const MjVisualGlobal &);
|
MjVisualGlobal &operator=(const MjVisualGlobal &);
|
||||||
~MjVisualGlobal();
|
~MjVisualGlobal();
|
||||||
std::unique_ptr<MjVisualGlobal> copy();
|
std::unique_ptr<MjVisualGlobal> copy();
|
||||||
|
mjVisualGlobal* get() const;
|
||||||
|
void set(mjVisualGlobal* ptr);
|
||||||
// INSERT-GENERATED-MjVisualGlobal-DEFINITIONS
|
// INSERT-GENERATED-MjVisualGlobal-DEFINITIONS
|
||||||
mjVisualGlobal* get() const { return ptr_; }
|
|
||||||
void set(mjVisualGlobal* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualGlobal* ptr_;
|
mjVisualGlobal* ptr_;
|
||||||
@@ -71,9 +71,9 @@ struct MjVisualQuality {
|
|||||||
MjVisualQuality &operator=(const MjVisualQuality &);
|
MjVisualQuality &operator=(const MjVisualQuality &);
|
||||||
~MjVisualQuality();
|
~MjVisualQuality();
|
||||||
std::unique_ptr<MjVisualQuality> copy();
|
std::unique_ptr<MjVisualQuality> copy();
|
||||||
|
mjVisualQuality* get() const;
|
||||||
|
void set(mjVisualQuality* ptr);
|
||||||
// INSERT-GENERATED-MjVisualQuality-DEFINITIONS
|
// INSERT-GENERATED-MjVisualQuality-DEFINITIONS
|
||||||
mjVisualQuality* get() const { return ptr_; }
|
|
||||||
void set(mjVisualQuality* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualQuality* ptr_;
|
mjVisualQuality* ptr_;
|
||||||
@@ -87,9 +87,9 @@ struct MjVisualHeadlight {
|
|||||||
MjVisualHeadlight &operator=(const MjVisualHeadlight &);
|
MjVisualHeadlight &operator=(const MjVisualHeadlight &);
|
||||||
~MjVisualHeadlight();
|
~MjVisualHeadlight();
|
||||||
std::unique_ptr<MjVisualHeadlight> copy();
|
std::unique_ptr<MjVisualHeadlight> copy();
|
||||||
|
mjVisualHeadlight* get() const;
|
||||||
|
void set(mjVisualHeadlight* ptr);
|
||||||
// INSERT-GENERATED-MjVisualHeadlight-DEFINITIONS
|
// INSERT-GENERATED-MjVisualHeadlight-DEFINITIONS
|
||||||
mjVisualHeadlight* get() const { return ptr_; }
|
|
||||||
void set(mjVisualHeadlight* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualHeadlight* ptr_;
|
mjVisualHeadlight* ptr_;
|
||||||
@@ -103,9 +103,9 @@ struct MjVisualMap {
|
|||||||
MjVisualMap &operator=(const MjVisualMap &);
|
MjVisualMap &operator=(const MjVisualMap &);
|
||||||
~MjVisualMap();
|
~MjVisualMap();
|
||||||
std::unique_ptr<MjVisualMap> copy();
|
std::unique_ptr<MjVisualMap> copy();
|
||||||
|
mjVisualMap* get() const;
|
||||||
|
void set(mjVisualMap* ptr);
|
||||||
// INSERT-GENERATED-MjVisualMap-DEFINITIONS
|
// INSERT-GENERATED-MjVisualMap-DEFINITIONS
|
||||||
mjVisualMap* get() const { return ptr_; }
|
|
||||||
void set(mjVisualMap* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualMap* ptr_;
|
mjVisualMap* ptr_;
|
||||||
@@ -119,9 +119,9 @@ struct MjVisualScale {
|
|||||||
MjVisualScale &operator=(const MjVisualScale &);
|
MjVisualScale &operator=(const MjVisualScale &);
|
||||||
~MjVisualScale();
|
~MjVisualScale();
|
||||||
std::unique_ptr<MjVisualScale> copy();
|
std::unique_ptr<MjVisualScale> copy();
|
||||||
|
mjVisualScale* get() const;
|
||||||
|
void set(mjVisualScale* ptr);
|
||||||
// INSERT-GENERATED-MjVisualScale-DEFINITIONS
|
// INSERT-GENERATED-MjVisualScale-DEFINITIONS
|
||||||
mjVisualScale* get() const { return ptr_; }
|
|
||||||
void set(mjVisualScale* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualScale* ptr_;
|
mjVisualScale* ptr_;
|
||||||
@@ -135,9 +135,9 @@ struct MjVisualRgba {
|
|||||||
MjVisualRgba &operator=(const MjVisualRgba &);
|
MjVisualRgba &operator=(const MjVisualRgba &);
|
||||||
~MjVisualRgba();
|
~MjVisualRgba();
|
||||||
std::unique_ptr<MjVisualRgba> copy();
|
std::unique_ptr<MjVisualRgba> copy();
|
||||||
|
mjVisualRgba* get() const;
|
||||||
|
void set(mjVisualRgba* ptr);
|
||||||
// INSERT-GENERATED-MjVisualRgba-DEFINITIONS
|
// INSERT-GENERATED-MjVisualRgba-DEFINITIONS
|
||||||
mjVisualRgba* get() const { return ptr_; }
|
|
||||||
void set(mjVisualRgba* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisualRgba* ptr_;
|
mjVisualRgba* ptr_;
|
||||||
@@ -151,9 +151,9 @@ struct MjVisual {
|
|||||||
MjVisual &operator=(const MjVisual &);
|
MjVisual &operator=(const MjVisual &);
|
||||||
~MjVisual();
|
~MjVisual();
|
||||||
std::unique_ptr<MjVisual> copy();
|
std::unique_ptr<MjVisual> copy();
|
||||||
|
mjVisual* get() const;
|
||||||
|
void set(mjVisual* ptr);
|
||||||
// INSERT-GENERATED-MjVisual-DEFINITIONS
|
// INSERT-GENERATED-MjVisual-DEFINITIONS
|
||||||
mjVisual* get() const { return ptr_; }
|
|
||||||
void set(mjVisual* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjVisual* ptr_;
|
mjVisual* ptr_;
|
||||||
@@ -173,9 +173,9 @@ struct MjModel {
|
|||||||
explicit MjModel(const MjModel &other);
|
explicit MjModel(const MjModel &other);
|
||||||
~MjModel();
|
~MjModel();
|
||||||
std::unique_ptr<MjModel> copy();
|
std::unique_ptr<MjModel> copy();
|
||||||
|
mjModel* get() const;
|
||||||
|
void set(mjModel* ptr);
|
||||||
// INSERT-GENERATED-MjModel-DEFINITIONS
|
// INSERT-GENERATED-MjModel-DEFINITIONS
|
||||||
mjModel* get() const { return ptr_; }
|
|
||||||
void set(mjModel* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjModel* ptr_;
|
mjModel* ptr_;
|
||||||
@@ -195,9 +195,9 @@ struct MjData {
|
|||||||
std::vector<MjWarningStat> InitWarningArray();
|
std::vector<MjWarningStat> InitWarningArray();
|
||||||
std::vector<MjContact> contact() const;
|
std::vector<MjContact> contact() const;
|
||||||
std::unique_ptr<MjData> copy();
|
std::unique_ptr<MjData> copy();
|
||||||
|
mjData* get() const;
|
||||||
|
void set(mjData* ptr);
|
||||||
// INSERT-GENERATED-MjData-DEFINITIONS
|
// INSERT-GENERATED-MjData-DEFINITIONS
|
||||||
mjData* get() const { return ptr_; }
|
|
||||||
void set(mjData* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjData* ptr_;
|
mjData* ptr_;
|
||||||
@@ -219,6 +219,9 @@ struct MjvScene {
|
|||||||
std::vector<MjvLight> InitLightsArray();
|
std::vector<MjvLight> InitLightsArray();
|
||||||
std::vector<MjvGLCamera> InitCameraArray();
|
std::vector<MjvGLCamera> InitCameraArray();
|
||||||
|
|
||||||
|
mjvScene* get() const;
|
||||||
|
void set(mjvScene* ptr);
|
||||||
|
|
||||||
std::vector<MjvGeom> geoms() const;
|
std::vector<MjvGeom> geoms() const;
|
||||||
|
|
||||||
emscripten::val geomorder() const {
|
emscripten::val geomorder() const {
|
||||||
@@ -294,8 +297,6 @@ struct MjvScene {
|
|||||||
6 * MjvScene::GetSumFlexFaces(), ptr_->flextexcoord));
|
6 * MjvScene::GetSumFlexFaces(), ptr_->flextexcoord));
|
||||||
}
|
}
|
||||||
// INSERT-GENERATED-MjvScene-DEFINITIONS
|
// INSERT-GENERATED-MjvScene-DEFINITIONS
|
||||||
mjvScene* get() const { return ptr_; }
|
|
||||||
void set(mjvScene* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjvScene* ptr_;
|
mjvScene* ptr_;
|
||||||
@@ -314,9 +315,9 @@ struct MjSpec {
|
|||||||
MjSpec &operator=(const MjSpec &);
|
MjSpec &operator=(const MjSpec &);
|
||||||
~MjSpec();
|
~MjSpec();
|
||||||
std::unique_ptr<MjSpec> copy();
|
std::unique_ptr<MjSpec> copy();
|
||||||
|
mjSpec* get() const;
|
||||||
|
void set(mjSpec* ptr);
|
||||||
// INSERT-GENERATED-MjSpec-DEFINITIONS
|
// INSERT-GENERATED-MjSpec-DEFINITIONS
|
||||||
mjSpec* get() const { return ptr_; }
|
|
||||||
void set(mjSpec* ptr) { ptr_ = ptr; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mjSpec* ptr_;
|
mjSpec* ptr_;
|
||||||
@@ -495,6 +496,8 @@ MjModel::~MjModel() {
|
|||||||
mj_deleteModel(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.
|
// TODO(manevi): Consider passing `const MjModel& m` here, mj_makeData uses a const model.
|
||||||
// =============== MjData =============== //
|
// =============== MjData =============== //
|
||||||
@@ -520,6 +523,9 @@ MjData::~MjData() {
|
|||||||
mj_deleteData(ptr_);
|
mj_deleteData(ptr_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mjData* MjData::get() const { return ptr_; }
|
||||||
|
void MjData::set(mjData *ptr) { ptr_ = ptr; }
|
||||||
|
|
||||||
std::vector<MjSolverStat> MjData::InitSolverArray() {
|
std::vector<MjSolverStat> MjData::InitSolverArray() {
|
||||||
std::vector<MjSolverStat> arr;
|
std::vector<MjSolverStat> arr;
|
||||||
arr.reserve(mjNSOLVER * mjNISLAND);
|
arr.reserve(mjNSOLVER * mjNISLAND);
|
||||||
@@ -597,6 +603,9 @@ MjvScene::~MjvScene() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mjvScene* MjvScene::get() const { return ptr_; }
|
||||||
|
void MjvScene::set(mjvScene *ptr) { ptr_ = ptr; }
|
||||||
|
|
||||||
// Taken from the python mujoco bindings code for MjvScene Wrapper
|
// Taken from the python mujoco bindings code for MjvScene Wrapper
|
||||||
int MjvScene::GetSumFlexFaces() const {
|
int MjvScene::GetSumFlexFaces() const {
|
||||||
int nflexface = 0;
|
int nflexface = 0;
|
||||||
@@ -720,6 +729,9 @@ MjSpec::~MjSpec() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mjSpec *MjSpec::get() const { return ptr_; }
|
||||||
|
void MjSpec::set(mjSpec *ptr) { ptr_ = ptr; }
|
||||||
|
|
||||||
// =============== MjsOrientation =============== //
|
// =============== MjsOrientation =============== //
|
||||||
// INSERT-GENERATED-MjsOrientation-CONSTRUCTOR
|
// INSERT-GENERATED-MjsOrientation-CONSTRUCTOR
|
||||||
|
|
||||||
@@ -965,7 +977,6 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
|||||||
;
|
;
|
||||||
|
|
||||||
emscripten::class_<MjsOrientation>("MjsOrientation")
|
emscripten::class_<MjsOrientation>("MjsOrientation")
|
||||||
.function("copy", &MjsOrientation::copy, take_ownership())
|
|
||||||
// INSERT-GENERATED-MjsOrientation-BINDINGS
|
// INSERT-GENERATED-MjsOrientation-BINDINGS
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user