# Visualization Library A lightweight C++ OpenGL middleware for 2D/3D graphics | [Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::RectF Class Reference

The RectF class represents a 2D rectangular area using `float` precision. More...

`#include <Rect.hpp>`

Inheritance diagram for vl::RectF:

List of all members.

## Public Member Functions
virtual const char * | className ()
| RectF ()
| RectF (float x, float y, float width, float height)
| RectF (const RectF &other)
| RectF (const Rect< float > &other)
RectF & | operator= (const Rect< float > &other)
RectF & | operator= (const RectF &other)
float | top () const
float | right () const
fvec2 | bottomLeft () const
fvec2 | topRight () const
void | addPoint (const fvec2 &p)

## Detailed Description

The RectF class represents a 2D rectangular area using `float` precision.

This class is mainly used to manipulate rectangles in real coordinates (as opposed to pixel 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:
- RectI

## Constructor & Destructor Documentation

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

vl::RectF::RectF | ( | float | x,
|  | float | y,
|  | float | width,
|  | float | height |
| ) |  |  | `[inline]`

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

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

## Member Function Documentation

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

Reimplemented from vl::Rect< float >.

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

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

float vl::RectF::top | ( |  | ) | const`[inline]`

Reimplemented from vl::Rect< float >.

float vl::RectF::right | ( |  | ) | const`[inline]`

Reimplemented from vl::Rect< float >.

fvec2 vl::RectF::bottomLeft | ( |  | ) | const`[inline]`

fvec2 vl::RectF::topRight | ( |  | ) | const`[inline]`

void vl::RectF::addPoint | ( | const fvec2 & | p | ) | `[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.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 29 11:11:49 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.