Remove Sync and Scene functions from Renderer.

PiperOrigin-RevId: 828481721
Change-Id: Id0399139653b0ec27f0d365437e62cadefadfe6c
This commit is contained in:
Haroon Qureshi
2025-11-05 08:32:27 -08:00
committed by Copybara-Service
parent 17d36d8e75
commit 8b7eb097db
5 changed files with 5 additions and 22 deletions
+5 -7
View File
@@ -49,16 +49,14 @@ void Renderer::Deinit() {
initialized_ = false;
}
void Renderer::Sync(const mjModel* model, mjData* data,
const mjvPerturb* perturb, mjvCamera* camera,
const mjvOption* vis_option) {
mjv_updateScene(model, data, vis_option, perturb, camera, mjCAT_ALL,
&scene_);
}
void Renderer::Render(const mjModel* model, mjData* data,
const mjvPerturb* perturb, mjvCamera* camera,
const mjvOption* vis_option, int width, int height) {
if (initialized_) {
mjv_updateScene(model, data, vis_option, perturb, camera, mjCAT_ALL,
&scene_);
}
mjrRect main_viewport = {0, 0, width, height};
mjr_render(main_viewport, data ? &scene_ : nullptr, &render_context_);
-7
View File
@@ -42,10 +42,6 @@ class Renderer {
// Initializes the renderer with the given mjModel.
void Init(const mjModel* model);
// Updates the render scene with the current simulation state.
void Sync(const mjModel* model, mjData* data, const mjvPerturb* perturb,
mjvCamera* camera, const mjvOption* vis_option);
// Renders the simulation state into the active window. Also renders the imgui
// state, but that is obtained directly from the ImGui library.
void Render(const mjModel* model, mjData* data, const mjvPerturb* perturb,
@@ -59,9 +55,6 @@ class Renderer {
mjtByte GetFlag(mjtRndFlag flag) const { return scene_.flags[flag];}
void SetFlag(mjtRndFlag flag, mjtByte value) { scene_.flags[flag] = value; }
// Returns the mjvScene used by the renderer.
mjvScene& GetScene() { return scene_; }
// Returns the current, average frame rate.
double GetFrameRate() const { return fps_; }