예제 #1
0
    public bool Contains(double x, double y, Matrix matrix)
    {
/*			Vector3 n = new Vector3((float)x, (float)y, 0);
			Vector3 f = new Vector3((float)x, (float)y, 1);

			float r = (float)_size.Width;
			float b = (float)_size.Height;

			Vector3 tr = new Vector3(r, 0, 0);
			Vector3 bl = new Vector3(0, b, 0);
			Vector3 br = new Vector3(r, b, 0);

			n.Unproject(DrawingContext.Device.Viewport, DrawingContext.Device.Transform.Projection, DrawingContext.Device.Transform.View, matrix);
			f.Unproject(DrawingContext.Device.Viewport, DrawingContext.Device.Transform.Projection, DrawingContext.Device.Transform.View, matrix);
			f.Subtract(n);

			IntersectInformation intersect;

			if(Microsoft.DirectX.Direct3D.Geometry.IntersectTri(Vector3.Empty, tr, bl, n, f, out intersect))
				return true;

			if(Microsoft.DirectX.Direct3D.Geometry.IntersectTri(bl, br, tr, n, f, out intersect))
				return true;

*/
      return false;
    }
예제 #2
0
 public bool Contains(Point point, Matrix matrix)
 {
   return Contains(point.X, point.Y, matrix);
 }