Library of Assembled Shared Sources
lass::prim::Point2DH< T > Struct Template Reference

homogenous 2D Point More...

#include <point_2dh.h>

Inheritance diagram for lass::prim::Point2DH< T >:

Public Member Functions

TConstReference at (signed iIndex) const
 Wrap index around range.
 
TReference at (signed iIndex)
 Wrap index around range.
 
const Point2DH< T > & operator+ () const
 A weird way to get back the same object.
 
bool isZero () const
 Return true if point is origin (0, 0, z).
 
bool isInfinite () const
 Return true if point is at infinite distance of origin.
 
bool isNaN () const
 Return true if at least one of the components is NaN.
 
bool isValid () const
 Return true if point is valid.
 
const TValue weight () const
 Return weight of point.
 
const Point2D< T > affine () const
 Return rescaled version of point with weight = 1.
 
void homogenize ()
 Rescale point so that weight is 1.
 

Detailed Description

template<typename T>
struct lass::prim::Point2DH< T >

homogenous 2D Point

Author
BdG
Date
2003

Definition at line 62 of file point_2dh.h.

Member Function Documentation

◆ isZero()

template<typename T>
bool lass::prim::Point2DH< T >::isZero ( ) const

Return true if point is origin (0, 0, z).

z may be 0 but doesn't has to be.

Definition at line 212 of file point_2dh.inl.

References isZero().

Referenced by isZero().

◆ isInfinite()

template<typename T>
bool lass::prim::Point2DH< T >::isInfinite ( ) const

Return true if point is at infinite distance of origin.

test if z == 0.

Definition at line 232 of file point_2dh.inl.

References isInfinite().

Referenced by isInfinite().

◆ isValid()

template<typename T>
bool lass::prim::Point2DH< T >::isValid ( ) const

Return true if point is valid.

test if point != (0, 0, 0)

Definition at line 242 of file point_2dh.inl.

References isValid().

Referenced by isValid().

◆ weight()

template<typename T>
const Point2DH< T >::TValue lass::prim::Point2DH< T >::weight ( ) const
inline

Return weight of point.

weight = z.

Definition at line 252 of file point_2dh.inl.

References weight().

Referenced by weight().

◆ affine()

template<typename T>
const Point2D< T > lass::prim::Point2DH< T >::affine ( ) const
inline

Return rescaled version of point with weight = 1.

Does not influence original poitn.

Definition at line 263 of file point_2dh.inl.

References affine(), and homogenize().

Referenced by affine(), lass::prim::Line2D< T, EquationPolicy, NormalizingPolicy >::intersect(), and lass::prim::Triangle2D< U >::partialVoronoiArea().


The documentation for this struct was generated from the following files: