Savarese Software Research Corporation
spatial::rectangle_region< Point, i > Struct Template Reference

A rectangle_region implements the region concept for rectangular regions defined by a lower left-hand corner and an upper right-hand corner. More...

#include <rectangle_region.h>

List of all members.

Public Member Functions

 rectangle_region ()
 rectangle_region (const Point &lower, const Point &upper)
bool contains (const Point &point) const
 Returns true if a given point is contained within the region.

Static Public Member Functions

static bool contains (const Point &point, const Point &lower, const Point &upper)

Public Attributes

Point lower
Point upper

Detailed Description

template<typename Point, const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
struct spatial::rectangle_region< Point, i >

A rectangle_region implements the region concept for rectangular regions defined by a lower left-hand corner and an upper right-hand corner.

The region concept is not yet fully defined and may change in a future version. Currently, a region must define a bounding box consisting of two public member variables—lower and upper—which specify the lower left and upper right corners of the box. In addition, a public non-static member function must be defined with with the signature: bool contains(const Point &)

Region classes are intended to allow iteration over ranges within arbitrarily shaped regions without post-filtering a rectangular range, reducing the total number of comparisions. Such range searches can be performed with the kd_tree::begin<Region>(const Region &) and kd_tree<Region>::end() functions. rectangle_region is the default region type used by kd_tree for range searches.

Definition at line 52 of file rectangle_region.h.


Constructor & Destructor Documentation

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
spatial::rectangle_region< Point, i >::rectangle_region ( ) [inline]

Definition at line 56 of file rectangle_region.h.

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
spatial::rectangle_region< Point, i >::rectangle_region ( const Point &  lower,
const Point &  upper 
) [inline]

Definition at line 58 of file rectangle_region.h.


Member Function Documentation

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
static bool spatial::rectangle_region< Point, i >::contains ( const Point &  point,
const Point &  lower,
const Point &  upper 
) [inline, static]

Definition at line 64 of file rectangle_region.h.

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
bool spatial::rectangle_region< Point, i >::contains ( const Point &  point) const [inline]

Returns true if a given point is contained within the region.

The point must lie within or on the boundary defining the region.

Parameters:
pointThe point to test.
Returns:
True if a given point is contained within the region, false otherwise.

Definition at line 79 of file rectangle_region.h.


Member Data Documentation

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
Point spatial::rectangle_region< Point, i >::lower

Definition at line 53 of file rectangle_region.h.

template<typename Point , const unsigned int i = NS_TR1::tuple_size<Point>::value - 1>
Point spatial::rectangle_region< Point, i >::upper

Definition at line 53 of file rectangle_region.h.


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

Savarese Software Research Corporation
Copyright © 2003-2005 Daniel F. Savarese.
Copyright © 2006-2009 Savarese Software Research Corporation.