![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Represents an ellipse in 2D space. More...
#include <Ellipse.h>
Public Member Functions | |
Ellipse (Vector2D center, Vector2D size, float rotation) | |
Constructs an Ellipse object with specified center, size, and rotation. | |
bool | IsInShape (Vector2D point) override |
Checks if a given point lies within the ellipse's boundaries. | |
![]() | |
Shape (Vector2D center, Vector2D size, float rotation) | |
Constructs a Shape object with specified center, size, and rotation. | |
void | SetCenter (Vector2D center) |
Sets the center of the shape. | |
void | Translate (Vector2D offset) |
Translates the shape by a given offset. | |
Vector2D | GetCenter () |
Gets the center point of the shape. | |
void | SetSize (Vector2D size) |
Sets the size of the shape. | |
void | Scale (Vector2D scale) |
Scales the shape by a given factor. | |
Vector2D | GetSize () |
Gets the size of the shape. | |
void | SetRotation (float rotation) |
Sets the rotation angle of the shape. | |
void | Rotate (float offset) |
Rotates the shape by a given offset angle. | |
float | GetRotation () |
Gets the current rotation angle of the shape. | |
Additional Inherited Members | |
![]() | |
Vector2D | center |
The center point of the shape. | |
Vector2D | size |
The size of the shape, large enough to fit within a bounding rectangle. | |
float | rotation |
The rotation of the shape in degrees. | |
Constructs an Ellipse object with specified center, size, and rotation.
center | Center point of the ellipse. |
size | Dimensions of the ellipse (width and height). |
rotation | Rotation angle of the ellipse in degrees. |
Definition at line 3 of file Ellipse.cpp.
Checks if a given point lies within the ellipse's boundaries.
point | The point to check. |
Implements Shape.
Definition at line 5 of file Ellipse.cpp.
References Shape::center, Mathematics::MPID180, Shape::rotation, Shape::size, Vector2D::X, and Vector2D::Y.