OpenGUI::FRect Class Reference
[Types]

#include <OpenGUI_Types.h>

List of all members.


Detailed Description

FRects are rects built from float values. Internally they are comprised of two FVector2's.


Public Member Functions

 FRect ()
 constructor
 FRect (const FVector2 &min, const FVector2 max)
 constructor
 FRect (const float &left, const float &top, const float &right, const float &bottom)
 constructor
const FVector2getPosition () const
 return position
FVector2 getSize () const
 return size
float getWidth () const
 return width
float getHeight () const
 return height
void setWidth (const float &newWidth)
 set new width
void setHeight (const float &newHeight)
 set new height
void setSize (const FVector2 &newSize)
 set new size
void setPosition (const FVector2 &newPosition)
 set new position
void offset (const FVector2 &offsetVector)
 offset position by offsetVector
FRectnormalize ()
 Normalizes the rect, ensuring that min really is the min and max really is the max.
bool isInside (const FVector2 &point) const
 return true if given point is within bounds of this rect
FVector2 getInnerCoord (const FVector2 &outerFVector2)
 Return the given outer coord as an inner coord.
FVector2 getOuterCoord (const FVector2 &innerFVector2)
 Return the given inner coord as an outer coord.
FRect pixelAligned (const IVector2 &resolution) const
 Returns a pixel aligned copy of this FRect.
String toStr () const
 Return a string representation of this value.
bool operator== (const FRect &right) const
 comparison operator
bool operator!= (const FRect &right) const
 comparison operator

Public Attributes

FVector2 min
 direct access to upper left point
FVector2 max
 direct access to lower right point


Constructor & Destructor Documentation

OpenGUI::FRect::FRect  )  [inline]
 

constructor

OpenGUI::FRect::FRect const FVector2 min,
const FVector2  max
[inline]
 

constructor

OpenGUI::FRect::FRect const float &  left,
const float &  top,
const float &  right,
const float &  bottom
[inline]
 

constructor


Member Function Documentation

float OpenGUI::FRect::getHeight  )  const [inline]
 

return height

FVector2 OpenGUI::FRect::getInnerCoord const FVector2 outerFVector2  )  [inline]
 

Return the given outer coord as an inner coord.

inner coord is defined as upper left = 0,0, lower right = 1.0f,1.0f

FVector2 OpenGUI::FRect::getOuterCoord const FVector2 innerFVector2  )  [inline]
 

Return the given inner coord as an outer coord.

inner coord is defined as upper left = 0,0, lower right = 1.0f,1.0f

const FVector2& OpenGUI::FRect::getPosition  )  const [inline]
 

return position

FVector2 OpenGUI::FRect::getSize  )  const [inline]
 

return size

float OpenGUI::FRect::getWidth  )  const [inline]
 

return width

bool OpenGUI::FRect::isInside const FVector2 point  )  const [inline]
 

return true if given point is within bounds of this rect

FRect& OpenGUI::FRect::normalize  )  [inline]
 

Normalizes the rect, ensuring that min really is the min and max really is the max.

void OpenGUI::FRect::offset const FVector2 offsetVector  )  [inline]
 

offset position by offsetVector

bool OpenGUI::FRect::operator!= const FRect right  )  const [inline]
 

comparison operator

bool OpenGUI::FRect::operator== const FRect right  )  const [inline]
 

comparison operator

FRect OpenGUI::FRect::pixelAligned const IVector2 resolution  )  const [inline]
 

Returns a pixel aligned copy of this FRect.

void OpenGUI::FRect::setHeight const float &  newHeight  )  [inline]
 

set new height

void OpenGUI::FRect::setPosition const FVector2 newPosition  )  [inline]
 

set new position

void OpenGUI::FRect::setSize const FVector2 newSize  )  [inline]
 

set new size

void OpenGUI::FRect::setWidth const float &  newWidth  )  [inline]
 

set new width

String OpenGUI::FRect::toStr  )  const
 

Return a string representation of this value.


Member Data Documentation

FVector2 OpenGUI::FRect::max
 

direct access to lower right point

FVector2 OpenGUI::FRect::min
 

direct access to upper left point


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Sun Sep 9 02:00:22 2007