Bbop-Library 0.4.1-alpha
Opengl library to build 2d apps and game that implement a light system named Lumop
 
Loading...
Searching...
No Matches
bbopMathClass.h
Go to the documentation of this file.
1/*
2 * bbopMathClass.h
3 *
4 * Ce programme est distribué sous les termes de la Licence Publique
5 * Générale GNU, version 3.0, telle que publiée par la Free Software
6 * Foundation. Consultez la Licence Publique Générale GNU pour plus de
7 * détails.
8 *
9 * Vous devez avoir reçu une copie de la Licence Publique Générale GNU
10 * en même temps que ce programme. Si ce n'est pas le cas, consultez
11 * <https://www.gnu.org/licenses/>.
12 */
13
14#ifndef MATH_CLASS_H
15#define MATH_CLASS_H
16
17#include <cmath>
18
19template<typename T>
28{
29public:
30 Vector2();
31 Vector2(T x_, T y_);
32 Vector2(const Vector2<T>& other);
33
34 T x;
35 T y;
36};
37
38class Vector2i : public Vector2<int> {
39public:
40 Vector2i();
41 Vector2i(int x_, int y_);
42 Vector2i(const Vector2i& other);
43};
44
45class Vector2f : public Vector2<float> {
46public:
47 Vector2f();
48 Vector2f(float x_, float y_);
49 Vector2f(const Vector2f& other);
50};
51
52class Vector2d : public Vector2<double> {
53public:
54 Vector2d();
55 Vector2d(double x_, double y_);
56 Vector2d(const Vector2d& other);
57};
58
59template<typename T>
66{
67public:
68 Vector3();
69 Vector3(T x_, T y_, T z_);
70
71 T x;
72 T y;
73 T z;
74};
75
76class Vector3i : public Vector3<int> {
77public:
78 Vector3i();
79 Vector3i(int x_, int y_, int z_);
80};
81
82class Vector3f : public Vector3<float> {
83public:
84 Vector3f();
85 Vector3f(float x_, float y_, float z_);
86};
87
88class Vector3d : public Vector3<double> {
89public:
90 Vector3d();
91 Vector3d(double x_, double y_, double z_);
92};
93
94template<typename T>
101{
102public:
103 Vector4();
104 Vector4(T x_, T y_, T z_, T w_);
105
106 T x;
107 T y;
108 T z;
109 T w;
110};
111
120
121#endif // ! MATH_CLASS_H
float bbopGetDistance(Vector2f a, Vector2f b)
Renvoie la distance entre deux point.
Definition bbopMathClass.cpp:74
T y
Definition bbopMathClass.h:35
T x
Definition bbopMathClass.h:34
Vector2()
Definition bbopMathClass.cpp:18
Vector2d()
Definition bbopMathClass.cpp:41
Definition bbopMathClass.h:45
Vector2f()
Definition bbopMathClass.cpp:34
Vector2i()
Definition bbopMathClass.cpp:27
T x
Definition bbopMathClass.h:71
Vector3()
Definition bbopMathClass.cpp:48
T y
Definition bbopMathClass.h:72
T z
Definition bbopMathClass.h:73
Vector3d()
Definition bbopMathClass.cpp:64
Vector3f()
Definition bbopMathClass.cpp:59
Vector3i()
Definition bbopMathClass.cpp:54
T x
Definition bbopMathClass.h:106
T z
Definition bbopMathClass.h:108
T w
Definition bbopMathClass.h:109
T y
Definition bbopMathClass.h:107
Vector4()
Definition bbopMathClass.cpp:69