# Visualization Library

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

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

Public Member Functions

# vl::RectI Class Reference

The RectI class represents a 2D rectangular area using `int` precision. More...

`#include <Rect.hpp>`

Inheritance diagram for vl::RectI:

List of all members.

## Public Member Functions

virtual const char * | className ()
| RectI ()
| RectI (int x, int y, int width, int height)
| RectI (const Rect< int > &other)
| RectI (const RectI &other)
RectI & | operator= (const Rect< int > &other)
RectI & | operator= (const RectI &other)
int | top () const
int | right () const
ivec2 | bottomLeft () const
ivec2 | topRight () const

## Detailed Description

The RectI class represents a 2D rectangular area using `int` precision.

This class is mainly used to manipulate rectangles in pixel coordinates (as opposed to real coordinates). The RectI and RectF differ in the following way:

- RectF dimensions are implemented using float precision, while RectI uses int precision.
- RectF::right() returns x()+width(), while RectI::right() returns x()+width()-1
- RectF::top() return y()+height(), while RectI::top() return y()+height()-1
  See also:
- RectF

Definition at line 164 of file Rect.hpp.

## Constructor & Destructor Documentation

vl::RectI::RectI | ( | ) | `[inline]`

Definition at line 168 of file Rect.hpp.

vl::RectI::RectI | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height
| ) |  | `[inline]`

Definition at line 169 of file Rect.hpp.

References vl::Rect< int >::height(), vl::Rect< int >::mHeight, vl::Rect< int >::mWidth, vl::Rect< int >::mX, vl::Rect< int >::mY, vl::Rect< int >::width(), vl::Rect< int >::x(), and vl::Rect< int >::y().

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

Definition at line 170 of file Rect.hpp.

vl::RectI::RectI | ( | const RectI & | other ) | `[inline]`

Definition at line 171 of file Rect.hpp.

## Member Function Documentation

virtual const char* vl::RectI::className | ( | ) | `[inline, virtual]`

Reimplemented from vl::Rect< int >.

Definition at line 167 of file Rect.hpp.

RectI& vl::RectI::operator= | ( | const Rect< int > & | other ) | `[inline]`

Definition at line 173 of file Rect.hpp.

References vl::Rect< T >::height(), vl::Rect< int >::mHeight, vl::Rect< int >::mWidth, vl::Rect< int >::mX, vl::Rect< int >::mY, vl::Rect< T >::width(), vl::Rect< T >::x(), and vl::Rect< T >::y().

RectI& vl::RectI::operator= | ( | const RectI & | other ) | `[inline]`

Definition at line 174 of file Rect.hpp.

References vl::Rect< T >::height(), vl::Rect< int >::mHeight, vl::Rect< int >::mWidth, vl::Rect< int >::mX, vl::Rect< int >::mY, vl::Rect< T >::width(), vl::Rect< T >::x(), and vl::Rect< T >::y().

int vl::RectI::top | ( | ) | const`[inline]`

Reimplemented from vl::Rect< int >.

Definition at line 175 of file Rect.hpp.

References vl::Rect< int >::mHeight, and vl::Rect< int >::mY.

Referenced by vl::Image::copySubImage(), and topRight().

int vl::RectI::right | ( | ) | const`[inline]`

Reimplemented from vl::Rect< int >.

Definition at line 176 of file Rect.hpp.

References vl::Rect< int >::mWidth, and vl::Rect< int >::mX.

Referenced by vl::Image::copySubImage(), and topRight().

ivec2 vl::RectI::bottomLeft | ( | ) | const`[inline]`

Definition at line 177 of file Rect.hpp.

References vl::Rect< int >::bottom(), and vl::Rect< int >::left().

ivec2 vl::RectI::topRight | ( | ) | const`[inline]`

Definition at line 178 of file Rect.hpp.

References right(), and 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.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:35.
Permission is granted to use this page to write and publish articles regarding Visualization Library.