Overview | Modules | Class Hierarchy | Classes | Members
# tlp::Gl2DRect Class Reference `#include <Gl2DRect.h>` Inherits tlp::GlRect. Inherited by tlp::GlRectTextured. Inheritance diagram for tlp::Gl2DRect: [legend] Collaboration diagram for tlp::Gl2DRect: [legend] List of all members. ## Detailed Description Create a 2D rectangle This rect add screen percentage system (for example you can create a rectangle that start on (10%,10%) and finish on (9090%) If you whan a simple 2D rectangle with normal coordinates use GlRect class ## Public Member Functions Gl2DRect () Gl2DRect (float top, float bottom, float left, float right, const std::string &textureName, bool inPercent=false) Gl2DRect (float bottom, float left, float height, float width, const std::string &textureName, bool xInv, bool yInv) virtual ~Gl2DRect () virtual BoundingBox getBoundingBox () virtual void draw (float lod, Camera *camera) virtual void translate (const Coord &mouvement) virtual void setTexture (const std::string &name) virtual std::string getTexture () virtual void setCoordinates (float bottom, float left, float width, float height) virtual void getXML (xmlNodePtr rootNode) virtual void setWithXML (xmlNodePtr rootNode) ## Protected Attributes float top float bottom float left float right bool inPercent bool xInv bool yInv ## Constructor & Destructor Documentation
tlp::Gl2DRect::Gl2DRect | ( |  | ) |
tlp::Gl2DRect::Gl2DRect | ( | float | top,
|  | float | bottom,
|  | float | left,
|  | float | right,
|  | const std::string & | textureName,
|  | bool | inPercent = `false`
| ) |
| Constructor : with top/bottom/left/right coords, textureName and if inPercent is true coords are in percent
tlp::Gl2DRect::Gl2DRect | ( | float | bottom,
|  | float | left,
|  | float | height,
|  | float | width,
|  | const std::string & | textureName,
|  | bool | xInv,
|  | bool | yInv
| ) |
| Constructor : with bottom/left height,width coords, textureName and if xInv/yInv is true coords viewport - coord
virtual tlp::Gl2DRect::~Gl2DRect | ( |  | ) | `[inline, virtual]`
## Member Function Documentation
virtual void tlp::Gl2DRect::draw | ( | float | lod,
|  | Camera * | camera
| ) | `[virtual]`
| Draw the rectangle Reimplemented from tlp::GlRect.
virtual BoundingBox tlp::Gl2DRect::getBoundingBox | ( |  | ) | `[virtual]`
| Return the bounding box Reimplemented from tlp::GlSimpleEntity.
virtual std::string tlp::Gl2DRect::getTexture | ( |  | ) | `[virtual]`
| Get texture of the GlRectTextured
virtual void tlp::Gl2DRect::getXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`
| Function to export data in XML Reimplemented from tlp::GlRect.
virtual void tlp::Gl2DRect::setCoordinates | ( | float | bottom,
|  | float | left,
|  | float | width,
|  | float | height
| ) | `[virtual]`
| Set coordinates of rectangle
virtual void tlp::Gl2DRect::setTexture | ( | const std::string & | name | ) | `[virtual]`
| Set texture of the GlRectTextured
virtual void tlp::Gl2DRect::setWithXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`
| Function to set data with XML Reimplemented from tlp::GlRect.
virtual void tlp::Gl2DRect::translate | ( | const Coord & | mouvement | ) | `[virtual]`
| Translate entity Reimplemented from tlp::GlAbstractPolygon.
## Member Data Documentation
float tlp::Gl2DRect::bottom`[protected]`
bool tlp::Gl2DRect::inPercent`[protected]`
float tlp::Gl2DRect::left`[protected]`
float tlp::Gl2DRect::right`[protected]`
float tlp::Gl2DRect::top`[protected]`
bool tlp::Gl2DRect::xInv`[protected]`
bool tlp::Gl2DRect::yInv`[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2010