22 #ifndef TITANIC_FVECTOR_H 23 #define TITANIC_FVECTOR_H 25 #include "titanic/star_control/fpoint.h" 29 enum Axis { X_AXIS, Y_AXIS, Z_AXIS };
40 FVector() : _x(0), _y(0), _z(0) {}
41 FVector(
float x,
float y,
float z) : _x(x), _y(y), _z(z) {}
76 bool result = normalize(hyp);
120 return _x == src._x && _y == src._y && _z == src._z;
127 return _x != src._x || _y != src._y || _z != src._z;
131 return FVector(_x + delta._x, _y + delta._y, _z + delta._z);
135 return FVector(_x - delta._x, _y - delta._y, _z - delta._z);
138 const FVector operator*(
float right)
const {
139 return FVector(_x * right, _y * right, _z * right);
143 return FVector(_x * right._x, _y * right._y, _z * right._z);
146 void operator+=(
const FVector &delta) {
152 void operator-=(
const FVector &delta) {
158 void operator+=(
const FPoint &delta) {
163 void operator-=(
const FPoint &delta) {
FVector swapComponents() const
bool operator!=(const FVector &src) const
Definition: fvector.h:126
FVector matProdRowVect(const FPose &pose) const
FVector getPolarCoord() const
void rotVectAxisY(float angleDeg)
bool operator==(const FVector &src) const
Definition: fvector.h:119
FVector crossProduct(const FVector &src) const
float getDistance(const FVector &src) const
FVector half(const FVector &v) const
FPose getFrameTransform(const FVector &v)
Common::String toString() const
bool normalize(float &hyp)
void clear()
Definition: fvector.h:46