<mujoco model="window">
    <compiler angle="radian" inertiafromgeom="auto" inertiagrouprange="1 5"/>

    <asset>
        <material name="window_col" rgba="0.96 0.26 0.33 0.5" shininess="0" specular="0"/>
        <material name="window_handle" rgba=".9 .9 .9 1" shininess="1" reflectance=".7" specular=".5"/>
        <material name="window_body" rgba="1 1 1 1" shininess="1" reflectance=".7" specular=".5"/>
        <material name="window_glass" rgba="0 .3 .4 .1" shininess="1" reflectance="1" specular=".5"/>
    </asset>

    <default>
        <default class="window_base">
            <joint armature="0.001" damping="2" frictionloss="2" limited="true"/>
            <geom conaffinity="0" contype="0" group="1" type="mesh"/>
            <position ctrllimited="true" ctrlrange="0 1.57"/>
            <default class="window_viz">
                <geom condim="4" type="mesh"/>
            </default>
            <default class="window_col">
                <geom conaffinity="1" condim="3" contype="1" group="4" material="window_col" solimp="0.99 0.99 0.01" solref="0.01 1"/>
            </default>
            <site type="sphere" size=".01" rgba="0 1 0 1" group="5"/>
        </default>
    </default>

    <asset>
        <mesh file="metaworld/window/window_h_base.stl" name="window_h_base"/>
        <mesh file="metaworld/window/window_h_frame.stl" name="window_h_frame"/>
        <mesh file="metaworld/window/windowa_h_frame.stl" name="windowa_h_frame"/>
        <mesh file="metaworld/window/windowa_h_glass.stl" name="windowa_h_glass"/>
        <mesh file="metaworld/window/windowb_h_frame.stl" name="windowb_h_frame"/>
        <mesh file="metaworld/window/windowb_h_glass.stl" name="windowb_h_glass"/>

        <mesh file="metaworld/window/window_base.stl" name="window_base"/>
        <mesh file="metaworld/window/window_frame.stl" name="window_frame"/>
        <mesh file="metaworld/window/windowa_frame.stl" name="windowa_frame"/>
        <mesh file="metaworld/window/windowa_glass.stl" name="windowa_glass"/>
        <mesh file="metaworld/window/windowb_frame.stl" name="windowb_frame"/>
        <mesh file="metaworld/window/windowb_glass.stl" name="windowb_glass"/>
    </asset>

    <worldbody>
        <body childclass="window_base" pos="0.3 0.3 .202" name="window">
            <geom material="window_body" mesh="window_h_base" pos="0 0 -0.192"/>
            <geom material="window_body" mesh="window_h_frame"/>
            <geom class="window_col" pos="-0.216 0 0" size="0.015 0.03 0.181" type="box"/>
            <geom class="window_col" pos="0 0 -0.192" size="0.25 0.06 0.01" type="box"/>
            <geom class="window_col" pos="0.216 0 0" size="0.015 0.03 0.181" type="box"/>
            <geom class="window_col" pos="0 0 -0.166" size="0.201 0.03 0.015" type="box"/>
            <geom class="window_col" pos="0 0 0.166" size="0.201 0.03 0.015" type="box"/>

            <body name="windowb_a_virtual_handle" pos="-0.014 -0.075 0.035">
                <site name="window_handle_center_target" pos="0 0 0.0001" euler="0 0 1.57" group="5"/>
            </body>

            <body name="windowb_a">
                <site name="window_handle_center" pos="-0.014 -0.075 0.035" euler="0 0 1.57" group="5"/>
                <joint type="slide" range="0 .2" axis="1 0 0" name="window_slide"/>
                <geom material="window_handle" euler="1.57 0 0" pos="-0.014 -0.028 0.045" size="0.012  0.003" type="cylinder"/>
                <geom material="window_handle" euler="1.57 0 0" pos="-0.014 -0.028 -0.045" size="0.012 0.003" type="cylinder"/>
                <geom material="window_handle" euler="1.57 0 0" pos="-0.014 -0.06 0.045" size="0.008 0.035" type="capsule"/>
                <geom material="window_handle" euler="1.57 0 0" pos="-0.014 -0.06 -0.045" size="0.008 0.035" type="capsule"/>
                <geom material="window_handle" pos="-0.014 -0.095 0" size="0.008 0.045" type="capsule"/>
                <geom material="window_body" mesh="windowb_h_frame" pos="-0.104 -0.022 0"/>
                <geom material="window_glass" mesh="windowb_h_glass" pos="-0.104 -0.018 0"/>

                <geom class="window_col" euler="1.57 0 0" pos="-0.014 -0.028 0.045" size="0.012  0.003" type="cylinder"/>
                <geom class="window_col" euler="1.57 0 0" pos="-0.014 -0.028 -0.045" size="0.012 0.003" type="cylinder"/>
                <geom class="window_col" euler="1.57 0 0" pos="-0.014 -0.06 0.045" size="0.008 0.035" type="capsule"/>
                <geom class="window_col" euler="1.57 0 0" pos="-0.014 -0.06 -0.045" size="0.008 0.035" type="capsule"/>
                <geom class="window_col" pos="-0.014 -0.095 0" size="0.008 0.045" type="capsule"/>
                <geom class="window_col" pos="-0.014 -0.013 0" size="0.014 0.012 0.15" type="box"/>
                <geom class="window_col" pos="-0.19 -0.013 0" size="0.01 0.012 0.15" type="box"/>
                <geom class="window_col" pos="-0.104 -0.013 0.14" size="0.076 0.012 0.01" type="box"/>
                <geom class="window_col" pos="-0.104 -0.013 -0.14" size="0.076 0.012 0.01" type="box"/>
                <geom class="window_col" pos="-0.104 -0.018 0" size="0.076 0.001 0.13" type="box"/>
                <geom class="window_col" pos="-0.104 -0.022 0" size="0.076 0.003 0.005" type="box"/>
            </body>

            <body name="windowb_b" pos="0.1 0.013 0">
                <geom material="window_body" mesh="windowa_h_frame"/>
                <geom material="window_glass" mesh="windowa_h_glass" pos="0 -0.005 0"/>
                <geom class="window_col" pos="0 0 -0.14" size="0.08 0.012 0.01" type="box"/>
                <geom class="window_col" pos="0 0 0.14" size="0.08 0.012 0.01" type="box"/>
                <geom class="window_col" pos="0 -0.005 0" size="0.08 0.001 0.13" type="box"/>
                <geom class="window_col" pos="-0.0 -0.009 0" size="0.08 0.003 0.005" type="box"/>
                <geom class="window_col" pos="-0.09 0 0" size="0.01 0.012 0.15" type="box"/>
                <geom class="window_col" pos="0.09 0 0" size="0.01 0.012 0.15" type="box"/>
            </body>
        </body>
    </worldbody>
</mujoco>
