A parametrized line. More...
Public Types | |
enum | { AmbientDimAtCompileTime } |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef _Scalar | Scalar |
typedef Matrix< Scalar, AmbientDimAtCompileTime, 1 > | VectorType |
Public Member Functions | |
template<typename NewScalarType > | |
ei_cast_return_type < ParametrizedLine, ParametrizedLine < NewScalarType, AmbientDimAtCompileTime > >::type | cast () const |
int | dim () const |
const VectorType & | direction () const |
VectorType & | direction () |
RealScalar | distance (const VectorType &p) const |
Scalar | intersection (const Hyperplane< _Scalar, _AmbientDim > &hyperplane) |
bool | isApprox (const ParametrizedLine &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
const VectorType & | origin () const |
VectorType & | origin () |
ParametrizedLine () | |
ParametrizedLine (int _dim) | |
ParametrizedLine (const VectorType &origin, const VectorType &direction) | |
ParametrizedLine (const Hyperplane< _Scalar, _AmbientDim > &hyperplane) | |
template<typename OtherScalarType > | |
ParametrizedLine (const ParametrizedLine< OtherScalarType, AmbientDimAtCompileTime > &other) | |
VectorType | projection (const VectorType &p) const |
RealScalar | squaredDistance (const VectorType &p) const |
Static Public Member Functions | |
static ParametrizedLine | Through (const VectorType &p0, const VectorType &p1) |
Protected Attributes | |
VectorType | m_direction |
VectorType | m_origin |
A parametrized line.
This is defined in the Geometry module.
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. |
|
inlineexplicit |
Default constructor without initialization
|
inlineexplicit |
Constructs a dynamic-size line with _dim the dimension of the ambient space
|
inline |
Initializes a parametrized line of direction direction and origin origin.
|
inlineexplicit |
Constructs a parametrized line from a 2D hyperplane
|
inlineexplicit |
Copy constructor with scalar type conversion
|
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
.
|
inline |
|
inline |
*this
.
|
inline |
*this
and the given hyperplane
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
*this
.
|
inline |
*this
.
|
inlinestatic |
Constructs a parametrized line going from p0 to p1.