in mujoco_py/mjsim.pyx [0:0]
def ray_fast_group(self,
np.ndarray[np.float64_t, mode="c", ndim=1] pnt,
np.ndarray[np.float64_t, mode="c", ndim=1] vec,
np.ndarray[np.uint8_t, mode="c", ndim=1] geomgroup,
mjtByte flg_static=1,
int bodyexclude=-1):
"""
Faster version of sim.ray(), which avoids extra copies,
but needs to be given all the correct type arrays.
See self.ray() for explanation of arguments
"""
cdef int geomid
cdef mjtNum distance
cdef mjtNum[::view.contiguous] pnt_view = pnt
cdef mjtNum[::view.contiguous] vec_view = vec
cdef mjtByte[::view.contiguous] geomgroup_view = geomgroup
distance = mj_ray(self.model.ptr,
self.data.ptr,
&pnt_view[0],
&vec_view[0],
&geomgroup_view[0],
flg_static,
bodyexclude,
&geomid)
return (distance, geomid)