Пример #1
0
 public override bool Test(Plane other)
 {
     return sray.Intersects(ref other.splane);
 }
Пример #2
0
        public static bool Test(LineSegment seg, Plane plane)
        {
            Vector3 q;
            float t;

            // Compute the t value for the directed line ab intersecting the plane
            Vector3 ab = seg.Point2 - seg.Point1;
            t = (plane.D - Vector3.Dot(plane.Normal, seg.Point1)) / Vector3.Dot(plane.Normal, ab);

            // If t in [0..1] compute and return intersection point
            if (t >= 0.0f && t <= 1.0f)
            {
                q = seg.Point1 + t * ab;
                return true;
            }
            // Else no intersection
            return false;
        }
Пример #3
0
 public override bool Test(Plane other)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public override bool Test(Plane other)
 {
     return IntersectionTests.Test(this, other);
 }
Пример #5
0
 public override bool Test(Plane other)
 {
     return rp.Intersects(ref other.splane) || rn.Intersects(ref other.splane);
 }
Пример #6
0
 public abstract bool Test(Plane other);
Пример #7
0
 public override bool Test(Plane other)
 {
     return sbf.Intersects(ref other.splane) == PlaneIntersectionType.Intersecting;
 }
Пример #8
0
 public override bool Test(Plane other)
 {
     return Collision.PlaneIntersectsTriangle(ref other.splane, ref P1, ref P2, ref P3) == PlaneIntersectionType.Intersecting;
 }