Files
Mujoco_WASM/test/engine/testdata/vis_visualize/orthographic.xml
T
Yuval Tassa b8a4ac5d48 Refactor camera orthographic attribute to projection enum.
PiperOrigin-RevId: 847069028
Change-Id: I7f686fe654e9b56519cab8bd2f37c9cc40091d3f
2025-12-20 03:28:29 -08:00

35 lines
1.1 KiB
XML

<!-- Test model for visual debugging of orthographic cameras. -->
<mujoco>
<visual>
<!-- free camera is orthorgaphic with a 5m vertical field-of-view -->
<global orthographic="true" fovy="5"/>
<scale camera="1"/>
</visual>
<asset>
<texture name="grid" type="2d" builtin="checker" width="512" height="512" rgb1=".8 .6 .4" rgb2=".2 .3 .4"/>
<material name="grid" texture="grid" texrepeat="10 10" texuniform="false" reflectance=".2"/>
</asset>
<default>
<camera projection="orthographic"/>
</default>
<worldbody>
<light pos="0 0 3"/>
<geom type="plane" size="10 10 .01" material="grid"/>
<body pos=".5 .5 .5">
<freejoint/>
<geom type="box" size=".5 .5 .5" pos="0 0 .5"/>
</body>
<!-- box should pefectly fit within field-of-view -->
<camera name="fovy = 1" pos=".5 .5 2" projection="orthographic" fovy="1"/>
<!-- 2 floor squares should pefectly fit within field-of-view -->
<camera name="fovy = 2" pos="0 0 2" fovy="2"/> <!-- inherits projection="orthographic" from defaults -->
</worldbody>
</mujoco>