Public Member Functions | Public Attributes
Rectangle Struct Reference

Defines an axis-aligned rectangle. More...

#include <geometry_utils.h>

List of all members.

Public Member Functions

double area () const
bool does_contain (double x, double y) const
 Rectangle ()
 Creates a rectangle with zero area in point (0,0).
 Rectangle (double b, double t, double l, double r)

Public Attributes

double bot
 The bottom of a rectangle.
double left
 The left side of a rectangle.
double right
 The right side of a rectangle.
double top
 The top of a rectangle.

Detailed Description

Defines an axis-aligned rectangle.

Definition at line 20 of file geometry_utils.h.


Constructor & Destructor Documentation

Rectangle::Rectangle ( ) [inline]

Creates a rectangle with zero area in point (0,0).

Definition at line 23 of file geometry_utils.h.

Rectangle::Rectangle ( double  b,
double  t,
double  l,
double  r 
) [inline]

Creates a rectangle where all contained points are bounded in limits l < x < r, b < y < t.

Parameters:
bThe bottom of a rectangle.
tThe top of a rectangle.
lThe left side of a rectangle.
rThe right side of a rectangle.

Definition at line 33 of file geometry_utils.h.


Member Function Documentation

double Rectangle::area ( ) const [inline]

Returns an area of a rectangle.

Returns:
Value of an area.

Definition at line 49 of file geometry_utils.h.

bool Rectangle::does_contain ( double  x,
double  y 
) const [inline]

Tests whether a rectangle contains a point.

Parameters:
x,yCoordinates of a target point.
Returns:
True if the rectangle contains a point and False otherwise.

Definition at line 41 of file geometry_utils.h.


Member Data Documentation

The bottom of a rectangle.

Definition at line 53 of file geometry_utils.h.

The left side of a rectangle.

Definition at line 53 of file geometry_utils.h.

The right side of a rectangle.

Definition at line 53 of file geometry_utils.h.

The top of a rectangle.

Definition at line 53 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