Add realtime parameter to visual global.

PiperOrigin-RevId: 478775714
Change-Id: Ic2d178a5c57d298d005215219ce8470392c4651b
This commit is contained in:
Alessio Quaglino
2022-10-04 07:08:21 -07:00
committed by Copybara-Service
parent f85cfb8ed2
commit bc1490b7a8
10 changed files with 29 additions and 3 deletions
+1
View File
@@ -1237,6 +1237,7 @@ mjVisual
float ipd; // inter-pupilary distance for free camera
float linewidth; // line width for wireframe and ray rendering
float glow; // glow coefficient for selected body
float realtime; // initial real-time factor (1: real time)
int offwidth; // width of offscreen buffer
int offheight; // height of offscreen buffer
} global;
+3
View File
@@ -592,6 +592,9 @@ is effectively a miscellaneous subsection.
:at:`glow`: :at-val:`real, "0.3"`
The value of this attribute is added to the emission coefficient of all geoms attached to the selected body. As a
result, the selected body appears to glow.
:at:`realtime`: :at-val:`real, "1"`
This value sets the initial real-time factor of the model, when loaded in `simulate`. 1: real time. Less than 1:
slower than real time. Must be greater than 0.
:at:`offwidth`: :at-val:`int, "640"`
This and the next attribute specify the size in pixels of the off-screen OpenGL rendering buffer. This attribute
specifies the width of the buffer. The size of this buffer can also be adjusted at runtime, but it is usually more
+2
View File
@@ -50,6 +50,8 @@ General
- Added :at:`assetdir` compiler option, which sets the values of both :at:`meshdir` and :at:`texturedir`. Values in
the latter attributes take precedence over :at:`assetdir`.
- Added :at:`realtime` option to :ref:`visual` for starting a simulation at a slower speed.
Python bindings
^^^^^^^^^^^^^^^