![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Represents a circle in 2D space. More...
#include <Circle.h>
Public Member Functions | |
Circle (Vector2D center, float radius) | |
Constructs a Circle object with a specified center and radius. | |
bool | IsInShape (Vector2D point) override |
Checks if a given point lies within the circle'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. | |
Private Attributes | |
float | radius |
Radius of the circle. | |
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 a Circle object with a specified center and radius.
center | Center point of the circle. |
radius | Radius of the circle. |
Definition at line 3 of file Circle.cpp.
Checks if a given point lies within the circle's boundaries.
point | The point to check. |
Implements Shape.
Definition at line 5 of file Circle.cpp.
References Shape::center, radius, Vector2D::X, and Vector2D::Y.
|
private |