Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Rectangle Class Reference

#include <point.H>

Collaboration diagram for Rectangle:
[legend]

Public Member Functions

const Geom_Numberget_xmin () const
 
const Geom_Numberget_ymin () const
 
const Geom_Numberget_xmax () const
 
const Geom_Numberget_ymax () const
 
 Rectangle ()
 
 Rectangle (const Geom_Number &__xmin, const Geom_Number &__ymin, const Geom_Number &__xmax, const Geom_Number &__ymax)
 
void set_rect (const Geom_Number &__xmin, const Geom_Number &__ymin, const Geom_Number &__xmax, const Geom_Number &__ymax)
 
Geom_Number width () const
 
Geom_Number height () const
 
bool intersects (const Rectangle &that) const
 
Geom_Number distance_squared_to (const Point &p) const
 
Geom_Number distance_to (const Point &p) const
 
bool contains (const Point &p) const
 

Private Attributes

Geom_Number xmin
 
Geom_Number ymin
 
Geom_Number xmax
 
Geom_Number ymax
 

Detailed Description

Definition at line 997 of file point.H.

Constructor & Destructor Documentation

◆ Rectangle() [1/2]

Rectangle::Rectangle ( )
inline

Definition at line 1011 of file point.H.

◆ Rectangle() [2/2]

Rectangle::Rectangle ( const Geom_Number __xmin,
const Geom_Number __ymin,
const Geom_Number __xmax,
const Geom_Number __ymax 
)
inline

Definition at line 1016 of file point.H.

References ah_range_error_if, xmax, xmin, ymax, and ymin.

Member Function Documentation

◆ contains()

bool Rectangle::contains ( const Point p) const
inline

Definition at line 1069 of file point.H.

References Point::get_x(), Point::get_y(), xmax, xmin, ymax, and ymin.

Referenced by K2Tree< T >::range(), and TEST().

◆ distance_squared_to()

Geom_Number Rectangle::distance_squared_to ( const Point p) const
inline

Definition at line 1046 of file point.H.

References Point::get_x(), Point::get_y(), xmax, xmin, ymax, and ymin.

Referenced by K2Tree< T >::bu_nearest(), distance_to(), and K2Tree< T >::lr_nearest().

◆ distance_to()

Geom_Number Rectangle::distance_to ( const Point p) const
inline

Definition at line 1063 of file point.H.

References distance_squared_to(), and sqrt().

◆ get_xmax()

const Geom_Number & Rectangle::get_xmax ( ) const
inline

Definition at line 1007 of file point.H.

References xmax.

Referenced by K2Tree< T >::Node::xmax().

◆ get_xmin()

const Geom_Number & Rectangle::get_xmin ( ) const
inline

Definition at line 1003 of file point.H.

References xmin.

Referenced by K2Tree< T >::Node::xmin().

◆ get_ymax()

const Geom_Number & Rectangle::get_ymax ( ) const
inline

Definition at line 1009 of file point.H.

References ymax.

Referenced by K2Tree< T >::Node::ymax().

◆ get_ymin()

const Geom_Number & Rectangle::get_ymin ( ) const
inline

Definition at line 1005 of file point.H.

References ymin.

Referenced by K2Tree< T >::Node::ymin().

◆ height()

Geom_Number Rectangle::height ( ) const
inline

Definition at line 1037 of file point.H.

References ymax, and ymin.

◆ intersects()

bool Rectangle::intersects ( const Rectangle that) const
inline

Definition at line 1040 of file point.H.

References xmax, xmin, ymax, and ymin.

Referenced by K2Tree< T >::range().

◆ set_rect()

void Rectangle::set_rect ( const Geom_Number __xmin,
const Geom_Number __ymin,
const Geom_Number __xmax,
const Geom_Number __ymax 
)
inline

Definition at line 1023 of file point.H.

References ah_range_error_if, xmax, xmin, ymax, and ymin.

Referenced by K2Tree< T >::Node::set_rect(), and K2Tree< T >::Node::set_rect().

◆ width()

Geom_Number Rectangle::width ( ) const
inline

Definition at line 1035 of file point.H.

References xmax, and xmin.

Member Data Documentation

◆ xmax

Geom_Number Rectangle::xmax
private

Definition at line 1000 of file point.H.

Referenced by Rectangle(), contains(), distance_squared_to(), get_xmax(), intersects(), set_rect(), and width().

◆ xmin

Geom_Number Rectangle::xmin
private

Definition at line 999 of file point.H.

Referenced by Rectangle(), contains(), distance_squared_to(), get_xmin(), intersects(), set_rect(), and width().

◆ ymax

Geom_Number Rectangle::ymax
private

Definition at line 1000 of file point.H.

Referenced by Rectangle(), contains(), distance_squared_to(), get_ymax(), height(), intersects(), and set_rect().

◆ ymin

Geom_Number Rectangle::ymin
private

Definition at line 999 of file point.H.

Referenced by Rectangle(), contains(), distance_squared_to(), get_ymin(), height(), intersects(), and set_rect().


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