Related Functions |
(Note that these are not member functions.)
|
template<typename P , typename D > |
P | operator+ (const Gpoint< P > &p, const Gdpoint< D > &dp) |
template<typename P , typename D > |
P & | operator+= (Gpoint< P > &p, const Gdpoint< D > &dp) |
template<typename L , typename R > |
L::delta | operator- (const Gpoint< L > &lhs, const Gpoint< R > &rhs) |
template<typename P , typename D > |
P & | operator-= (Gpoint< P > &p, const Gdpoint< D > &dp) |
template<typename P , typename D > |
P | operator/ (const Gpoint< P > &p, const value::scalar_< D > &dp) |
template<typename P > |
std::ostream & | operator<< (std::ostream &ostr, const Gpoint< P > &p) |
template<typename L , typename R > |
bool | operator== (const Gpoint< L > &lhs, const Gpoint< R > &rhs) |
Detailed Description
Definition at line 36 of file point2d_h.dox.
Constructor & Destructor Documentation
mln::point2df_h::point2df_h |
( |
| ) |
|
Constructor without argument.
Construct an hexagonal 2D point from an algebra vector.
Construct an hexagonal 2D point from an algebra vector.
Construct an hexagonal 2D point at row row
and column col
.
Construct an hexagonal 2D point at (0,0).
Coordinates are set by function f
.
Member Function Documentation
template<typename C , typename E >
const C& mln::internal::mutable_coord_impl_< 2, C, E >::col |
( |
| ) |
const |
|
inherited |
template<typename C , typename E >
C& mln::internal::mutable_coord_impl_< 2, C, E >::col |
( |
| ) |
|
|
inherited |
Return the underlying vector storing the coordinates.
Read-only access to the last coordinate.
Read-write access to the last coordinate.
Point with all coordinates set to the mininum value.
Shifting by the
inverse of dp.
Read-only access to the i-th
coordinate value.
- Parameters
-
[in] | i | The coordinate index. |
- Precondition
i
< dim
Read-write access to the i-th
coordinate value.
- Parameters
-
[in] | i | The coordinate index. |
- Precondition
i
< dim
Point with all coordinates set to the maximum value.
template<typename C , typename E >
const C& mln::internal::mutable_coord_impl_< 2, C, E >::row |
( |
| ) |
const |
|
inherited |
template<typename C , typename E >
C& mln::internal::mutable_coord_impl_< 2, C, E >::row |
( |
| ) |
|
|
inherited |
Set all coordinates to the value c
.
Transform to point in homogene coordinate system.
Friends And Related Function Documentation
template<typename P , typename D >
Add a delta-point rhs
to a grid point lhs
.
- Parameters
-
[in] | p | A grid point. |
[in] | dp | A delta-point. |
The type of dp
has to compatible with the type of p
.
- Returns
- A point (temporary object).
\see mln::Gdpoint
template<typename P , typename D >
Shift a point by
a delta-point dp
.
- Parameters
-
[in,out] | p | The targeted point. |
[in] | dp | A delta-point. |
- Returns
- A reference to the point
p
once translated by dp
.
- Precondition
- The type of
dp
has to be compatible with the type of p
.
template<typename L , typename R >
L::delta operator- |
( |
const Gpoint< L > & |
lhs, |
|
|
const Gpoint< R > & |
rhs |
|
) |
| |
|
related |
Difference between a couple of grid point lhs
and rhs
.
- Parameters
-
[in] | lhs | A first grid point. |
[in] | rhs | A second grid point. |
- Warning
- There is no type promotion in Milena so the client has to make sure that both points are defined with the same type of coordinates.
- Precondition
- Both
lhs
and rhs
have to be defined on the same topology and with the same type of coordinates; otherwise this test does not compile.
- Postcondition
- The result,
dp
, is such as lhs
== rhs
+ dp
.
- Returns
- A delta point (temporary object).
\see mln::Gdpoint
template<typename P , typename D >
Shift a point by
the negate of a delta-point dp
.
- Parameters
-
[in,out] | p | The targeted point. |
[in] | dp | A delta-point. |
- Returns
- A reference to the point
p
once translated by - dp
.
- Precondition
- The type of
dp
has to be compatible with the type of p
.
template<typename P , typename D >
Divise a point by
a scalar s
.
- Parameters
-
[in,out] | p | The targeted point. |
[in] | dp | A scalar. |
- Returns
- A reference to the point
p
once divised by s
.
template<typename P >
std::ostream & operator<< |
( |
std::ostream & |
ostr, |
|
|
const Gpoint< P > & |
p |
|
) |
| |
|
related |
Print a grid point p
into the output stream ostr
.
- Parameters
-
[in,out] | ostr | An output stream. |
[in] | p | A grid point. |
- Returns
- The modified output stream
ostr
.
template<typename L , typename R >
Equality comparison between a couple of grid point lhs
and rhs
.
- Parameters
-
[in] | lhs | A first grid point. |
[in] | rhs | A second grid point. |
- Precondition
- Both
lhs
and rhs
have to be defined on the same topology; otherwise this test does not compile.
- Returns
- True if both grid points have the same coordinates, otherwise false.
Member Data Documentation
Origin point (all coordinates are 0).
Definition at line 168 of file point.hh.
Member Typedef Documentation
Coordinate associated type.
Definition at line 107 of file point.hh.
Delta associated type.
Definition at line 101 of file point.hh.
DPsite associated type.
Definition at line 104 of file point.hh.
Grid associated type.
Definition at line 98 of file point.hh.
Algebra hexagonal vector (hvec) associated type.
Definition at line 113 of file point.hh.
Algebra vector (vec) associated type.
Definition at line 110 of file point.hh.
Member Enumeration Documentation