Remove MjVFS from generated Emscripten bindings.

PiperOrigin-RevId: 828943991
Change-Id: I681079854c71059392518c328a4488bb47127433
This commit is contained in:
Google DeepMind
2025-11-06 07:19:04 -08:00
committed by Copybara-Service
parent 8051f40817
commit b807d5f852
2 changed files with 2 additions and 35 deletions
-34
View File
@@ -508,19 +508,6 @@ struct MjTimerStat {
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 {
explicit MjVisualGlobal(mjVisualGlobal *ptr);
~MjVisualGlobal();
@@ -7554,23 +7541,6 @@ void MjTimerStat::set(mjTimerStat* 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() {
if (owned_ && ptr_) {
@@ -9407,10 +9377,6 @@ EMSCRIPTEN_BINDINGS(mujoco_bindings) {
.property("duration", &MjTimerStat::duration, &MjTimerStat::set_duration, reference())
.property("number", &MjTimerStat::number, &MjTimerStat::set_number, reference())
;
emscripten::class_<MjVFS>("MjVFS")
.constructor<>()
// TODO: .property("impl_", &MjVFS::impl_)
;
emscripten::class_<MjVisual>("MjVisual")
.constructor<>()
.function("copy", &MjVisual::copy, take_ownership())
+2 -1
View File
@@ -295,6 +295,7 @@ SKIPPED_STRUCTS: List[str] = [
"mjTask",
"mjThreadPool",
"mjUI",
"mjVFS",
"mjrContext",
"mjrRect",
"mjuiDef",
@@ -302,7 +303,7 @@ SKIPPED_STRUCTS: List[str] = [
"mjuiSection",
"mjuiState",
"mjuiThemeColor",
"mjuiThemeSpacing",
"mjuiThemeSpacing"
# go/keep-sorted end
]