Example #1
0
        public override object Clone()
        {
            PointMask mask = new PointMask(_point);
            mask._pos = _pos;

            return mask;
        }
Example #2
0
 // Circle -- [____] Collision Tests
 public static bool TestOverlap(CircleMask cMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, cMask);
 }
Example #3
0
        public static bool TestOverlap(PointMask ptMask, TriangleMask triMask)
        {
            PointFP bary = triMask.Barycentric((VectorFP)ptMask._pos + ptMask._point);

            return (bary.X > 0 && bary.Y > 0 && (bary.X + bary.Y) < 1);
        }
Example #4
0
        public static bool TestOverlapEdge(PointMask ptMask, AABBMask rMask)
        {
            VectorFP p0 = (VectorFP)ptMask._pos + ptMask._point;

            return TestOverlapEdge(rMask, p0.X, p0.Y);
        }
Example #5
0
        public static bool TestOverlapEdge(PointMask ptMask, LineMask lnMask)
        {
            VectorFP p1 = (VectorFP)ptMask._pos + ptMask._point;

            return TestOverlapEdge(lnMask, p1.X, p1.Y);
        }
Example #6
0
        public static bool TestOverlapEdge(PointMask ptMask, CircleMask cMask)
        {
            VectorFP p0 = (VectorFP)ptMask._pos + ptMask._point;

            return TestOverlapEdge(cMask, p0.X, p0.Y);
        }
Example #7
0
        public static bool TestOverlapEdge(PointMask ptMask1, PointMask ptMask2)
        {
            VectorFP p1 = (VectorFP)ptMask1._pos + ptMask1._point;

            return TestOverlapEdge(ptMask2, p1.X, p1.Y);
        }
Example #8
0
        // Point -- [____] Collision + Edge Tests
        public static bool TestOverlapEdge(PointMask ptMask, FPInt x, FPInt y)
        {
            VectorFP p2 = (VectorFP)ptMask._pos + ptMask._point;

            return x == p2.X && y == p2.Y;
        }
Example #9
0
 public static bool TestOverlap(PointMask ptMask, LineMask lnMask)
 {
     return false;
 }
Example #10
0
 // Triangle -- [____] Collision Tests
 public static bool TestOverlap(TriangleMask triMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, triMask);
 }
Example #11
0
 public static bool TestOverlap(PointMask ptMask, AYLine yl)
 {
     return false;
 }
Example #12
0
 // AABB -- [____] Collision Tests
 public static bool TestOverlap(AABBMask rMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, rMask);
 }
Example #13
0
 // Line -- [____] Collision Tests
 public static bool TestOverlap(LineMask lnMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, lnMask);
 }
Example #14
0
 public static bool TestOverlap(AYLine ylMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, ylMask);
 }
Example #15
0
 public static bool TestOverlap(AXLine xlMask, PointMask ptMask)
 {
     return TestOverlap(ptMask, xlMask);
 }
Example #16
0
 // Point -- [____] Collision Tests
 public static bool TestOverlap(PointMask ptMask1, PointMask ptMask2)
 {
     return false;
 }