Visualization Library 2.1.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | List of all members
vl::RectF Class Reference

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

#include <Rect.hpp>

+ Inheritance diagram for vl::RectF:

Public Member Functions

 RectF ()
 
 RectF (float x, float y, float width, float height)
 
 RectF (const RectF &other)
 
 RectF (const Rect< float > &other)
 
RectFoperator= (const Rect< float > &other)
 
RectFoperator= (const RectF &other)
 
float top () const
 
float right () const
 
fvec2 bottomLeft () const
 
fvec2 topRight () const
 
void addPoint (const fvec2 &p)
 
- Public Member Functions inherited from vl::Rect< float >
 Rect (const Rect &other)
 
 Rect ()
 
 Rect (float x, float y, float width, float height)
 
float x () const
 
float y () const
 
float width () const
 
float height () const
 
float bottom () const
 
float left () const
 
float top () const
 
float right () const
 
void setX (float x)
 
void setY (float y)
 
void setWidth (float w)
 
void setHeight (float 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. More...
 

Additional Inherited Members

- Protected Attributes inherited from vl::Rect< float >
float mX
 
float mY
 
float mWidth
 
float mHeight
 

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:

Definition at line 189 of file Rect.hpp.

Constructor & Destructor Documentation

◆ RectF() [1/4]

vl::RectF::RectF ( )
inline

Definition at line 192 of file Rect.hpp.

◆ RectF() [2/4]

vl::RectF::RectF ( float  x,
float  y,
float  width,
float  height 
)
inline

◆ RectF() [3/4]

vl::RectF::RectF ( const RectF other)
inline

Definition at line 194 of file Rect.hpp.

◆ RectF() [4/4]

vl::RectF::RectF ( const Rect< float > &  other)
inline

Definition at line 195 of file Rect.hpp.

Member Function Documentation

◆ addPoint()

void vl::RectF::addPoint ( const fvec2 p)
inline

◆ bottomLeft()

fvec2 vl::RectF::bottomLeft ( ) const
inline

Definition at line 201 of file Rect.hpp.

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

◆ operator=() [1/2]

RectF& vl::RectF::operator= ( const Rect< float > &  other)
inline

◆ operator=() [2/2]

RectF& vl::RectF::operator= ( const RectF other)
inline

◆ right()

float vl::RectF::right ( ) const
inline

Definition at line 200 of file Rect.hpp.

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

◆ top()

float vl::RectF::top ( ) const
inline

Definition at line 199 of file Rect.hpp.

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

◆ topRight()

fvec2 vl::RectF::topRight ( ) const
inline

Definition at line 202 of file Rect.hpp.

References vl::Rect< T >::right(), and vl::Rect< T >::top().


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