A parametrized line. More...
#include <ParametrizedLine.h>
Public Types | |
enum | { AmbientDimAtCompileTime = _AmbientDim } |
enum | { AmbientDimAtCompileTime = _AmbientDim, Options = _Options } |
typedef _Scalar | Scalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
typedef _Scalar | Scalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef DenseIndex | Index |
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1, Options > | VectorType |
Public Member Functions | |
ParametrizedLine () | |
ParametrizedLine (int _dim) | |
ParametrizedLine (const VectorType &origin, const VectorType &direction) | |
ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim > &hyperplane) | |
~ParametrizedLine () | |
int | 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 |
Scalar | intersection (const Hyperplane< _Scalar, _AmbientDim > &hyperplane) |
template<typename NewScalarType > | |
internal::cast_return_type < ParametrizedLine, ParametrizedLine < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
template<typename OtherScalarType > | |
ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime > &other) | |
bool | isApprox (const ParametrizedLine &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
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 |
template<int OtherOptions> | |
Scalar | intersection (const Hyperplane< _Scalar, _AmbientDim, OtherOptions > &hyperplane) |
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, typename NumTraits< Scalar >::Real prec=NumTraits< Scalar >::dummy_precision()) const |
Static Public Member Functions | |
static ParametrizedLine | Through (const VectorType &p0, const VectorType &p1) |
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. |
typedef DenseIndex ParametrizedLine< _Scalar, _AmbientDim >::Index |
typedef NumTraits<Scalar>::Real ParametrizedLine< _Scalar, _AmbientDim >::RealScalar |
typedef NumTraits<Scalar>::Real ParametrizedLine< _Scalar, _AmbientDim >::RealScalar |
typedef _Scalar ParametrizedLine< _Scalar, _AmbientDim >::Scalar |
typedef _Scalar ParametrizedLine< _Scalar, _AmbientDim >::Scalar |
typedef Matrix<Scalar,AmbientDimAtCompileTime,1> ParametrizedLine< _Scalar, _AmbientDim >::VectorType |
typedef Matrix<Scalar,AmbientDimAtCompileTime,1,Options> ParametrizedLine< _Scalar, _AmbientDim >::VectorType |
anonymous enum |
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | ) | [inline, explicit] |
Default constructor without initialization
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | int | _dim | ) | [inline, explicit] |
Constructs a dynamic-size line with _dim the dimension of the ambient space
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const VectorType & | origin, | |
const VectorType & | direction | |||
) | [inline] |
Initializes a parametrized line of direction direction and origin origin.
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const Hyperplane< _Scalar, _AmbientDim > & | hyperplane | ) | [inline, explicit] |
Constructs a parametrized line from a 2D hyperplane
ParametrizedLine< _Scalar, _AmbientDim >::~ParametrizedLine | ( | ) | [inline] |
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | ) | [inline, explicit] |
Default constructor without initialization
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const ParametrizedLine< Scalar, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline] |
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | Index | _dim | ) | [inline, explicit] |
Constructs a dynamic-size line with _dim the dimension of the ambient space
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const VectorType & | origin, | |
const VectorType & | direction | |||
) | [inline] |
Initializes a parametrized line of direction direction and origin origin.
ParametrizedLine< _Scalar, _AmbientDim, _Options >::ParametrizedLine | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | [inline, explicit] |
Constructs a parametrized line from a 2D hyperplane
ParametrizedLine< _Scalar, _AmbientDim >::~ParametrizedLine | ( | ) | [inline] |
ParametrizedLine< _Scalar, _AmbientDim >::ParametrizedLine | ( | const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime, OtherOptions > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime> >::type ParametrizedLine< _Scalar, _AmbientDim >::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
.
internal::cast_return_type<ParametrizedLine, ParametrizedLine<NewScalarType,AmbientDimAtCompileTime,Options> >::type ParametrizedLine< _Scalar, _AmbientDim >::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
.
int ParametrizedLine< _Scalar, _AmbientDim >::dim | ( | ) | const [inline] |
Index ParametrizedLine< _Scalar, _AmbientDim >::dim | ( | ) | const [inline] |
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction | ( | ) | const [inline] |
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction | ( | ) | [inline] |
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction | ( | ) | const [inline] |
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::direction | ( | ) | [inline] |
RealScalar ParametrizedLine< _Scalar, _AmbientDim >::distance | ( | const VectorType & | p | ) | const [inline] |
*this
. RealScalar ParametrizedLine< _Scalar, _AmbientDim >::distance | ( | const VectorType & | p | ) | const [inline] |
*this
. _Scalar ParametrizedLine< _Scalar, _AmbientDim >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim > & | hyperplane | ) | [inline] |
*this
and the given hyperplane _Scalar ParametrizedLine< _Scalar, _AmbientDim, _Options >::intersection | ( | const Hyperplane< _Scalar, _AmbientDim, OtherOptions > & | hyperplane | ) | [inline] |
*this
and the given hyperplane bool ParametrizedLine< _Scalar, _AmbientDim >::isApprox | ( | const ParametrizedLine< _Scalar, _AmbientDim > & | other, | |
typename NumTraits< Scalar >::Real | prec = precision<Scalar>() | |||
) | const [inline] |
true
if *this
is approximately equal to other, within the precision determined by prec.bool ParametrizedLine< _Scalar, _AmbientDim >::isApprox | ( | const ParametrizedLine< _Scalar, _AmbientDim > & | other, | |
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.VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin | ( | ) | [inline] |
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin | ( | ) | const [inline] |
VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin | ( | ) | [inline] |
const VectorType& ParametrizedLine< _Scalar, _AmbientDim >::origin | ( | ) | const [inline] |
VectorType ParametrizedLine< _Scalar, _AmbientDim >::projection | ( | const VectorType & | p | ) | const [inline] |
*this
. VectorType ParametrizedLine< _Scalar, _AmbientDim >::projection | ( | const VectorType & | p | ) | const [inline] |
*this
. RealScalar ParametrizedLine< _Scalar, _AmbientDim >::squaredDistance | ( | const VectorType & | p | ) | const [inline] |
*this
. RealScalar ParametrizedLine< _Scalar, _AmbientDim >::squaredDistance | ( | const VectorType & | p | ) | const [inline] |
*this
. static ParametrizedLine ParametrizedLine< _Scalar, _AmbientDim >::Through | ( | const VectorType & | p0, | |
const VectorType & | p1 | |||
) | [inline, static] |
Constructs a parametrized line going from p0 to p1.
static ParametrizedLine ParametrizedLine< _Scalar, _AmbientDim >::Through | ( | const VectorType & | p0, | |
const VectorType & | p1 | |||
) | [inline, static] |
Constructs a parametrized line going from p0 to p1.
VectorType ParametrizedLine< _Scalar, _AmbientDim >::m_direction [protected] |
VectorType ParametrizedLine< _Scalar, _AmbientDim >::m_origin [protected] |