|
|
Public Member Functions | |
| cartesian_distance (T const &v) | |
| Constructor with a value. | |
| operator cast_type () const | |
| bool | operator< (cartesian_distance< T > const &other) const |
| bool | operator== (cartesian_distance< T > const &other) const |
| bool | operator> (cartesian_distance< T > const &other) const |
| T | squared_value () const |
| The "squared_value" method returns the internal squared value. | |
| bool | very_small () const |
Friends | |
| template<typename Char , typename Traits > | |
| std::basic_ostream< Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &os, cartesian_distance< T > const &d) |
| Make streamable to enable std::cout << ggl::distance( ). | |
Distance calculation for xy points or xyz points is done by taking the square root. However, for distance comparison drawing the square root is not necessary. Therefore the distance strategies are allowed to return the squares of the distance. This structure contains the distance, and a boolean to indicate if it is squared. It has an automatic conversion to a double value, which does the square root if necessary.
Definition at line 41 of file distance_result.hpp.
| ggl::cartesian_distance< T >::cartesian_distance | ( | T const & | v | ) | [explicit] |
| ggl::cartesian_distance< T >::operator cast_type | ( | ) | const |
Automatic conversion to double or higher precision, taking squareroot if necessary
Definition at line 67 of file distance_result.hpp.
| bool ggl::cartesian_distance< T >::operator< | ( | cartesian_distance< T > const & | other | ) | const |
Definition at line 85 of file distance_result.hpp.
| bool ggl::cartesian_distance< T >::operator> | ( | cartesian_distance< T > const & | other | ) | const |
Definition at line 89 of file distance_result.hpp.
| bool ggl::cartesian_distance< T >::operator== | ( | cartesian_distance< T > const & | other | ) | const |
Definition at line 93 of file distance_result.hpp.
| bool ggl::cartesian_distance< T >::very_small | ( | ) | const |
Definition at line 118 of file distance_result.hpp.
| T ggl::cartesian_distance< T >::squared_value | ( | ) | const |
The "squared_value" method returns the internal squared value.
Definition at line 124 of file distance_result.hpp.
| std::basic_ostream<Char, Traits>& operator<< | ( | std::basic_ostream< Char, Traits > & | os, | |
| cartesian_distance< T > const & | d | |||
| ) | [friend] |
Make streamable to enable std::cout << ggl::distance( ).
Definition at line 132 of file distance_result.hpp.
|
November 5, 2009 |
Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam Copyright © 2008-2009 Bruno Lalande, Paris Copyright © 2009 Mateusz Loskot, Cadcorp, London |