Remove MjVFS from generated Emscripten bindings.
PiperOrigin-RevId: 828943991 Change-Id: I681079854c71059392518c328a4488bb47127433
This commit is contained in:
committed by
Copybara-Service
parent
8051f40817
commit
b807d5f852
@@ -508,19 +508,6 @@ struct MjTimerStat {
|
|||||||
bool owned_ = false;
|
bool owned_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MjVFS {
|
|
||||||
explicit MjVFS(mjVFS *ptr);
|
|
||||||
~MjVFS();
|
|
||||||
MjVFS();
|
|
||||||
mjVFS* get() const;
|
|
||||||
void set(mjVFS* ptr);
|
|
||||||
// TODO: Define primitive pointer field with complex extents manually for impl_
|
|
||||||
|
|
||||||
private:
|
|
||||||
mjVFS* ptr_;
|
|
||||||
bool owned_ = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct MjVisualGlobal {
|
struct MjVisualGlobal {
|
||||||
explicit MjVisualGlobal(mjVisualGlobal *ptr);
|
explicit MjVisualGlobal(mjVisualGlobal *ptr);
|
||||||
~MjVisualGlobal();
|
~MjVisualGlobal();
|
||||||
@@ -7554,23 +7541,6 @@ void MjTimerStat::set(mjTimerStat* ptr) {
|
|||||||
ptr_ = ptr;
|
ptr_ = ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
MjVFS::MjVFS(mjVFS *ptr) : ptr_(ptr) {}
|
|
||||||
MjVFS::~MjVFS() {
|
|
||||||
if (owned_ && ptr_) {
|
|
||||||
mj_deleteVFS(ptr_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MjVFS::MjVFS() : ptr_(new mjVFS) {
|
|
||||||
owned_ = true;
|
|
||||||
mj_defaultVFS(ptr_);
|
|
||||||
}
|
|
||||||
mjVFS* MjVFS::get() const {
|
|
||||||
return ptr_;
|
|
||||||
}
|
|
||||||
void MjVFS::set(mjVFS* ptr) {
|
|
||||||
ptr_ = ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
MjVisual::MjVisual(mjVisual *ptr) : ptr_(ptr), global(&ptr_->global), quality(&ptr_->quality), headlight(&ptr_->headlight), map(&ptr_->map), scale(&ptr_->scale), rgba(&ptr_->rgba) {}
|
MjVisual::MjVisual(mjVisual *ptr) : ptr_(ptr), global(&ptr_->global), quality(&ptr_->quality), headlight(&ptr_->headlight), map(&ptr_->map), scale(&ptr_->scale), rgba(&ptr_->rgba) {}
|
||||||
MjVisual::~MjVisual() {
|
MjVisual::~MjVisual() {
|
||||||
if (owned_ && ptr_) {
|
if (owned_ && ptr_) {
|
||||||
@@ -9407,10 +9377,6 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
|
|||||||
.property("duration", &MjTimerStat::duration, &MjTimerStat::set_duration, reference())
|
.property("duration", &MjTimerStat::duration, &MjTimerStat::set_duration, reference())
|
||||||
.property("number", &MjTimerStat::number, &MjTimerStat::set_number, reference())
|
.property("number", &MjTimerStat::number, &MjTimerStat::set_number, reference())
|
||||||
;
|
;
|
||||||
emscripten::class_<MjVFS>("MjVFS")
|
|
||||||
.constructor<>()
|
|
||||||
// TODO: .property("impl_", &MjVFS::impl_)
|
|
||||||
;
|
|
||||||
emscripten::class_<MjVisual>("MjVisual")
|
emscripten::class_<MjVisual>("MjVisual")
|
||||||
.constructor<>()
|
.constructor<>()
|
||||||
.function("copy", &MjVisual::copy, take_ownership())
|
.function("copy", &MjVisual::copy, take_ownership())
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ SKIPPED_STRUCTS: List[str] = [
|
|||||||
"mjTask",
|
"mjTask",
|
||||||
"mjThreadPool",
|
"mjThreadPool",
|
||||||
"mjUI",
|
"mjUI",
|
||||||
|
"mjVFS",
|
||||||
"mjrContext",
|
"mjrContext",
|
||||||
"mjrRect",
|
"mjrRect",
|
||||||
"mjuiDef",
|
"mjuiDef",
|
||||||
@@ -302,7 +303,7 @@ SKIPPED_STRUCTS: List[str] = [
|
|||||||
"mjuiSection",
|
"mjuiSection",
|
||||||
"mjuiState",
|
"mjuiState",
|
||||||
"mjuiThemeColor",
|
"mjuiThemeColor",
|
||||||
"mjuiThemeSpacing",
|
"mjuiThemeSpacing"
|
||||||
# go/keep-sorted end
|
# go/keep-sorted end
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user