OpenLexocad  27.1
Geom::Rect Class Reference

#include <Rect.h>

Public Member Functions

 Rect ()
 
 Rect (const Pnt2d &bottomleft, const Pnt2d &topright)
 
 Rect (double left, double bottom, double width, double height)
 
bool isNull (void) const
 
bool isEmpty (void) const
 
bool isValid (void) const
 
void setNull (void)
 
void makeSingular (void)
 
void getRect (double *x, double *y, double *w, double *h) const
 
double left (void) const
 
double right (void) const
 
double bottom (void) const
 
double top (void) const
 
double width (void) const
 
double height (void) const
 
Geom::Pnt2d bottomLeft (void) const
 
Geom::Pnt2d bottomRight (void) const
 
Geom::Pnt2d topLeft (void) const
 
Geom::Pnt2d topRight (void) const
 
Geom::Pnt2d center (void) const
 
void setLeft (double left)
 
void setRight (double right)
 
void setBottom (double bottom)
 
void setTop (double top)
 
void setWidth (double w)
 
void setHeight (double h)
 
void setSize (double width, double height)
 
void moveCenter (const Pnt &p)
 
void moveCenter (double x, double y)
 
void grow (double value)
 
void shrink (double value)
 
void translate (double dx, double dy)
 
Rect operator| (const Rect &r) const
 
Rectoperator|= (const Rect &r)
 
void unite (const Rect &t)
 
Rect united (const Rect &r) const
 
Rect normalized (void) const
 
bool contains (const Geom::Pnt &point) const
 
bool intersects (const Geom::Rect &r) const
 

Detailed Description

An axis-aligned 2D rectangle

Constructor & Destructor Documentation

◆ Rect() [1/3]

Geom::Rect::Rect ( )

◆ Rect() [2/3]

Geom::Rect::Rect ( const Pnt2d bottomleft,
const Pnt2d topright 
)

◆ Rect() [3/3]

Geom::Rect::Rect ( double  left,
double  bottom,
double  width,
double  height 
)

Member Function Documentation

◆ bottom()

double Geom::Rect::bottom ( void  ) const
inline

◆ bottomLeft()

Geom::Pnt2d Geom::Rect::bottomLeft ( void  ) const
inline

◆ bottomRight()

Geom::Pnt2d Geom::Rect::bottomRight ( void  ) const
inline

◆ center()

Geom::Pnt2d Geom::Rect::center ( void  ) const
inline

◆ contains()

bool Geom::Rect::contains ( const Geom::Pnt point) const

◆ getRect()

void Geom::Rect::getRect ( double *  x,
double *  y,
double *  w,
double *  h 
) const

◆ grow()

void Geom::Rect::grow ( double  value)

◆ height()

double Geom::Rect::height ( void  ) const
inline

◆ intersects()

bool Geom::Rect::intersects ( const Geom::Rect r) const

◆ isEmpty()

bool Geom::Rect::isEmpty ( void  ) const

◆ isNull()

bool Geom::Rect::isNull ( void  ) const

◆ isValid()

bool Geom::Rect::isValid ( void  ) const

◆ left()

double Geom::Rect::left ( void  ) const
inline

◆ makeSingular()

void Geom::Rect::makeSingular ( void  )

◆ moveCenter() [1/2]

void Geom::Rect::moveCenter ( const Pnt p)

◆ moveCenter() [2/2]

void Geom::Rect::moveCenter ( double  x,
double  y 
)

◆ normalized()

Rect Geom::Rect::normalized ( void  ) const

◆ operator|()

Rect Geom::Rect::operator| ( const Rect r) const

◆ operator|=()

Rect& Geom::Rect::operator|= ( const Rect r)

◆ right()

double Geom::Rect::right ( void  ) const
inline

◆ setBottom()

void Geom::Rect::setBottom ( double  bottom)

◆ setHeight()

void Geom::Rect::setHeight ( double  h)
inline

◆ setLeft()

void Geom::Rect::setLeft ( double  left)

◆ setNull()

void Geom::Rect::setNull ( void  )

◆ setRight()

void Geom::Rect::setRight ( double  right)

◆ setSize()

void Geom::Rect::setSize ( double  width,
double  height 
)

◆ setTop()

void Geom::Rect::setTop ( double  top)

◆ setWidth()

void Geom::Rect::setWidth ( double  w)
inline

◆ shrink()

void Geom::Rect::shrink ( double  value)

◆ top()

double Geom::Rect::top ( void  ) const
inline

◆ topLeft()

Geom::Pnt2d Geom::Rect::topLeft ( void  ) const
inline

◆ topRight()

Geom::Pnt2d Geom::Rect::topRight ( void  ) const
inline

◆ translate()

void Geom::Rect::translate ( double  dx,
double  dy 
)

◆ unite()

void Geom::Rect::unite ( const Rect t)

◆ united()

Rect Geom::Rect::united ( const Rect r) const

◆ width()

double Geom::Rect::width ( void  ) const
inline

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