예제 #1
0
        private void CalculatePointsAndBounds()
        {
            for (int i = 0; i < vertices.Length; i++)
                transformedVertices[i] = Vector2.Transform(vertices[i], Matrix.CreateRotationZ(rotation) *Matrix.CreateScale(scale)) + position;

            bounds = new BoundingRectangle(transformedVertices);
        }
예제 #2
0
 public bool Intersects(BoundingRectangle other)
 {
     return (l <= other.r && other.l <= r && b <= other.t && other.b <= t);
 }