Permalink
Browse files
TITANIC: Fix DMatrix constructors
- Loading branch information
|
|
@@ -32,18 +32,27 @@ DMatrix::DMatrix() : |
|
|
_row1(1.875, 0.0, 0.0), _row2(0.0, 1.875, 0.0), _row3(0.0, 0.0, 1.875) { |
|
|
} |
|
|
|
|
|
DMatrix::DMatrix(int mode, const FMatrix *src) { |
|
|
assert(!mode); |
|
|
|
|
|
_row1._x = 1.875; |
|
|
_row2._y = 1.875; |
|
|
_row3._z = 1.875; |
|
|
_frow1._x = src->_row1._x; |
|
|
_frow1._y = src->_row1._y; |
|
|
_frow1._z = src->_row1._z; |
|
|
_frow2._x = src->_row2._x; |
|
|
_frow2._y = src->_row2._y; |
|
|
_frow2._z = src->_row2._z; |
|
|
DMatrix::DMatrix(int mode, const DVector &src) { |
|
|
switch (mode) { |
|
|
case 0: |
|
|
_row1._x = 1.0; |
|
|
_row2._y = 1.0; |
|
|
_row3._z = 1.0; |
|
|
_row4 = src; |
|
|
break; |
|
|
|
|
|
case 1: |
|
|
_row1._x = src._x; |
|
|
_row2._y = src._y; |
|
|
_row3._z = src._z; |
|
|
break; |
|
|
|
|
|
default: |
|
|
_row1._x = 1.0; |
|
|
_row2._y = 1.0; |
|
|
_row3._z = 1.0; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
DMatrix::DMatrix(Axis axis, double amount) { |
|
|
|
|
|
@@ -42,14 +42,13 @@ class DMatrix { |
|
|
DVector _row1; |
|
|
DVector _row2; |
|
|
DVector _row3; |
|
|
FVector _frow1; |
|
|
FVector _frow2; |
|
|
DVector _row4; |
|
|
public: |
|
|
static void init(); |
|
|
static void deinit(); |
|
|
public: |
|
|
DMatrix(); |
|
|
DMatrix(int mode, const FMatrix *src); |
|
|
DMatrix(int mode, const DVector &src); |
|
|
DMatrix(Axis axis, double amount); |
|
|
DMatrix(const FMatrix &src); |
|
|
|
|
|
|