Represents a rectangle in n-dimensional space. More...
#include <SIFT/KDTree.H>
Public Member Functions | |
HyperRectangle (const uint dim) | |
Constructor; the HyperRectangle will be uninitialized. | |
HyperRectangle (const uint dim, const byte mini, const byte maxi) | |
Constructor with initial min and max values for all dimensions. | |
HyperRectangle (const HyperRectangle &other) | |
Copy constructor. | |
HyperRectangle | splitAt (const uint splitDim, const byte splitVal) |
Splits the rectangle at the specified dimension and value. | |
bool | isIn (const rutz::shared_ptr< Keypoint > &target) const |
Returns true if the target point is within this HR. | |
bool | isInReach (const rutz::shared_ptr< Keypoint > &target, const int sqdist) const |
Return true if any part of this HR is reachable from target. | |
int | distSq (const rutz::shared_ptr< Keypoint > &target) const |
Return the dist from nearest point within the HR to the target point. | |
Static Public Member Functions | |
static HyperRectangle | createUniverseRectangle (const uint dim) |
Creates an all-encompassing rectangle in the dimension specified. |
Represents a rectangle in n-dimensional space.
The Hyperrectangle has n dimensions which are assumed to each have byte type, as in the case in Keypoint.
Definition at line 47 of file KDTree.H.
HyperRectangle::HyperRectangle | ( | const uint | dim | ) | [inline] |
Constructor; the HyperRectangle will be uninitialized.
Definition at line 198 of file KDTree.H.
Referenced by createUniverseRectangle().
HyperRectangle::HyperRectangle | ( | const HyperRectangle & | other | ) | [inline] |
HyperRectangle HyperRectangle::createUniverseRectangle | ( | const uint | dim | ) | [inline, static] |
Creates an all-encompassing rectangle in the dimension specified.
Definition at line 215 of file KDTree.H.
References HyperRectangle().
int HyperRectangle::distSq | ( | const rutz::shared_ptr< Keypoint > & | target | ) | const [inline] |
Return the dist from nearest point within the HR to the target point.
Definition at line 250 of file KDTree.H.
Referenced by isInReach().
bool HyperRectangle::isIn | ( | const rutz::shared_ptr< Keypoint > & | target | ) | const [inline] |
bool HyperRectangle::isInReach | ( | const rutz::shared_ptr< Keypoint > & | target, | |
const int | sqdist | |||
) | const [inline] |
HyperRectangle HyperRectangle::splitAt | ( | const uint | splitDim, | |
const byte | splitVal | |||
) | [inline] |