-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vector3.h
41 lines (32 loc) · 1.03 KB
/
Vector3.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
#ifndef __VECTOR_3__
#define __VECTOR_3__
#include <iostream>
#include "Defines.h"
// Forward Declarations
class CPhiVector3;
class CVector3 {
// Functions
public:
CVector3(const CPhiVector3& rPhiVector3);
CVector3(f32 fX = 0.0f, f32 fY = 0.0f, f32 fZ = 0.0f);
CVector3 Cross (const CVector3& rVector3) const;
f32 Dot (const CVector3& rVector3) const;
f32 GetMagnitudeSquared () const;
CVector3 GetUnitVector () const;
CVector3 operator* (f32 fScalar) const;
CVector3 operator/ (f32 fScalar) const;
CVector3 operator+ (const CVector3& rVector3) const;
CVector3 operator- (const CVector3& rVector3) const;
CVector3& operator*= (f32 fScalar);
CVector3& operator/= (f32 fScalar);
CVector3& operator+= (const CVector3& rVector3);
CVector3& operator-= (const CVector3& rVector3);
friend CVector3 operator* (f32 fScalar, const CVector3& rVector3);
friend std::ostream& operator<< (std::ostream& rOStream, const CVector3& rVector);
// Variables
public:
f32 x;
f32 y;
f32 z;
};
#endif // __VECTOR_3__