32 template <
typename _Scalar,
int _AmbientDim>
56 inline Hyperplane(
const VectorType& n,
const VectorType& e)
60 offset() = -e.eigen2_dot(n);
80 result.
normal() = (p1 - p0).unitOrthogonal();
81 result.offset() = -result.normal().eigen2_dot(p0);
88 static inline Hyperplane Through(
const VectorType& p0,
const VectorType& p1,
const VectorType& p2)
92 result.
normal() = (p2 - p0).cross(p1 - p0).normalized();
93 result.offset() = -result.normal().eigen2_dot(p0);
183 Scalar invdet =
Scalar(1) / det;
195 template<
typename XprType>
204 ei_assert(
"invalid traits value in Hyperplane::transform()");
229 template<
typename NewScalarType>
238 template<
typename OtherScalarType>
Hyperplane & transform(const Transform< Scalar, AmbientDimAtCompileTime > &t, TransformTraits traits=Affine)
const VectorType & origin() const
const NormalReturnType normal() const
Scalar signedDistance(const VectorType &p) const
NormalReturnType normal()
iterative scaling algorithm to equilibrate rows and column norms in matrices
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Block< Coefficients, AmbientDimAtCompileTime, 1 > NormalReturnType
Hyperplane(const Hyperplane< OtherScalarType, AmbientDimAtCompileTime > &other)
Hyperplane & transform(const MatrixBase< XprType > &mat, TransformTraits traits=Affine)
static Hyperplane Through(const VectorType &p0, const VectorType &p1, const VectorType &p2)
Hyperplane(const ParametrizedLine< Scalar, AmbientDimAtCompileTime > ¶metrized)
const Coefficients & coeffs() const
NumTraits< Scalar >::Real RealScalar
EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
Matrix< Scalar, int(AmbientDimAtCompileTime)==Dynamic?Dynamic:int(AmbientDimAtCompileTime)+1, 1 > Coefficients
bool ei_isMuchSmallerThan(const Scalar &x, const OtherScalar &y, typename NumTraits< Scalar >::Real precision=NumTraits< Scalar >::dummy_precision())
Hyperplane(const VectorType &n, Scalar d)
const VectorType & direction() const
static Hyperplane Through(const VectorType &p0, const VectorType &p1)
VectorType projection(const VectorType &p) const
const Scalar & offset() const
VectorType intersection(const Hyperplane &other)
Matrix< Scalar, AmbientDimAtCompileTime, 1 > VectorType
NumTraits< T >::Real ei_abs(const T &x)
Expression of a fixed-size or dynamic-size block.
internal::cast_return_type< Hyperplane, Hyperplane< NewScalarType, AmbientDimAtCompileTime > >::type cast() const
#define EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(Scalar, Size)
const internal::inverse_impl< Derived > inverse() const
bool isApprox(const Hyperplane &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
Hyperplane(const VectorType &n, const VectorType &e)
Base class for all dense matrices, vectors, and expressions.
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE)
Scalar absDistance(const VectorType &p) const