コード例 #1
0
ファイル: SimpleBroadphase.cs プロジェクト: HaKDMoDz/InVision
	    public virtual void RayTest(ref Vector3 rayFrom,ref Vector3 rayTo, BroadphaseRayCallback rayCallback, ref Vector3 aabbMin,ref Vector3 aabbMax)
        {
            for (int i = 0; i <= m_LastHandleIndex; i++)
            {
                SimpleBroadphaseProxy proxy = m_pHandles[i];
                if (proxy.m_clientObject == null)
                {
                    continue;
                }
                rayCallback.Process(proxy);
            }
        }
コード例 #2
0
		public virtual void	RayTest(ref Vector3 rayFrom,ref Vector3 rayTo, BroadphaseRayCallback rayCallback, ref Vector3 aabbMin, ref Vector3 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));
					}
				}
			}
		}
コード例 #3
0
 public virtual void RayTest(ref Vector3 rayFrom, ref Vector3 rayTo, BroadphaseRayCallback rayCallback, ref Vector3 aabbMin, ref Vector3 aabbMax)
 {
     for (int i = 0; i < m_multiSapProxies.Count; i++)
     {
         rayCallback.Process(m_multiSapProxies[i]);
     }
 }