22#ifndef TITANIC_FVECTOR_H
23#define TITANIC_FVECTOR_H
25#include "titanic/star_control/fpoint.h"
29enum 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) {}
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);
134 FVector operator-(
const FVector &delta)
const {
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);
142 const FVector operator*(
const FVector &right)
const {
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 matProdRowVect(const FPose &pose) const
FPose getFrameTransform(const FVector &v)
FVector half(const FVector &v) const
void rotVectAxisY(float angleDeg)
FVector getPolarCoord() const
float getDistance(const FVector &src) const
void clear()
Definition: fvector.h:46
FVector swapComponents() const
Common::String toString() const
bool operator==(const FVector &src) const
Definition: fvector.h:119
bool normalize(float &hyp)
FVector crossProduct(const FVector &src) const
bool operator!=(const FVector &src) const
Definition: fvector.h:126