11 #ifndef EIGEN_HYPERPLANE_H 12 #define EIGEN_HYPERPLANE_H 33 template <
typename _Scalar,
int _AmbientDim,
int _Options>
55 template<
int OtherOptions>
91 result.normal() = (p1 -
p0).unitOrthogonal();
103 VectorType
v0(p2 - p0),
v1(p1 - p0);
105 RealScalar norm =
result.normal().norm();
204 Scalar invdet =
Scalar(1) / det;
216 template<
typename XprType>
228 eigen_assert(0 &&
"invalid traits value in Hyperplane::transform()");
240 template<
int TrOptions>
254 template<
typename NewScalarType>
263 template<
typename OtherScalarType,
int OtherOptions>
265 {
m_coeffs = other.coeffs().template cast<Scalar>(); }
271 template<
int OtherOptions>
273 {
return m_coeffs.isApprox(other.m_coeffs, prec); }
282 #endif // EIGEN_HYPERPLANE_H
EIGEN_DEVICE_FUNC VectorType intersection(const Hyperplane &other) const
EIGEN_DEVICE_FUNC Hyperplane & transform(const MatrixBase< XprType > &mat, TransformTraits traits=Affine)
cout<< "Here is the matrix m:"<< endl<< m<< endl;JacobiSVD< MatrixXf > svd(m, ComputeThinU|ComputeThinV)
EIGEN_DEVICE_FUNC bool isMuchSmallerThan(const Scalar &x, const OtherScalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Matrix< Scalar, Index(AmbientDimAtCompileTime)==Dynamic ? Dynamic :Index(AmbientDimAtCompileTime)+1, 1, Options > Coefficients
static EIGEN_DEVICE_FUNC Hyperplane Through(const VectorType &p0, const VectorType &p1)
EIGEN_DEVICE_FUNC const VectorType & origin() const
EIGEN_DEVICE_FUNC Index dim() const
EIGEN_DEVICE_FUNC VectorType projection(const VectorType &p) const
EIGEN_DEVICE_FUNC Hyperplane(const Hyperplane< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other)
EIGEN_DEVICE_FUNC const Inverse< Derived > inverse() const
Namespace containing all symbols from the Eigen library.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC const VectorType & direction() const
EIGEN_DEVICE_FUNC Hyperplane(const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other)
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
EIGEN_DEVICE_FUNC Hyperplane(const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized)
EIGEN_DEVICE_FUNC const Coefficients & coeffs() const
EIGEN_DEVICE_FUNC Hyperplane(Index _dim)
EIGEN_DEVICE_FUNC Scalar absDistance(const VectorType &p) const
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE internal::enable_if< NumTraits< T >::IsSigned||NumTraits< T >::IsComplex, typename NumTraits< T >::Real >::type abs(const T &x)
EIGEN_DEVICE_FUNC Hyperplane()
const Block< const Coefficients, AmbientDimAtCompileTime, 1 > ConstNormalReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC Scalar signedDistance(const VectorType &p) const
EIGEN_DEVICE_FUNC ConstNormalReturnType normal() const
EIGEN_DEVICE_FUNC NormalReturnType normal()
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Matrix< Scalar, AmbientDimAtCompileTime, 1 > VectorType
EIGEN_DEVICE_FUNC Hyperplane & transform(const Transform< Scalar, AmbientDimAtCompileTime, Affine, TrOptions > &t, TransformTraits traits=Affine)
EIGEN_DEVICE_FUNC const Scalar & offset() const
EIGEN_DEVICE_FUNC Coefficients & coeffs()
static EIGEN_DEVICE_FUNC Hyperplane Through(const VectorType &p0, const VectorType &p1, const VectorType &p2)
#define EIGEN_DEVICE_FUNC
Expression of a fixed-size or dynamic-size block.
EIGEN_DEVICE_FUNC void normalize(void)
Two-sided Jacobi SVD decomposition of a rectangular matrix.
EIGEN_DEVICE_FUNC Hyperplane(const VectorType &n, const VectorType &e)
EIGEN_DEVICE_FUNC Hyperplane(const VectorType &n, const Scalar &d)
const MatrixVType & matrixV() const
EIGEN_DEVICE_FUNC bool isApprox(const Hyperplane< Scalar, AmbientDimAtCompileTime, OtherOptions > &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
Block< Coefficients, AmbientDimAtCompileTime, 1 > NormalReturnType
EIGEN_DEVICE_FUNC ~Hyperplane()
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC internal::cast_return_type< Hyperplane, Hyperplane< NewScalarType, AmbientDimAtCompileTime, Options > >::type cast() const
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
EIGEN_DEVICE_FUNC Scalar & offset()