Public Member Functions | Public Attributes | List of all members
Rectangle Struct Reference

Defines an axis-aligned rectangle. More...

#include <geometry_utils.h>

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). More...
 
 Rectangle (double b, double t, double l, double r)
 

Public Attributes

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

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

double Rectangle::bot

The bottom of a rectangle.

Definition at line 53 of file geometry_utils.h.

double Rectangle::left

The left side of a rectangle.

Definition at line 53 of file geometry_utils.h.

double Rectangle::right

The right side of a rectangle.

Definition at line 53 of file geometry_utils.h.

double Rectangle::top

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 Mon Jun 10 2019 15:30:57