Bomberman
Cylinder.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2021
3 ** Bomberman
4 ** File description:
5 ** Pixel
6 */
7 
8 #ifndef CYLINDER_HPP_
9 #define CYLINDER_HPP_
10 
11 #include <raylib.h>
13 
16  class Cylinder: public ADrawable3D
17  {
18  public:
25  Cylinder(const Vector3 &position, float radiusTop, float radiusBottom, float height, const Color &color);
26 
27 
29  Cylinder(const Cylinder &) = default;
30 
32  Cylinder &operator=(const Cylinder &) = default;
33 
35  ~Cylinder() override = default;
36 
38  int getTopRadius(void) const;
39 
41  Cylinder &setTopRadius(float radius);
42 
44  int getBottomRadius(void) const;
45 
47  Cylinder &setBottomRadius(float radius);
48 
50  float getHeight(void) const;
51 
53  Cylinder &setHeight(float height);
54 
56  void drawOn(RAY::Window &) override;
57 
59  void drawWiresOn(RAY::Window &) override;
60  private:
62  float _topRadius;
63 
66 
68  float _height;
69 
70  };
71 };
72 
73 #endif /* !PIXEL_HPP_ */
RAY::Vector3
A Three-dimensionnal Vector data type.
Definition: Vector3.hpp:15
RAY::Drawables::Drawables3D::Cylinder::setTopRadius
Cylinder & setTopRadius(float radius)
set radius
Definition: Cylinder.cpp:23
RAY::Drawables::Drawables3D::Cylinder::getBottomRadius
int getBottomRadius(void) const
Definition: Cylinder.cpp:29
RAY::Drawables::Drawables3D::Cylinder
Cylinder in a three-dimensionnal space.
Definition: Cylinder.hpp:16
RAY::Drawables::Drawables3D::Cylinder::Cylinder
Cylinder(const Vector3 &position, float radiusTop, float radiusBottom, float height, const Color &color)
Cylinder constructor.
Definition: Cylinder.cpp:13
RAY::Drawables::Drawables3D::Cylinder::getTopRadius
int getTopRadius(void) const
Definition: Cylinder.cpp:18
RAY::Window
Definition: Window.hpp:32
ADrawable3D.hpp
RAY::Drawables::Drawables3D::Cylinder::_topRadius
float _topRadius
Radius of the cylinder.
Definition: Cylinder.hpp:62
RAY::Drawables::Drawables3D::Cylinder::operator=
Cylinder & operator=(const Cylinder &)=default
A cylinder is assignable.
RAY::Drawables::ADrawable3D
Abstraction of any three-dimensionnal drawable.
Definition: ADrawable3D.hpp:17
RAY::Drawables::Drawables3D::Cylinder::getHeight
float getHeight(void) const
Definition: Cylinder.cpp:40
RAY::Drawables::Drawables3D::Cylinder::_bottomRadius
float _bottomRadius
Radius of the cylinder.
Definition: Cylinder.hpp:65
RAY::Drawables::Drawables3D
Definition: Circle.cpp:10
RAY::Drawables::Drawables3D::Cylinder::setHeight
Cylinder & setHeight(float height)
the Height
Definition: Cylinder.cpp:45
RAY::Drawables::Drawables3D::Cylinder::setBottomRadius
Cylinder & setBottomRadius(float radius)
set radius
Definition: Cylinder.cpp:34
RAY::Drawables::Drawables3D::Cylinder::drawOn
void drawOn(RAY::Window &) override
Draw point on window.
Definition: Cylinder.cpp:51
RAY::Color
Object representation of color.
Definition: Color.hpp:15
RAY::Drawables::Drawables3D::Cylinder::drawWiresOn
void drawWiresOn(RAY::Window &) override
Draw cylinder's wires on window.
Definition: Cylinder.cpp:56
RAY::Drawables::Drawables3D::Cylinder::_height
float _height
height of the cylinder
Definition: Cylinder.hpp:68
RAY::Drawables::Drawables3D::Cylinder::~Cylinder
~Cylinder() override=default
A default destructor.