Class representing a lattice point.
|
|
constexpr | Point2d () |
| | Default constructor for Point2d creating a lattice point at the origin.
|
| constexpr | Point2d (int x, int y) |
| constexpr | Point2d (Eigen::Vector2i vector) |
|
constexpr int | x () const |
| | Gets the X coordinate of the point.
|
|
constexpr void | set_x (int val) |
| | Sets the x coordinate.
|
|
constexpr int | y () const |
| | Gets the Y coordinate of the point.
|
|
constexpr void | set_y (int val) |
| | Sets the y coordinate.
|
|
constexpr Eigen::Vector2i | as_vector () const |
| | Gets the point as an Eigen::Vector2i.
|
| constexpr Eigen::Vector2d | as_vector (Eigen::Vector2d X, Eigen::Vector2d Y) const |
|
constexpr int | manhattan_distance (Point2d other) const |
| | Calculates the manhattan distance between two points.
|
|
constexpr int | manhattan_norm () const |
| | Calculates the manhattan distance away from the origin.
|
|
constexpr double | distance (Point2d other) const |
| | Calculates the distance (as a continuous number) between two points.
|
|
constexpr double | norm () const |
| | Calculates the distance (as a continuous number) away from the origin.
|
| constexpr Point2d | inverse () const |
| constexpr int | dot (Point2d other) const |
| constexpr Point2d | operator+ (Point2d other) const |
|
constexpr Point2d & | operator+= (Point2d other) |
| | Adds another point to this point.
|
| constexpr Point2d | operator- (Point2d other) const |
|
constexpr Point2d & | operator-= (Point2d other) |
| | Subtracts another point from this point.
|
| constexpr Point2d | operator- () const |
| constexpr Point2d | operator* (int scalar) const |
| constexpr int | operator* (Point2d other) const |
|
constexpr Point2d & | operator*= (int scalar) |
| | Multiplies this point by a scalar.
|
| constexpr bool | operator== (Point2d other) const |