Bomberman
Sphere.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2021
3 ** Bomberman
4 ** File description:
5 ** Pixel
6 */
7 
8 #ifndef SPHERE_HPP_
9 #define SPHERE_HPP_
10 
11 #include <raylib.h>
13 
16  class Sphere: public ADrawable3D
17  {
18  public:
23  Sphere(const Vector3 &centerPosition, int radius, const Color &color);
24 
26  Sphere(const Sphere &) = default;
27 
29  Sphere &operator=(const Sphere &) = default;
30 
32  ~Sphere() override = default;
33 
35  int getRadius(void) const;
36 
38  Sphere &setRadius(int radius);
39 
41  void drawOn(RAY::Window &) override;
42 
44  void drawWiresOn(RAY::Window &) override;
45 
46  private:
48  int _radius;
49  };
50 };
51 
52 #endif /* !PIXEL_HPP_ */
RAY::Vector3
A Three-dimensionnal Vector data type.
Definition: Vector3.hpp:15
RAY::Drawables::Drawables3D::Sphere::operator=
Sphere & operator=(const Sphere &)=default
A sphere is assignable.
RAY::Drawables::Drawables3D::Sphere::Sphere
Sphere(const Vector3 &centerPosition, int radius, const Color &color)
Sphere constructor.
Definition: Sphere.cpp:13
RAY::Window
Definition: Window.hpp:32
ADrawable3D.hpp
RAY::Drawables::Drawables3D::Sphere::~Sphere
~Sphere() override=default
A default destructor.
RAY::Drawables::Drawables3D::Sphere::getRadius
int getRadius(void) const
Definition: Sphere.cpp:18
RAY::Drawables::ADrawable3D
Abstraction of any three-dimensionnal drawable.
Definition: ADrawable3D.hpp:17
RAY::Drawables::Drawables3D::Sphere
Sphere in a three-dimensionnal space.
Definition: Sphere.hpp:16
RAY::Drawables::Drawables3D
Definition: Circle.cpp:10
RAY::Drawables::Drawables3D::Sphere::drawWiresOn
void drawWiresOn(RAY::Window &) override
Draw sphere's wires on window.
Definition: Sphere.cpp:34
RAY::Drawables::Drawables3D::Sphere::_radius
int _radius
Radius of the sphere.
Definition: Sphere.hpp:48
RAY::Color
Object representation of color.
Definition: Color.hpp:15
RAY::Drawables::Drawables3D::Sphere::drawOn
void drawOn(RAY::Window &) override
Draw point on window.
Definition: Sphere.cpp:29
RAY::Drawables::Drawables3D::Sphere::setRadius
Sphere & setRadius(int radius)
set radius
Definition: Sphere.cpp:23