Public Member Functions | Protected Attributes | List of all members
nav_core2::GenericBounds< NumericType > Class Template Reference

Templatized class that represents a two dimensional bounds with ranges [min_x, max_x] [min_y, max_y] inclusive. More...

#include <bounds.h>

Public Member Functions

 GenericBounds ()
 Constructor for an empty bounds. More...
 
 GenericBounds (NumericType x0, NumericType y0, NumericType x1, NumericType y1)
 Constructor for a non-empty initial bounds. More...
 
NumericType getMaxX () const
 
NumericType getMaxY () const
 
NumericType getMinX () const
 
NumericType getMinY () const
 
bool isEmpty () const
 Returns true if the range is empty. More...
 
void merge (const GenericBounds< NumericType > &other)
 Update the bounds to include the entirety of another bounds object. More...
 
void reset ()
 Reset the bounds to be empty. More...
 
std::string toString () const
 Returns a string representation of the bounds. More...
 
void touch (NumericType x, NumericType y)
 Update the bounds to include the point (x, y) More...
 
void update (NumericType x0, NumericType y0, NumericType x1, NumericType y1)
 Update the bounds to include points (x0, y0) and (x1, y1) More...
 

Protected Attributes

NumericType max_x_
 
NumericType max_y_
 
NumericType min_x_
 
NumericType min_y_
 

Detailed Description

template<typename NumericType>
class nav_core2::GenericBounds< NumericType >

Templatized class that represents a two dimensional bounds with ranges [min_x, max_x] [min_y, max_y] inclusive.

Definition at line 49 of file bounds.h.

Constructor & Destructor Documentation

template<typename NumericType>
nav_core2::GenericBounds< NumericType >::GenericBounds ( )
inline

Constructor for an empty bounds.

Definition at line 55 of file bounds.h.

template<typename NumericType>
nav_core2::GenericBounds< NumericType >::GenericBounds ( NumericType  x0,
NumericType  y0,
NumericType  x1,
NumericType  y1 
)
inline

Constructor for a non-empty initial bounds.

Parameters
x0Initial min x
y0Initial min y
x1Initial max x
y1Initial max y

Definition at line 67 of file bounds.h.

Member Function Documentation

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::getMaxX ( ) const
inline

Definition at line 140 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::getMaxY ( ) const
inline

Definition at line 141 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::getMinX ( ) const
inline

Definition at line 138 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::getMinY ( ) const
inline

Definition at line 139 of file bounds.h.

template<typename NumericType>
bool nav_core2::GenericBounds< NumericType >::isEmpty ( ) const
inline

Returns true if the range is empty.

Definition at line 117 of file bounds.h.

template<typename NumericType>
void nav_core2::GenericBounds< NumericType >::merge ( const GenericBounds< NumericType > &  other)
inline

Update the bounds to include the entirety of another bounds object.

Parameters
otherAnother bounds object

Definition at line 109 of file bounds.h.

template<typename NumericType>
void nav_core2::GenericBounds< NumericType >::reset ( )
inline

Reset the bounds to be empty.

Definition at line 73 of file bounds.h.

template<typename NumericType>
std::string nav_core2::GenericBounds< NumericType >::toString ( ) const
inline

Returns a string representation of the bounds.

Definition at line 125 of file bounds.h.

template<typename NumericType>
void nav_core2::GenericBounds< NumericType >::touch ( NumericType  x,
NumericType  y 
)
inline

Update the bounds to include the point (x, y)

Definition at line 82 of file bounds.h.

template<typename NumericType>
void nav_core2::GenericBounds< NumericType >::update ( NumericType  x0,
NumericType  y0,
NumericType  x1,
NumericType  y1 
)
inline

Update the bounds to include points (x0, y0) and (x1, y1)

Parameters
x0smaller of two x values
y0smaller of two y values
x1larger of two x values
y1larger of two y values

Definition at line 97 of file bounds.h.

Member Data Documentation

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::max_x_
protected

Definition at line 144 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::max_y_
protected

Definition at line 144 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::min_x_
protected

Definition at line 144 of file bounds.h.

template<typename NumericType>
NumericType nav_core2::GenericBounds< NumericType >::min_y_
protected

Definition at line 144 of file bounds.h.


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


nav_core2
Author(s):
autogenerated on Wed Jun 26 2019 20:06:06