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

bool contains (NumericType x, NumericType y) const
 Returns true if the point is inside this range. More...
 
 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...
 
bool operator!= (const GenericBounds< NumericType > &other) const
 
bool operator== (const GenericBounds< NumericType > &other) const
 comparison operator that requires all fields are equal More...
 
bool overlaps (const GenericBounds< NumericType > &other) const
 returns true if the two bounds overlap each other 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 62 of file bounds.h.

Constructor & Destructor Documentation

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

Constructor for an empty bounds.

Definition at line 68 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 80 of file bounds.h.

Member Function Documentation

template<typename NumericType>
bool nav_core2::GenericBounds< NumericType >::contains ( NumericType  x,
NumericType  y 
) const
inline

Returns true if the point is inside this range.

Definition at line 138 of file bounds.h.

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

Definition at line 185 of file bounds.h.

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

Definition at line 186 of file bounds.h.

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

Definition at line 183 of file bounds.h.

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

Definition at line 184 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 130 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 122 of file bounds.h.

template<typename NumericType>
bool nav_core2::GenericBounds< NumericType >::operator!= ( const GenericBounds< NumericType > &  other) const
inline

Definition at line 162 of file bounds.h.

template<typename NumericType>
bool nav_core2::GenericBounds< NumericType >::operator== ( const GenericBounds< NumericType > &  other) const
inline

comparison operator that requires all fields are equal

Definition at line 156 of file bounds.h.

template<typename NumericType>
bool nav_core2::GenericBounds< NumericType >::overlaps ( const GenericBounds< NumericType > &  other) const
inline

returns true if the two bounds overlap each other

Definition at line 146 of file bounds.h.

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

Reset the bounds to be empty.

Definition at line 86 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 170 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 95 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 110 of file bounds.h.

Member Data Documentation

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

Definition at line 189 of file bounds.h.

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

Definition at line 189 of file bounds.h.

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

Definition at line 189 of file bounds.h.

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

Definition at line 189 of file bounds.h.


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


nav_core2
Author(s):
autogenerated on Sun Jan 10 2021 04:08:27