123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
-
-
- #ifndef _MATH_VECTOR3D_H_
- #define _MATH_VECTOR3D_H_
-
- #include "math/math.h"
-
-
- class Vector3d {
- public:
-
-
-
- Vector3d();
-
-
-
- Vector3d(float v[3]);
-
-
-
- Vector3d(float x, float y, float z);
-
-
-
- Vector3d(const Vector3d& v);
-
-
-
- static float dot(const Vector3d& u, const Vector3d& v);
-
-
-
- static Vector3d cross(const Vector3d& u, const Vector3d& v);
-
-
-
- float magnitude();
-
-
-
- Vector3d unit();
-
-
-
- static Vector3d zeroVector();
-
-
-
- Vector3d operator +(const Vector3d& v);
-
-
-
- Vector3d operator -(const Vector3d& v);
-
-
-
- Vector3d operator -();
-
-
-
- Vector3d operator *(float s);
-
-
-
- Vector3d operator /(float s);
-
-
-
- float operator *(const Vector3d& v);
-
-
-
- void normalize();
-
-
-
- void zero();
-
-
-
- Vector3d& operator =(const Vector3d& v);
-
-
-
- Vector3d& operator +=(const Vector3d& v);
-
-
-
- Vector3d& operator -=(const Vector3d& v);
-
-
-
- Vector3d& operator *=(float s);
-
- float mVec[3];
- };
-
- #endif
|