4 : center(center), size(size), rotation(rotation) {
Defines the Shape base class for representing geometric shapes in 2D space.
float GetRotation()
Gets the current rotation angle of the shape.
Vector2D GetCenter()
Gets the center point of the shape.
void Translate(Vector2D offset)
Translates the shape by a given offset.
float rotation
The rotation of the shape in degrees.
void Scale(Vector2D scale)
Scales the shape by a given factor.
void SetRotation(float rotation)
Sets the rotation angle of the shape.
Vector2D GetSize()
Gets the size of the shape.
void Rotate(float offset)
Rotates the shape by a given offset angle.
void SetSize(Vector2D size)
Sets the size of the shape.
void SetCenter(Vector2D center)
Sets the center of the shape.
Shape(Vector2D center, Vector2D size, float rotation)
Constructs a Shape object with specified center, size, and rotation.
Vector2D center
The center point of the shape.
Vector2D size
The size of the shape, large enough to fit within a bounding rectangle.
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.