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); }
public bool Intersects(BoundingRectangle other) { return (l <= other.r && other.l <= r && b <= other.t && other.b <= t); }