12 #include <Eigen/Geometry> 22 const Index dim = _line.dim();
27 typedef Matrix<
Scalar, HyperplaneType::AmbientDimAtCompileTime,
28 HyperplaneType::AmbientDimAtCompileTime>
MatrixType;
30 VectorType
p0 = VectorType::Random(dim);
31 VectorType
p1 = VectorType::Random(dim);
33 VectorType d0 = VectorType::Random(dim).normalized();
37 Scalar s0 = internal::random<Scalar>();
38 Scalar s1 =
abs(internal::random<Scalar>());
47 const int Dim = LineType::AmbientDimAtCompileTime;
55 VectorType
p2 = VectorType::Random(dim);
56 VectorType
n2 = VectorType::Random(dim).normalized();
57 HyperplaneType hp(p2,n2);
58 Scalar
t = l0.intersectionParameter(hp);
59 VectorType pi = l0.pointAt(t);
67 MatrixType
rot = MatrixType::Random(dim,dim).householderQr().householderQ();
74 VectorType
p3 = l0.pointAt(
Scalar(1));
82 .distance((rot*scaling*translation) * p3),
Scalar(1) );
85 .distance((rot*translation) * p3),
Scalar(1) );
98 Scalar* array3u = array3+1;
100 Line4a *
p1 = ::new(reinterpret_cast<void*>(array1)) Line4a;
101 Line4u *
p2 = ::new(reinterpret_cast<void*>(array2)) Line4u;
102 Line4u *
p3 = ::new(reinterpret_cast<void*>(array3u)) Line4u;
104 p1->origin().setRandom();
105 p1->direction().setRandom();
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
Point3 translation(const Pose3 &pose, OptionalJacobian< 3, 6 > H)
#define CALL_SUBTEST_4(FUNC)
void parametrizedline_alignment()
EIGEN_DEVICE_FUNC const DiagonalVectorType & diagonal() const
#define CALL_SUBTEST_3(FUNC)
Represents a diagonal matrix with its storage.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Represents a translation transformation.
#define VERIFY_IS_APPROX(a, b)
#define CALL_SUBTEST_1(FUNC)
void parametrizedline(const LineType &_line)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
NumTraits< Scalar >::Real RealScalar
#define VERIFY_IS_MUCH_SMALLER_THAN(a, b)
EIGEN_DECLARE_TEST(geo_parametrizedline)
#define CALL_SUBTEST_2(FUNC)
The matrix class, also used for vectors and row-vectors.