# Visualization Library

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

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

# 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)
| operator Rect< int > () const
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

## Constructor & Destructor Documentation

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

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

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

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

## Member Function Documentation

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

Reimplemented from vl::Rect< int >.

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

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

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

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

Reimplemented from vl::Rect< int >.

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

Reimplemented from vl::Rect< int >.

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

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

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Rect.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:38 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.