# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Attributes

# vl::Rect< T > Class Template Reference

Implements the common functions of RectI and RectF. More...

`#include <Rect.hpp>`

List of all members.

## Public Member Functions

| Rect (const Rect &other)
| Rect ()
| Rect (T x, T y, T width, T height)
T | x () const
T | y () const
T | width () const
T | height () const
T | bottom () const
T | left () const
T | top () const
T | right () const
void | setX (T x)
void | setY (T y)
void | setWidth (T w)
void | setHeight (T h)
bool | isNull () const
bool | isPoint () const
Rect | intersected (const Rect &other) const
Rect | united (const Rect &other) const
bool | operator< (const Rect &other) const
| Defines a sort of lexicographic sorting that make possible the use of the Rect class with STL containers like std::set, std::map etc.

## Protected Attributes

T | mX
T | mY
T | mWidth
T | mHeight

## Detailed Description

### template<typename T>
class vl::Rect< T >

Implements the common functions of RectI and RectF.

Definition at line 43 of file Rect.hpp.

## Constructor & Destructor Documentation

template<typename T>

vl::Rect< T >::Rect | ( | const Rect< T > & | other ) | `[inline]`

Definition at line 46 of file Rect.hpp.

template<typename T>

vl::Rect< T >::Rect | ( | ) | `[inline]`

Definition at line 53 of file Rect.hpp.

Referenced by vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

vl::Rect< T >::Rect | ( | T | x,
|  | T | y,
|  | T | width,
|  | T | height
| ) |  | `[inline]`

Definition at line 61 of file Rect.hpp.

## Member Function Documentation

template<typename T>

T vl::Rect< T >::x | ( | ) | const`[inline]`

Definition at line 69 of file Rect.hpp.

Referenced by vl::Image::copySubImage(), vl::Scissor::enable(), vl::RectF::operator=(), vl::RectI::operator=(), vl::VectorGraphics::pushScissor(), vl::Rect< int >::Rect(), and vl::Rect< int >::setX().

template<typename T>

T vl::Rect< T >::y | ( | ) | const`[inline]`

Definition at line 70 of file Rect.hpp.

Referenced by vl::Image::copySubImage(), vl::Scissor::enable(), vl::RectF::operator=(), vl::RectI::operator=(), vl::VectorGraphics::pushScissor(), vl::Rect< int >::Rect(), and vl::Rect< int >::setY().

template<typename T>

T vl::Rect< T >::width | ( | ) | const`[inline]`

Definition at line 71 of file Rect.hpp.

Referenced by vl::Image::copySubImage(), vl::Scissor::enable(), vl::Rect< int >::isNull(), vl::Rect< int >::isPoint(), vl::RectF::operator=(), vl::RectI::operator=(), vl::VectorGraphics::pushScissor(), and vl::Rect< int >::Rect().

template<typename T>

T vl::Rect< T >::height | ( | ) | const`[inline]`

Definition at line 72 of file Rect.hpp.

Referenced by vl::Image::copySubImage(), vl::Scissor::enable(), vl::Rect< int >::isNull(), vl::Rect< int >::isPoint(), vl::RectF::operator=(), vl::RectI::operator=(), vl::VectorGraphics::pushScissor(), and vl::Rect< int >::Rect().

template<typename T>

T vl::Rect< T >::bottom | ( | ) | const`[inline]`

Definition at line 73 of file Rect.hpp.

Referenced by vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

T vl::Rect< T >::left | ( | ) | const`[inline]`

Definition at line 74 of file Rect.hpp.

Referenced by vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

T vl::Rect< T >::top | ( | ) | const`[inline]`

Reimplemented in vl::RectI, and vl::RectF.

Definition at line 75 of file Rect.hpp.

Referenced by vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

T vl::Rect< T >::right | ( | ) | const`[inline]`

Reimplemented in vl::RectI, and vl::RectF.

Definition at line 76 of file Rect.hpp.

Referenced by vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

void vl::Rect< T >::setX | ( | T | x ) | `[inline]`

Definition at line 78 of file Rect.hpp.

template<typename T>

void vl::Rect< T >::setY | ( | T | y ) | `[inline]`

Definition at line 79 of file Rect.hpp.

template<typename T>

void vl::Rect< T >::setWidth | ( | T | w ) | `[inline]`

Definition at line 80 of file Rect.hpp.

template<typename T>

void vl::Rect< T >::setHeight | ( | T | h ) | `[inline]`

Definition at line 81 of file Rect.hpp.

template<typename T>

bool vl::Rect< T >::isNull | ( | ) | const`[inline]`

Definition at line 83 of file Rect.hpp.

Referenced by vl::Scissor::enable(), vl::Rect< int >::intersected(), and vl::Rect< int >::united().

template<typename T>

bool vl::Rect< T >::isPoint | ( | ) | const`[inline]`

Definition at line 84 of file Rect.hpp.

template<typename T>

Rect vl::Rect< T >::intersected | ( | const Rect< T > & | other ) | const`[inline]`

Definition at line 86 of file Rect.hpp.

Referenced by vl::Scissor::enable().

template<typename T>

Rect vl::Rect< T >::united | ( | const Rect< T > & | other ) | const`[inline]`

Definition at line 105 of file Rect.hpp.

template<typename T>

bool vl::Rect< T >::operator< | ( | const Rect< T > & | other ) | const`[inline]`

Defines a sort of lexicographic sorting that make possible the use of the Rect class with STL containers like std::set, std::map etc.

Definition at line 129 of file Rect.hpp.

## Member Data Documentation

template<typename T>

T vl::Rect< T >::mX`[protected]`

Definition at line 147 of file Rect.hpp.

Referenced by vl::Rect< int >::left(), vl::Rect< int >::operator<(), vl::Rect< int >::Rect(), vl::Rect< int >::right(), vl::Rect< int >::setX(), and vl::Rect< int >::x().

template<typename T>

T vl::Rect< T >::mY`[protected]`

Definition at line 148 of file Rect.hpp.

Referenced by vl::Rect< int >::bottom(), vl::Rect< int >::operator<(), vl::Rect< int >::Rect(), vl::Rect< int >::setY(), vl::Rect< int >::top(), and vl::Rect< int >::y().

template<typename T>

T vl::Rect< T >::mWidth`[protected]`

Definition at line 149 of file Rect.hpp.

Referenced by vl::Rect< int >::operator<(), vl::Rect< int >::Rect(), vl::Rect< int >::right(), vl::Rect< int >::setWidth(), and vl::Rect< int >::width().

template<typename T>

T vl::Rect< T >::mHeight`[protected]`

Definition at line 150 of file Rect.hpp.

Referenced by vl::Rect< int >::height(), vl::Rect< int >::operator<(), vl::Rect< int >::Rect(), vl::Rect< int >::setHeight(), and vl::Rect< int >::top().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/Rect.hpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:14.
Permission is granted to use this page to write and publish articles regarding Visualization Library.