diff options
-rw-r--r-- | engines/titanic/star_control/fpose.h | 11 | ||||
-rw-r--r-- | engines/titanic/star_control/fvector.cpp | 12 | ||||
-rw-r--r-- | engines/titanic/star_control/fvector.h | 7 |
3 files changed, 10 insertions, 20 deletions
diff --git a/engines/titanic/star_control/fpose.h b/engines/titanic/star_control/fpose.h index 0fd60a286d..d2a6923184 100644 --- a/engines/titanic/star_control/fpose.h +++ b/engines/titanic/star_control/fpose.h @@ -31,7 +31,6 @@ class CMatrixTransform; /* * This class combines a position and orientation in 3D space - * TODO: Merge with DAffine */ class FPose : public FMatrix { public: @@ -82,8 +81,18 @@ public: */ FPose inverseTransform() const; + /** + * Multiplication between this FPose (4x3) and a FMatrix (3x3) + * This is done by making the matrix be a FPose with a last row + * of zeros + */ FPose compose(const FMatrix &m); + /** + * Multiplication between this FPose (4x3) and another FPose + * This FPose is on the left and m is on the right. + * The last row of m is added to the output component wise + */ FPose compose2(const FPose &m); }; diff --git a/engines/titanic/star_control/fvector.cpp b/engines/titanic/star_control/fvector.cpp index a6c8b2c42b..4fd17bf883 100644 --- a/engines/titanic/star_control/fvector.cpp +++ b/engines/titanic/star_control/fvector.cpp @@ -22,14 +22,10 @@ #include "titanic/star_control/fvector.h" #include "titanic/star_control/fpose.h" -//#include "common/algorithm.h" //#include "common/textconsole.h" namespace Titanic { -//FVector::FVector(const DVector &src) : _x(src._x), _y(src._y), _z(src._z) { -//} - FVector FVector::swapComponents() const { return FVector( (ABS(_x - _y) < 0.00001 && ABS(_y - _z) < 0.00001 && @@ -107,14 +103,6 @@ float FVector::getDistance(const FVector &src) const { return sqrt(xd * xd + yd * yd + zd * zd); } -/*FVector FVector::MatProdColVect(const DAffine &pose) const { - FVector v; - v._x = pose._col1._x * _x + pose._col2._x * _y + pose._col3._x * _z + pose._col4._x; - v._y = pose._col1._y * _x + pose._col2._y * _y + pose._col3._y * _z + pose._col4._y; - v._z = pose._col1._z * _x + pose._col2._z * _y + pose._col3._z * _z + pose._col4._z; - return v; -}*/ - FVector FVector::MatProdRowVect(const FPose &pose) const { FVector v; v._x = pose._row2._x * _y + pose._row3._x * _z + pose._row1._x * _x + pose._vector._x; diff --git a/engines/titanic/star_control/fvector.h b/engines/titanic/star_control/fvector.h index c39a9ceb0a..6f4c48303f 100644 --- a/engines/titanic/star_control/fvector.h +++ b/engines/titanic/star_control/fvector.h @@ -35,7 +35,6 @@ class FPose; /** * Floating point vector class. - * @remarks TODO: See if it can be merged with DVector */ class FVector { public: @@ -105,12 +104,6 @@ public: FVector MatProdRowVect(const FPose &pose) const; /** - * Returns a vector that is this vector on the right as a column vector - * times the 4x3 fpose matrix on the left. - */ - //FVector MatProdColVect(const DAffine &pose) const; - - /** * Returns a matrix that contains the frame rotation based on this vector and * a vector rotation based on input vector v */ |