Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
        public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback, ref IndexedVector3 aabbMin, ref IndexedVector3 aabbMax)
        {
            using (BroadphaseRayTester callback = BulletGlobals.BroadphaseRayTesterPool.Get())
            {
                callback.Initialize(rayCallback);

                m_sets[0].RayTestInternal(m_sets[0].m_root,
                    ref rayFrom,
                    ref rayTo,
                    ref rayCallback.m_rayDirectionInverse,
                    rayCallback.m_signs,
                    rayCallback.m_lambda_max,
                    ref aabbMin,
                    ref aabbMax,
                    callback);

                m_sets[1].RayTestInternal(m_sets[1].m_root,
                    ref rayFrom,
                    ref rayTo,
                    ref rayCallback.m_rayDirectionInverse,
                    rayCallback.m_signs,
                    rayCallback.m_lambda_max,
                    ref aabbMin,
                    ref aabbMax,
                    callback);
            }
        }
Ejemplo n.º 3
0
        public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback)
        {
            IndexedVector3 min = MathUtil.MIN_VECTOR;
            IndexedVector3 max = MathUtil.MAX_VECTOR;

            RayTest(ref rayFrom, ref rayTo, rayCallback, ref min, ref max);
        }
Ejemplo n.º 4
0
 public void Initialize(BroadphaseRayCallback orgCallback)
 {
     m_rayCallback = orgCallback;
 }
Ejemplo n.º 5
0
 public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback)
 {
     IndexedVector3 min = MathUtil.MIN_VECTOR;
     IndexedVector3 max = MathUtil.MAX_VECTOR;
     RayTest(ref rayFrom, ref rayTo, rayCallback, ref min, ref max);
 }
Ejemplo n.º 6
0
        public virtual void RayTest(ref IndexedVector3 rayFrom, ref IndexedVector3 rayTo, BroadphaseRayCallback rayCallback, ref IndexedVector3 aabbMin, ref IndexedVector3 aabbMax)
        {
            using (BroadphaseRayTester callback = BulletGlobals.BroadphaseRayTesterPool.Get())
            {
                callback.Initialize(rayCallback);

                m_sets[0].RayTestInternal(m_sets[0].m_root,
                                          ref rayFrom,
                                          ref rayTo,
                                          ref rayCallback.m_rayDirectionInverse,
                                          rayCallback.m_signs,
                                          rayCallback.m_lambda_max,
                                          ref aabbMin,
                                          ref aabbMax,
                                          callback);

                m_sets[1].RayTestInternal(m_sets[1].m_root,
                                          ref rayFrom,
                                          ref rayTo,
                                          ref rayCallback.m_rayDirectionInverse,
                                          rayCallback.m_signs,
                                          rayCallback.m_lambda_max,
                                          ref aabbMin,
                                          ref aabbMax,
                                          callback);
            }
        }
Ejemplo n.º 7
0
        public BroadphaseRayTester() { } // for pool

        public BroadphaseRayTester(BroadphaseRayCallback orgCallback)
        {
            m_rayCallback = orgCallback;
        }
Ejemplo n.º 8
0
        }                                // for pool

        public BroadphaseRayTester(BroadphaseRayCallback orgCallback)
        {
            m_rayCallback = orgCallback;
        }
Ejemplo n.º 9
0
 public void Initialize(BroadphaseRayCallback orgCallback)
 {
     m_rayCallback = orgCallback;
 }
 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);
     }
 }
 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));
             }
         }
     }
 }
Ejemplo n.º 12
0
 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]);
     }
 }
Ejemplo n.º 13
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));
             }
         }
     }
 }
Ejemplo n.º 14
0
 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]);
     }
 }