On line 26 here we have this line:
self.sim = mujoco_py.MjSim(model, nsubsteps=n_substeps)
The mujoco_py MjSim file is here: https://github.com/openai/mujoco-py/blob/master/mujoco_py/mjsim.pyx
I don't understand how this cython is working. I read the cython tutorial but it wasnt making sense: https://cython.readthedocs.io/en/latest/src/quickstart/build.html
Specifically, in python we would have to do: mujoco_py.mjsim.MjSim() to instantiate the MjSim object. How exactly is cython loading things such that the MjSim object is callable immediately after mujoco_py?
Also, in line 155 here: https://github.com/openai/mujoco-py/blob/master/mujoco_py/mjrendercontext.pyx
There is a call mjv_updateScene(...). Where is this function defined?