Public Member Functions | Public Attributes
DiscretePoint2D Struct Reference

Defines a point with integer coordinates on a plane. More...

#include <geometry_utils.h>

List of all members.

Public Member Functions

 DiscretePoint2D (int x_coord, int y_coord)
double dist_sq (const DiscretePoint2D &pt) const
DiscretePoint2D operator+ (const DiscretePoint2D &p) const
 Operator of points summation by element-wise addition.
DiscretePoint2D operator- () const
 Returns additive inverse of the point.

Public Attributes

 y
 Coordinates of point.

Detailed Description

Defines a point with integer coordinates on a plane.

Definition at line 62 of file geometry_utils.h.


Constructor & Destructor Documentation

DiscretePoint2D::DiscretePoint2D ( int  x_coord,
int  y_coord 
) [inline]

Initializes a point in cartesian coordinates.

Parameters:
x_coord,y_coordCoordinates of a point on a plane.

Definition at line 69 of file geometry_utils.h.


Member Function Documentation

double DiscretePoint2D::dist_sq ( const DiscretePoint2D pt) const [inline]

Calculates distance from this point to a given one.

Parameters:
ptThe end point to calculate distance.
Returns:
The distance between this point and the end point.

Definition at line 89 of file geometry_utils.h.

DiscretePoint2D DiscretePoint2D::operator+ ( const DiscretePoint2D p) const [inline]

Operator of points summation by element-wise addition.

Definition at line 75 of file geometry_utils.h.

DiscretePoint2D DiscretePoint2D::operator- ( ) const [inline]

Returns additive inverse of the point.

Definition at line 80 of file geometry_utils.h.


Member Data Documentation

Coordinates of point.

Definition at line 70 of file geometry_utils.h.


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


tiny_slam
Author(s):
autogenerated on Thu Jun 6 2019 17:44:58