Ejemplo n.º 1
0
 public override bool Test(Plane other)
 {
     return sray.Intersects(ref other.splane);
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 public override bool Test(Plane other)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 4
0
 public override bool Test(Plane other)
 {
     return IntersectionTests.Test(this, other);
 }
Ejemplo n.º 5
0
 public override bool Test(Plane other)
 {
     return rp.Intersects(ref other.splane) || rn.Intersects(ref other.splane);
 }
Ejemplo n.º 6
0
 public abstract bool Test(Plane other);
Ejemplo n.º 7
0
 public override bool Test(Plane other)
 {
     return sbf.Intersects(ref other.splane) == PlaneIntersectionType.Intersecting;
 }
Ejemplo n.º 8
0
 public override bool Test(Plane other)
 {
     return Collision.PlaneIntersectsTriangle(ref other.splane, ref P1, ref P2, ref P3) == PlaneIntersectionType.Intersecting;
 }