File tree 1 file changed +15
-0
lines changed
math/genvector/inc/Math/GenVector
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 34
34
#include " Math/GenVector/RotationYfwd.h"
35
35
#include " Math/GenVector/RotationZfwd.h"
36
36
37
+ #include " Math/GenVector/GenVector_exception.h"
37
38
38
39
#include < algorithm>
39
40
#include < cassert>
@@ -345,6 +346,20 @@ class Rotation3D {
345
346
346
347
// =========== operations ==============
347
348
349
+ /* *
350
+ Access operator, used to have direct access to rotation matrix's entries
351
+ \param i row index in {0,1,2}
352
+ \param j column index in {0,1,2}
353
+ */
354
+ Scalar operator ()(size_t i, size_t j) const
355
+ {
356
+ if (i < 3 && j < 3 )
357
+ return fM [i + 3 * j];
358
+ else
359
+ GenVector::Throw (" Rotation3D::operator(size_t i, size_t j):\n "
360
+ " indices i and j must range in {0,1,2}" );
361
+ return 0.0 ;
362
+ }
348
363
349
364
/* *
350
365
Rotation operation on a displacement vector in any coordinate system
You can’t perform that action at this time.
0 commit comments