-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVector3D.h
48 lines (39 loc) · 1.13 KB
/
Vector3D.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Created by rcabido on 25/10/19.
//
#ifndef ENGINE_VECTOR3D_H
#define ENGINE_VECTOR3D_H
///////////////////////////////////////////////////////////////////////////
// CLASE VECTOR 3D //
class Vector3D {
private:
float x;
float y;
float z;
public:
//Constructores
Vector3D();
Vector3D(const float &xCoord, const float &yCoord, const float &zCoord);
//Getters
float getX() const;
float getY() const;
float getZ() const;
//Setters
void setX(const float &x);
void setY(const float &y);
void setZ(const float &z);
//Operaciones
Vector3D add(const Vector3D &b) const;
Vector3D substract(const Vector3D &b) const;
Vector3D product(const float &b) const;
Vector3D product(const Vector3D &b) const;
//Sobrecarga operadores
Vector3D operator+(const float &b) const;
Vector3D operator+(const Vector3D &b) const;
Vector3D operator-(const float &b) const;
Vector3D operator-(const Vector3D& b) const;
Vector3D operator*(const float &b) const;
Vector3D operator*(const Vector3D &b) const;
bool operator==(const Vector3D& b) const;
};
#endif //ENGINE_VECTOR3D_H