ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
Circle.h
Go to the documentation of this file.
1/**
2 * @file Circle.h
3 * @brief Defines the Circle class for representing circular shapes in 2D space.
4 *
5 * The Circle class provides functionality to define a circle by its center and radius,
6 * and check if a given point lies within the circle's boundaries.
7 *
8 * @date 22/12/2024
9 * @version 1.0
10 * @author Coela Can't
11 */
12
13#pragma once
14
15#include "Shape.h"
16
17/**
18 * @class Circle
19 * @brief Represents a circle in 2D space.
20 */
21class Circle : public Shape {
22private:
23 float radius; ///< Radius of the circle.
24
25public:
26 /**
27 * @brief Constructs a Circle object with a specified center and radius.
28 * @param center Center point of the circle.
29 * @param radius Radius of the circle.
30 */
32
33 /**
34 * @brief Checks if a given point lies within the circle's boundaries.
35 * @param point The point to check.
36 * @return True if the point is within the circle, otherwise false.
37 */
38 bool IsInShape(Vector2D point) override;
39};
Defines the Shape base class for representing geometric shapes in 2D space.
Represents a circle in 2D space.
Definition Circle.h:21
float radius
Radius of the circle.
Definition Circle.h:23
bool IsInShape(Vector2D point) override
Checks if a given point lies within the circle's boundaries.
Definition Circle.cpp:5
Abstract base class for 2D geometric shapes.
Definition Shape.h:22
Vector2D center
The center point of the shape.
Definition Shape.h:24
Represents a 2D vector (X, Y) and provides methods for vector arithmetic.
Definition Vector2D.h:27