Absolute coordinates along X and Y axis.
More...
Absolute coordinates along X and Y axis.
Definition at line 21 of file Coords.hpp.
#include <Coords.hpp>
|
| | Coords (double x=0.0, double y=0.0) |
| | Constructor. More...
|
| |
|
| Coords (const PB_Coords &coords) |
| | Constructor from Protobuf class.
|
| |
|
double | x (void) const |
| | Return X coordinate.
|
| |
|
double | y (void) const |
| | Return Y coordinate.
|
| |
| void | set_x (double x) |
| | Set X coordinate. More...
|
| |
| void | set_y (double y) |
| | Set Y coordinate. More...
|
| |
| double | distance (const Coords &dest) const |
| | Compute the distance the destination point. More...
|
| |
| bool | on_segment (const Coords &a, const Coords &b) const |
| | Check if this point is placed on a segment defined by two points A,B. More...
|
| |
| bool | operator== (const Coords other) const |
| | Check if this point is equal to another. More...
|
| |
| void | pb_copy (PB_Coords &coords) const |
| | Copy data to Protobuf message. More...
|
| |
|
|
double | x_ |
| | x-position
|
| |
|
double | y_ |
| | y-position
|
| |
◆ Coords()
| cogip::cogip_defs::Coords::Coords |
( |
double |
x = 0.0, |
|
|
double |
y = 0.0 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| [in] | x | [in] X coordinate |
| [in] | y | [in] Y coordinate |
Definition at line 24 of file Coords.hpp.
◆ distance()
| double cogip::cogip_defs::Coords::distance |
( |
const Coords & |
dest | ) |
const |
Compute the distance the destination point.
- Parameters
-
◆ on_segment()
| bool cogip::cogip_defs::Coords::on_segment |
( |
const Coords & |
a, |
|
|
const Coords & |
b |
|
) |
| const |
Check if this point is placed on a segment defined by two points A,B.
- Returns
- true if on [AB], false otherwise
- Parameters
-
| [in] | a | [in] point A |
| [in] | b | [in] point A |
◆ operator==()
| bool cogip::cogip_defs::Coords::operator== |
( |
const Coords |
other | ) |
const |
|
inline |
Check if this point is equal to another.
- Returns
- true if points are equal, false otherwise
- Parameters
-
| [in] | other | [in] point to compare |
Definition at line 62 of file Coords.hpp.
◆ pb_copy()
| void cogip::cogip_defs::Coords::pb_copy |
( |
PB_Coords & |
coords | ) |
const |
|
inline |
Copy data to Protobuf message.
- Parameters
-
| [out] | coords | [out] Protobuf message to fill |
Definition at line 67 of file Coords.hpp.
◆ set_x()
| void cogip::cogip_defs::Coords::set_x |
( |
double |
x | ) |
|
|
inline |
Set X coordinate.
- Parameters
-
| [in] | x | [in] new X coordinate |
Definition at line 39 of file Coords.hpp.
◆ set_y()
| void cogip::cogip_defs::Coords::set_y |
( |
double |
y | ) |
|
|
inline |
Set Y coordinate.
- Parameters
-
| [in] | y | [in] new Y coordinate |
Definition at line 44 of file Coords.hpp.
The documentation for this class was generated from the following file: