Public Member Functions | Protected Attributes
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>

List of all members.

Public Member Functions

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

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:09:31