27 #ifndef RL_MATH_MATRIXBASEADDONS_H
28 #define RL_MATH_MATRIXBASEADDONS_H
33 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived, 3, 3)
34 Matrix<Scalar, 3, 1> res;
35 res.x() = (this->derived()(2, 1) - this->derived()(1, 2)) / Scalar(2);
36 res.y() = (this->derived()(0, 2) - this->derived()(2, 0)) / Scalar(2);
37 res.z() = (this->derived()(1, 0) - this->derived()(0, 1)) / Scalar(2);
44 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 3)
45 Matrix<Scalar, 3, 3> res;
47 res(0, 1) = -this->derived().z();
48 res(0, 2) = this->derived().y();
49 res(1, 0) = this->derived().z();
51 res(1, 2) = -this->derived().x();
52 res(2, 0) = -this->derived().y();
53 res(2, 1) = this->derived().x();
61 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived, 3, 3)
62 Matrix<Scalar, 6, 1> res;
63 res(0) = this->derived()(0, 0);
64 res(1) = this->derived()(1, 1);
65 res(2) = this->derived()(2, 2);
66 res(3) = (this->derived()(1, 2) + this->derived()(2, 1)) / Scalar(2);
67 res(4) = (this->derived()(0, 2) + this->derived()(2, 0)) / Scalar(2);
68 res(5) = (this->derived()(0, 1) + this->derived()(1, 0)) / Scalar(2);
75 EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 6)
76 Matrix<Scalar, 3, 3> res;
77 res(0, 0) = this->derived()(0);
78 res(0, 1) = this->derived()(5);
79 res(0, 2) = this->derived()(4);
80 res(1, 0) = this->derived()(5);
81 res(1, 1) = this->derived()(1);
82 res(1, 2) = this->derived()(3);
83 res(2, 0) = this->derived()(4);
84 res(2, 1) = this->derived()(3);
85 res(2, 2) = this->derived()(2);
89 #endif // RL_MATH_MATRIXBASEADDONS_H