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); }
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) { 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)); } } } }
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); } }
public void Initialize(BroadphaseRayCallback orgCallback) { m_rayCallback = orgCallback; }
} // for pool public BroadphaseRayTester(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); } }