Implementation:Google deepmind Mujoco Studio App Header
| Knowledge Sources | |
|---|---|
| Domains | Application, API Declaration |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Declares the App class interface for MuJoCo Studio, including configuration, model loading, simulation update, GUI building, and rendering methods.
Description
app.h defines the mujoco::studio::App class which owns and orchestrates a complete MuJoCo simulation session. The Config struct specifies window dimensions, INI settings path, and offscreen rendering mode. The class declares methods for model loading (InitEmptyModel, LoadModelFromFile, LoadModelFromBuffer), simulation lifecycle (Update, BuildGui), and holds members from the platform layer: Window, Renderer, StepControl, SimProfiler, SimHistory, ModelHolder, and PictureGui. It also includes mjvOption, mjvCamera, mjvPerturb for visualization state.
Usage
Included by app.cc and the Studio main entry point. The header defines the complete public interface for the Studio application, enabling external code to create and control Studio instances programmatically.
Code Reference
Source Location
- Repository: Google_deepmind_Mujoco
- File: src/experimental/studio/app.h
- Lines: 1-248
Key Functions
class App {
struct Config { int width; int height; std::string ini_path; bool offscreen_mode; };
explicit App(Config config);
void InitEmptyModel();
void LoadModelFromFile(const std::string& filepath);
void LoadModelFromBuffer(std::span<const std::byte> buffer, std::string_view content_type, std::string_view name);
bool Update();
void BuildGui();
};
Import
#include "experimental/studio/app.h"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| config | App::Config | Yes | Window size, INI path, offscreen mode |
| filepath | std::string | No | Model file path for LoadModelFromFile |
| buffer | std::span<const std::byte> | No | Model data buffer for LoadModelFromBuffer |
Outputs
| Name | Type | Description |
|---|---|---|
| bool | bool | Update() returns false when the application should exit |