public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback, ref IndexedVector3 aabbMin, ref IndexedVector3 aabbMax)
 {
     for (int i = 0; i < m_multiSapProxies.Count; i++)
     {
         rayCallback.Process(m_multiSapProxies[i]);
     }
 }
 public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback, ref IndexedVector3 aabbMin, ref IndexedVector3 aabbMax)
 {
     for (int i = 0; i <= m_LastHandleIndex; i++)
     {
         SimpleBroadphaseProxy proxy = m_pHandles[i];
         if (proxy.m_clientObject == null)
         {
             continue;
         }
         rayCallback.Process(proxy);
     }
 }
Esempio n. 3
0
 public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback, ref IndexedVector3 aabbMin, ref IndexedVector3 aabbMax)
 {
     if (m_raycastAccelerator != null)
     {
         m_raycastAccelerator.RayTest(ref rayFrom, ref rayTo, rayCallback, ref aabbMin, ref aabbMax);
     }
     else
     {
         //choose axis?
         ushort axis = 0;
         //for each proxy
         for (int i = 1; i < m_numHandles * 2 + 1; i++)
         {
             if (m_pEdges[axis, i].IsMax())
             {
                 rayCallback.Process(GetHandle(m_pEdges[axis, i].m_handle));
             }
         }
     }
 }