Cleanup model loading flow.
Inlines the platform::LoadMujocoModel into the App class which simplifies the logic and allows us to correctly display loading errors. Also updates shortcuts: Load Model (Ctrl+L) -> Open File (Ctrl+O) Reload Model (Ctrl+R) -> Reload Model (Ctrl+L) PiperOrigin-RevId: 840232553 Change-Id: I957d29046ae681d2aeb69310c3a2eec64d042d49
This commit is contained in:
committed by
Copybara-Service
parent
8823e9fedf
commit
c5cd276e1f
@@ -130,8 +130,9 @@ class App {
|
||||
std::string last_print_data_file;
|
||||
};
|
||||
|
||||
void OnModelLoaded(std::string_view model_file);
|
||||
void ClearModel();
|
||||
void ProcessPendingLoad();
|
||||
bool IsModelLoaded() const;
|
||||
|
||||
void ResetPhysics();
|
||||
void UpdatePhysics();
|
||||
@@ -173,6 +174,7 @@ class App {
|
||||
platform::SimProfiler profiler_;
|
||||
platform::SimHistory history_;
|
||||
|
||||
mjSpec* spec_ = nullptr;
|
||||
mjModel* model_ = nullptr;
|
||||
mjData* data_ = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user