11 #include <Eigen/Geometry> 27 Vector3
v0 = Vector3::Random(),
28 v1 = Vector3::Random(),
29 v2 = Vector3::Random();
38 mat3 << v0.normalized(),
39 (v0.cross(
v1)).normalized(),
40 (v0.cross(
v1).cross(v0)).normalized();
49 Vector3
vec3 = Vector3::Random();
51 int i = internal::random<int>(0,2);
52 mcross = mat3.colwise().cross(vec3);
61 mcross = mat3.rowwise().cross(vec3);
65 Vector4 v40 = Vector4::Random(),
66 v41 = Vector4::Random(),
67 v42 = Vector4::Random();
68 v40.w() = v41.w() = v42.w() = 0;
69 v42.template head<3>() = v40.template head<3>().cross(v41.template head<3>());
75 RealVector3 rv1 = RealVector3::Random();
88 VectorType
v0 = VectorType::Random(
size);
97 v0.tail(
size-2).setRandom();
104 Vector3
vec3 = Vector3::Random();
105 int i = internal::random<int>(0,
size-1);
107 Matrix3N mat3N(3,
size), mcross3N(3,
size);
109 mcross3N = mat3N.colwise().cross(vec3);
112 MatrixN3 matN3(
size,3), mcrossN3(
size,3);
114 mcrossN3 = matN3.rowwise().cross(vec3);
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_4(FUNC)
#define CALL_SUBTEST_3(FUNC)
void diagonal(const MatrixType &m)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
void orthomethods(int size=Size)
#define VERIFY_IS_APPROX(a, b)
EIGEN_DECLARE_TEST(geo_orthomethods)
#define CALL_SUBTEST_1(FUNC)
Point3 cross(const Point3 &p, const Point3 &q, OptionalJacobian< 3, 3 > H1, OptionalJacobian< 3, 3 > H2)
cross product
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
#define CALL_SUBTEST_5(FUNC)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbsReturnType cwiseAbs() const
static Vector9 vec3(const Matrix3 &R)
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.