# Visualization Library

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

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

Public Member Functions

# 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

Definition at line 191 of file Rect.hpp.

## Constructor & Destructor Documentation

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

Definition at line 195 of file Rect.hpp.

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

Definition at line 196 of file Rect.hpp.

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

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

Definition at line 197 of file Rect.hpp.

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

Definition at line 198 of file Rect.hpp.

## Member Function Documentation

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

Reimplemented from vl::Rect< float >.

Definition at line 194 of file Rect.hpp.

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

Definition at line 200 of file Rect.hpp.

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

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

Definition at line 201 of file Rect.hpp.

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

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

Reimplemented from vl::Rect< float >.

Definition at line 202 of file Rect.hpp.

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

Referenced by topRight().

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

Reimplemented from vl::Rect< float >.

Definition at line 203 of file Rect.hpp.

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

Referenced by topRight().

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

Definition at line 204 of file Rect.hpp.

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

Referenced by addPoint().

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

Definition at line 205 of file Rect.hpp.

References right(), and top().

Referenced by addPoint().

void vl::RectF::addPoint | ( | const fvec2 & | p ) | `[inline]`

Definition at line 206 of file Rect.hpp.

References bottomLeft(), vl::Rect< float >::mHeight, vl::Rect< float >::mWidth, vl::Rect< float >::mX, vl::Rect< float >::mY, topRight(), vl::Vector2< T_Scalar >::x(), and vl::Vector2< T_Scalar >::y().

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.