示例#1
0
 public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     throw new NotImplementedException();
 }
示例#2
0
 public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     normal1 = new Vector3();
     normal2 = new Vector3();
     return m_sphere.Intersects(other.m_sphere);
 }
示例#3
0
 public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     float ret = Vector3.Dot(Normal, other.Position);
     if (ret - D <= 0)
     {
         normal1 = Normal;
         normal2 = Vector3.Negate(normal1);
         return true;
     }
     normal1 = new Vector3();
     normal2 = new Vector3();
     return false;
 }
示例#4
0
 public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     normal1 = normal2 = Vector3.Up;
     return false;
 }
示例#5
0
        public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
        {
            normal1 = new Vector3();
            normal2 = new Vector3();
            if (Position.Y + m_height < other.Position.Y - other.Radius)
            {
                return false;
            }
            if (Position.Y > other.Position.Y + other.Radius)
            {
                return false;
            }
            Vector3 _p = new Vector3(m_position.X, 0.0f,m_position.Z);
            Vector3 _p2 = new Vector3(other.Position.X, 0.0f, other.Position.Z);

            if (Vector3.DistanceSquared(_p,_p2) <= Math.Pow( m_radius + other.Radius,2))
            {
                return true;
            }

            return false;
        }
示例#6
0
 public abstract bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2);
示例#7
0
 public override bool intersectsAxisAligned(SphereCollider other, out Vector3 normal1, out Vector3 normal2)
 {
     return other.intersectsAxisAligned(this, out normal2, out normal1);
 }