File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
math/genvector/inc/Math/GenVector Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 3434#include " Math/GenVector/RotationYfwd.h"
3535#include " Math/GenVector/RotationZfwd.h"
3636
37+ #include " Math/GenVector/GenVector_exception.h"
3738
3839#include < algorithm>
3940#include < cassert>
@@ -345,6 +346,20 @@ class Rotation3D {
345346
346347 // =========== operations ==============
347348
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+ }
348363
349364 /* *
350365 Rotation operation on a displacement vector in any coordinate system
You can’t perform that action at this time.
0 commit comments