public

Inheritance Graph

graph BT
	_Rect
	click _Rect "classGeometry_1_1__Rect"

Description

Two-dimensional rectangle.

^Y
|
|
|
o---> X

   --- width ----
   +------------+ |
   |            | |
   |            | height
   |            | |
   o------------+ |
(x, y)

Main

   
   
  _Rect()
   
  _Rect( value_t posX, value_t posY, value_t w, value_t h)
   
  _Rect(const vec2_t & pos, const vec2_t & size)
template< class other_t >  
  _Rect(const _Rect < other_t > & other)

Information

   
   
vec2_t getSize() const
   
vec2_t getMin() const
   
vec2_t getMax() const
   
value_t getX() const
   
value_t getMinX() const
   
value_t getMaxX() const
   
value_t getY() const
   
value_t getMinY() const
   
value_t getMaxY() const
   
value_t getWidth() const
   
value_t getHeight() const
   
value_t getArea() const
   
vec2_t getPosition() const
   
vec2_t getCenter() const
   
bool contains( value_t _x, value_t _y) const
   
bool contains(const _Rect < value_t > & rect) const
   
bool contains(const vec2_t & vec) const
   
bool isInvalid() const
   
bool isValid() const
   
bool intersects(const _Rect < value_t > & rect) const
   
vec2_t getCorner(const rectCorner_t corner) const
   
vec2_t getClosestPoint(const vec2_t & pos) const

Read-Write Access

   
   
value_t & _accessX()
   
value_t & _accessY()
   
value_t & _accessWidth()
   
value_t & _accessHeight()

Modification

   
   
void setPosition( value_t _x, value_t _y)
   
void setPosition(const vec2_t & vec)
   
void setX( value_t _x)
   
void setY( value_t _y)
   
void setWidth( value_t w)
   
void setHeight( value_t h)
   
void setSize( value_t w, value_t h)
   
void setSize(const vec2_t & s)
   
void invalidate()
   
_Rect < value_t > & moveRel( value_t _x, value_t _y)
   
_Rect < value_t > & moveRel(const vec2_t & vec)
   
_Rect < value_t > & operator+=(const vec2_t & vec)
Move by given vector.
   
_Rect < value_t > & operator-=(const vec2_t & vec)
Move by given vector in negative direction.
   
_Rect < value_t > & changeSize( value_t dw, value_t dh)
Change size around upper left corner.
   
_Rect < value_t > & changeSize(const vec2_t & vec)
Change size around upper left corner.
   
_Rect < value_t > & changeSizeCentered( value_t dw, value_t dh)
Change size around center.
   
_Rect < value_t > & changeSizeCentered(const vec2_t & vec)
Change size around center.
   
_Rect < value_t > & include(const vec2_t & vec)
   
_Rect < value_t > & include( value_t px, value_t py)
   
_Rect < value_t > & include(const _Rect < value_t > & rect)
   
_Rect < value_t > & clipBy(const _Rect < value_t > & rect)

Creation

   
   
const _Rect < value_t > operator+(const vec2_t & vec) const
Create Rect by moving this by given vector.
   
const _Rect < value_t > operator-(const vec2_t & vec) const
Create Rect by moving this by given vector in negative direction.

Comparators

   
   
bool operator==(const _Rect < value_t > & rect) const
   
bool operator!=(const _Rect < value_t > & rect) const

Serialization

 
 
 

Public Types

   
   
typedef T_ value_t
   
typedef _Vec2 < value_t > vec2_t

Documentation

function
Geometry::_Rect::_Rect

public inline
   
   
_Rect( )

Defined in Geometry/Rect.h:52


function
Geometry::_Rect::_Rect

public inline
     
     
_Rect( value_t posX,
  value_t posY,
  value_t w,
  value_t h
)    

Defined in Geometry/Rect.h:58


function
Geometry::_Rect::_Rect

public inline
     
     
_Rect( const vec2_t & pos,
  const vec2_t & size
)    

Defined in Geometry/Rect.h:60


function
Geometry::_Rect::_Rect

public inline explicit
     
template< class other_t >    
_Rect( const _Rect < other_t > & other )

Defined in Geometry/Rect.h:63


function
Geometry::_Rect::getSize

public const inline
   
   
vec2_t getSize( ) const

Defined in Geometry/Rect.h:75


function
Geometry::_Rect::getMin

public const inline
   
   
vec2_t getMin( ) const

Defined in Geometry/Rect.h:78


function
Geometry::_Rect::getMax

public const inline
   
   
vec2_t getMax( ) const

Defined in Geometry/Rect.h:81


function
Geometry::_Rect::getX

public const inline
   
   
value_t getX( ) const

Defined in Geometry/Rect.h:84


function
Geometry::_Rect::getMinX

public const inline
   
   
value_t getMinX( ) const

Defined in Geometry/Rect.h:87


function
Geometry::_Rect::getMaxX

public const inline
   
   
value_t getMaxX( ) const

Defined in Geometry/Rect.h:90


function
Geometry::_Rect::getY

public const inline
   
   
value_t getY( ) const

Defined in Geometry/Rect.h:93


function
Geometry::_Rect::getMinY

public const inline
   
   
value_t getMinY( ) const

Defined in Geometry/Rect.h:96


function
Geometry::_Rect::getMaxY

public const inline
   
   
value_t getMaxY( ) const

Defined in Geometry/Rect.h:99


function
Geometry::_Rect::getWidth

public const inline
   
   
value_t getWidth( ) const

Defined in Geometry/Rect.h:102


function
Geometry::_Rect::getHeight

public const inline
   
   
value_t getHeight( ) const

Defined in Geometry/Rect.h:105


function
Geometry::_Rect::getArea

public const inline
   
   
value_t getArea( ) const

Defined in Geometry/Rect.h:108


function
Geometry::_Rect::getPosition

public const inline
   
   
vec2_t getPosition( ) const

Defined in Geometry/Rect.h:111


function
Geometry::_Rect::getCenter

public const inline
   
   
vec2_t getCenter( ) const

Defined in Geometry/Rect.h:114


function
Geometry::_Rect::contains

public const inline
     
     
bool contains( value_t _x,
  value_t _y
) const    

Defined in Geometry/Rect.h:118


function
Geometry::_Rect::contains

public const inline
     
     
bool contains( const _Rect < value_t > & rect ) const

Defined in Geometry/Rect.h:121


function
Geometry::_Rect::contains

public const inline
     
     
bool contains( const vec2_t & vec ) const

Defined in Geometry/Rect.h:124


function
Geometry::_Rect::isInvalid

public const inline
   
   
bool isInvalid( ) const

Defined in Geometry/Rect.h:127


function
Geometry::_Rect::isValid

public const inline
   
   
bool isValid( ) const

Defined in Geometry/Rect.h:130


function
Geometry::_Rect::intersects

public const inline
     
     
bool intersects( const _Rect < value_t > & rect ) const

Defined in Geometry/Rect.h:133


function
Geometry::_Rect::getCorner

public const inline
     
     
vec2_t getCorner( const rectCorner_t corner ) const

Defined in Geometry/Rect.h:137


function
Geometry::_Rect::getClosestPoint

public const inline
     
     
vec2_t getClosestPoint( const vec2_t & pos ) const

Defined in Geometry/Rect.h:141


function
Geometry::_Rect::_accessX

public inline
   
   
value_t & _accessX( )

Defined in Geometry/Rect.h:163


function
Geometry::_Rect::_accessY

public inline
   
   
value_t & _accessY( )

Defined in Geometry/Rect.h:166


function
Geometry::_Rect::_accessWidth

public inline
   
   
value_t & _accessWidth( )

Defined in Geometry/Rect.h:169


function
Geometry::_Rect::_accessHeight

public inline
   
   
value_t & _accessHeight( )

Defined in Geometry/Rect.h:172


function
Geometry::_Rect::setPosition

public inline
     
     
void setPosition( value_t _x,
  value_t _y
)    

Defined in Geometry/Rect.h:181


function
Geometry::_Rect::setPosition

public inline
     
     
void setPosition( const vec2_t & vec )

Defined in Geometry/Rect.h:185


function
Geometry::_Rect::setX

public inline
     
     
void setX( value_t _x )

Defined in Geometry/Rect.h:189


function
Geometry::_Rect::setY

public inline
     
     
void setY( value_t _y )

Defined in Geometry/Rect.h:192


function
Geometry::_Rect::setWidth

public inline
     
     
void setWidth( value_t w )

Defined in Geometry/Rect.h:195


function
Geometry::_Rect::setHeight

public inline
     
     
void setHeight( value_t h )

Defined in Geometry/Rect.h:198


function
Geometry::_Rect::setSize

public inline
     
     
void setSize( value_t w,
  value_t h
)    

Defined in Geometry/Rect.h:201


function
Geometry::_Rect::setSize

public inline
     
     
void setSize( const vec2_t & s )

Defined in Geometry/Rect.h:205


function
Geometry::_Rect::invalidate

public inline
   
   
void invalidate( )

Defined in Geometry/Rect.h:210


function
Geometry::_Rect::moveRel

public inline
     
     
_Rect < value_t > & moveRel( value_t _x,
  value_t _y
)    

Defined in Geometry/Rect.h:215


function
Geometry::_Rect::moveRel

public inline
     
     
_Rect < value_t > & moveRel( const vec2_t & vec )

Defined in Geometry/Rect.h:220


function
Geometry::_Rect::operator+=

public inline
     
     
_Rect < value_t > & operator+=( const vec2_t & vec )

Move by given vector.

Defined in Geometry/Rect.h:226


function
Geometry::_Rect::operator-=

public inline
     
     
_Rect < value_t > & operator-=( const vec2_t & vec )

Move by given vector in negative direction.

Defined in Geometry/Rect.h:230


function
Geometry::_Rect::changeSize

public inline
     
     
_Rect < value_t > & changeSize( value_t dw,
  value_t dh
)    

Change size around upper left corner.

Defined in Geometry/Rect.h:234


function
Geometry::_Rect::changeSize

public inline
     
     
_Rect < value_t > & changeSize( const vec2_t & vec )

Change size around upper left corner.

Defined in Geometry/Rect.h:240


function
Geometry::_Rect::changeSizeCentered

public inline
     
     
_Rect < value_t > & changeSizeCentered( value_t dw,
  value_t dh
)    

Change size around center.

Defined in Geometry/Rect.h:244


function
Geometry::_Rect::changeSizeCentered

public inline
     
     
_Rect < value_t > & changeSizeCentered( const vec2_t & vec )

Change size around center.

Defined in Geometry/Rect.h:250


function
Geometry::_Rect::include

public inline
     
     
_Rect < value_t > & include( const vec2_t & vec )

Defined in Geometry/Rect.h:253


function
Geometry::_Rect::include

public inline
     
     
_Rect < value_t > & include( value_t px,
  value_t py
)    

Defined in Geometry/Rect.h:256


function
Geometry::_Rect::include

public inline
     
     
_Rect < value_t > & include( const _Rect < value_t > & rect )

Defined in Geometry/Rect.h:278


function
Geometry::_Rect::clipBy

public inline
     
     
_Rect < value_t > & clipBy( const _Rect < value_t > & rect )

Defined in Geometry/Rect.h:290


function
Geometry::_Rect::operator+

public const inline
     
     
const _Rect < value_t > operator+( const vec2_t & vec ) const

Create Rect by moving this by given vector.

Defined in Geometry/Rect.h:318


function
Geometry::_Rect::operator-

public const inline
     
     
const _Rect < value_t > operator-( const vec2_t & vec ) const

Create Rect by moving this by given vector in negative direction.

Defined in Geometry/Rect.h:322


function
Geometry::_Rect::operator==

public const inline
     
     
bool operator==( const _Rect < value_t > & rect ) const

Defined in Geometry/Rect.h:331


function
Geometry::_Rect::operator!=

public const inline
     
     
bool operator!=( const _Rect < value_t > & rect ) const

Defined in Geometry/Rect.h:334


typedef
Geometry::_Rect::value_t

public
 
 
typedef T_ value_t

Defined in Geometry/Rect.h:45


typedef
Geometry::_Rect::vec2_t

public
 
 
typedef _Vec2 < value_t > vec2_t

Defined in Geometry/Rect.h:46