|
MOAB
4.9.3pre
|
A parametrized line. More...
#include <ParametrizedLine.h>

Public Types | |
| enum | { AmbientDimAtCompileTime = _AmbientDim, Options = _Options } |
| typedef _Scalar | Scalar |
| typedef NumTraits< Scalar >::Real | RealScalar |
| typedef Eigen::Index | Index |
| typedef Matrix< Scalar, AmbientDimAtCompileTime, 1, Options > | VectorType |
Public Member Functions | |
| ParametrizedLine () | |
| template<int OtherOptions> | |
| ParametrizedLine (const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > &other) | |
| ParametrizedLine (Index _dim) | |
| ParametrizedLine (const VectorType &origin, const VectorType &direction) | |
| template<int OtherOptions> | |
| ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) | |
| ~ParametrizedLine () | |
| Index | dim () const |
| const VectorType & | origin () const |
| VectorType & | origin () |
| const VectorType & | direction () const |
| VectorType & | direction () |
| RealScalar | squaredDistance (const VectorType &p) const |
| RealScalar | distance (const VectorType &p) const |
| VectorType | projection (const VectorType &p) const |
| VectorType | pointAt (const Scalar &t) const |
| template<int OtherOptions> | |
| Scalar | intersectionParameter (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const |
| template<int OtherOptions> | |
| Scalar | intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const |
| template<int OtherOptions> | |
| VectorType | intersectionPoint (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) const |
| template<typename NewScalarType > | |
| internal::cast_return_type < ParametrizedLine, ParametrizedLine < NewScalarType, AmbientDimAtCompileTime, Options > >::type | cast () const |
| template<typename OtherScalarType , int OtherOptions> | |
| ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > &other) | |
| bool | isApprox (const ParametrizedLine &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const |
Static Public Member Functions | |
| static ParametrizedLine | Through (const VectorType &p0, const VectorType &p1) |
Protected Attributes | |
| VectorType | m_origin |
| VectorType | m_direction |
A parametrized line.
A parametrized line is defined by an origin point
and a unit direction vector
such that the line corresponds to the set
,
.
| _Scalar | the scalar type, i.e., the type of the coefficients |
| _AmbientDim | the dimension of the ambient space, can be a compile time value or Dynamic. |
Definition at line 30 of file ParametrizedLine.h.
| typedef Eigen::Index Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::Index |
Definition at line 40 of file ParametrizedLine.h.
| typedef NumTraits<Scalar>::Real Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::RealScalar |
Definition at line 39 of file ParametrizedLine.h.
| typedef _Scalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::Scalar |
Definition at line 38 of file ParametrizedLine.h.
| typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType |
Definition at line 41 of file ParametrizedLine.h.
| anonymous enum |
Definition at line 34 of file ParametrizedLine.h.
{
AmbientDimAtCompileTime = _AmbientDim,
Options = _Options
};
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | ) | [inline] |
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline] |
Definition at line 47 of file ParametrizedLine.h.
: m_origin(other.origin()), m_direction(other.direction()) {}
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | Index | _dim | ) | [inline, explicit] |
Constructs a dynamic-size line with _dim the dimension of the ambient space
Definition at line 53 of file ParametrizedLine.h.
: m_origin(_dim), m_direction(_dim) {}
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | const VectorType & | origin, |
| const VectorType & | direction | ||
| ) | [inline] |
Initializes a parametrized line of direction direction and origin origin.
Definition at line 58 of file ParametrizedLine.h.
: m_origin(origin), m_direction(direction) {}
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | [inline, explicit] |
Constructs a parametrized line from a 2D hyperplane
Definition at line 146 of file ParametrizedLine.h.
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(VectorType, 2)
direction() = hyperplane.normal().unitOrthogonal();
origin() = -hyperplane.normal()*hyperplane.offset();
}
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::~ParametrizedLine | ( | ) | [inline] |
Definition at line 68 of file ParametrizedLine.h.
{}
| Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
Definition at line 122 of file ParametrizedLine.h.
{
m_origin = other.origin().template cast<Scalar>();
m_direction = other.direction().template cast<Scalar>();
}
| internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::cast | ( | ) | const [inline] |
*this with scalar type casted to NewScalarType Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.
Definition at line 114 of file ParametrizedLine.h.
{
return typename internal::cast_return_type<ParametrizedLine,
ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type(*this);
}
| Index Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::dim | ( | ) | const [inline] |
Definition at line 71 of file ParametrizedLine.h.
{ return m_direction.size(); }
| const VectorType& Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::direction | ( | ) | const [inline] |
Definition at line 76 of file ParametrizedLine.h.
{ return m_direction; }
| VectorType& Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::direction | ( | ) | [inline] |
Definition at line 77 of file ParametrizedLine.h.
{ return m_direction; }
| RealScalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::distance | ( | const VectorType & | p | ) | const [inline] |
*this. Definition at line 90 of file ParametrizedLine.h.
{ using std::sqrt; return sqrt(squaredDistance(p)); }
| _Scalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | const [inline] |
*this and the given hyperplane Definition at line 178 of file ParametrizedLine.h.
{
return intersectionParameter(hyperplane);
}
| _Scalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::intersectionParameter | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | const [inline] |
*this and the given hyperplane Definition at line 166 of file ParametrizedLine.h.
| ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::intersectionPoint | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | const [inline] |
*this and the given hyperplane Definition at line 188 of file ParametrizedLine.h.
{
return pointAt(intersectionParameter(hyperplane));
}
| bool Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::isApprox | ( | const ParametrizedLine< _Scalar, _AmbientDim, _Options > & | other, |
| const typename NumTraits< Scalar >::Real & | prec = NumTraits<Scalar>::dummy_precision() |
||
| ) | const [inline] |
true if *this is approximately equal to other, within the precision determined by prec.Definition at line 132 of file ParametrizedLine.h.
{ return m_origin.isApprox(other.m_origin, prec) && m_direction.isApprox(other.m_direction, prec); }
| const VectorType& Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::origin | ( | ) | const [inline] |
Definition at line 73 of file ParametrizedLine.h.
{ return m_origin; }
| VectorType& Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::origin | ( | ) | [inline] |
Definition at line 74 of file ParametrizedLine.h.
{ return m_origin; }
| ParametrizedLine< _Scalar, _AmbientDim, _Options >::VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::pointAt | ( | const Scalar & | t | ) | const [inline] |
Definition at line 157 of file ParametrizedLine.h.
| VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::projection | ( | const VectorType & | p | ) | const [inline] |
| RealScalar Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::squaredDistance | ( | const VectorType & | p | ) | const [inline] |
*this. Definition at line 82 of file ParametrizedLine.h.
{
VectorType diff = p - origin();
return (diff - direction().dot(diff) * direction()).squaredNorm();
}
| static ParametrizedLine Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::Through | ( | const VectorType & | p0, |
| const VectorType & | p1 | ||
| ) | [inline, static] |
Constructs a parametrized line going from p0 to p1.
Definition at line 65 of file ParametrizedLine.h.
{ return ParametrizedLine(p0, (p1-p0).normalized()); }
VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::m_direction [protected] |
Definition at line 137 of file ParametrizedLine.h.
VectorType Eigen::ParametrizedLine< _Scalar, _AmbientDim, _Options >::m_origin [protected] |
Definition at line 137 of file ParametrizedLine.h.