Add frustum visualization for orthographic cameras.

PiperOrigin-RevId: 847698917
Change-Id: I13633e8ba2d4718b127a5838c404ab74c6180e3d
This commit is contained in:
Yuval Tassa
2025-12-22 03:42:46 -08:00
committed by Copybara-Service
parent 158525269b
commit c7f5766345
4 changed files with 43 additions and 32 deletions
+9 -9
View File
@@ -2976,12 +2976,19 @@ and the +Y axis points up. Thus the frame position and orientation are the key a
for most scenes and should likely be reduced. In either case, the horizontal field of view is computed automatically
given the window size and the vertical field of view.
.. _body-camera-resolution:
:at:`resolution`: :at-val:`int(2), "1 1"`
Resolution of the camera in pixels [width height]. Note that these values are not used for rendering since those
dimensions are determined by the size of the rendering context. This attribute serves as a convenient
location to save the required resolution. Setting either value larger than 1
enables frustum visualization when the :ref:`mjVIS_CAMERA<mjtVisFlag>` visualization flag is active.
.. _body-camera-sensorsize:
:at:`sensorsize`: :at-val:`real(2), "0 0"`
Size of the camera sensor in length units. When specified, all intrinsic attributes become active and :at:`fovy`
is ignored. The field-of-view is then computed automatically from the focal length and sensor size. This
also enables frustum visualization when the :ref:`mjVIS_CAMERA<mjtVisFlag>` visualization flag is active.
is ignored. The field-of-view is then computed automatically from the focal length and sensor size.
.. _body-camera-focal:
.. _body-camera-focalpixel:
@@ -2998,13 +3005,6 @@ and the +Y axis points up. Thus the frame position and orientation are the key a
specified, the pixel value is used. At zero offset, the rendered image is centered on the camera's negative Z axis,
as in a standard pinhole camera model.
.. _body-camera-resolution:
:at:`resolution`: :at-val:`int(2), "1 1"`
Resolution of the camera in pixels [width height]. Note that these values are not used for rendering since those
dimensions are determined by the size of the rendering context. This attribute serves as a convenient
location to save the required resolution when creating a context.
.. _body-camera-ipd:
:at:`ipd`: :at-val:`real, "0.068"`