![]() |
Tulip
4.6.0
Better Visualization Through Research
|
#include <Gl2DRect.h>
Inheritance diagram for tlp::Gl2DRect:
Collaboration diagram for tlp::Gl2DRect: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 void | draw (float lod, Camera *camera) |
| virtual BoundingBox | getBoundingBox () |
| virtual std::string | getTexture () |
| virtual void | getXML (std::string &outString) |
| virtual void | setCoordinates (float bottom, float left, float width, float height) |
| virtual void | setTexture (const std::string &name) |
| virtual void | setWithXML (const std::string &inString, unsigned int ¤tPosition) |
| virtual void | translate (const Coord &mouvement) |
Protected Attributes | |
| float | bottom |
| bool | inPercent |
| float | left |
| float | right |
| float | top |
| bool | xInv |
| bool | yInv |
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 (90%90%) If you whan a simple 2D rectangle with normal coordinates use GlRect class
Definition at line 37 of file Gl2DRect.h.
Don't use this constructor.
| tlp::Gl2DRect::Gl2DRect | ( | float | top, |
| float | bottom, | ||
| float | left, | ||
| float | right, | ||
| const std::string & | textureName, | ||
| bool | inPercent = false |
||
| ) |
Constructor.
| top | coordinate |
| bottom | coordinate |
| left | coordinate |
| right | coordinate |
| textureName | path to a texture |
| inPercent | if true : top/bottom/left/right is used as in percent parameters |
| tlp::Gl2DRect::Gl2DRect | ( | float | bottom, |
| float | left, | ||
| float | height, | ||
| float | width, | ||
| const std::string & | textureName, | ||
| bool | xInv, | ||
| bool | yInv | ||
| ) |
Constructor.
| top | coordinate |
| bottom | coordinate |
| left | coordinate |
| right | coordinate |
| textureName | path to a texture |
| xInv | if true : use viewportX - left and viewportX - right |
| yInv | if true : use viewportY - top and viewportY - bottom |
| virtual tlp::Gl2DRect::~Gl2DRect | ( | ) | [inline, virtual] |
Destructor.
Definition at line 77 of file Gl2DRect.h.
| virtual void tlp::Gl2DRect::draw | ( | float | lod, |
| Camera * | camera | ||
| ) | [virtual] |
Draw function.
Reimplemented from tlp::GlRect.
| virtual BoundingBox tlp::Gl2DRect::getBoundingBox | ( | ) | [virtual] |
Return the entity boundingbox.
Reimplemented from tlp::GlSimpleEntity.
| virtual std::string tlp::Gl2DRect::getTexture | ( | ) | [virtual] |
Get texture.
| virtual void tlp::Gl2DRect::getXML | ( | std::string & | outString | ) | [virtual] |
Save the entity in outString (in XML format)
Implements tlp::GlSimpleEntity.
| 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.
| virtual void tlp::Gl2DRect::setWithXML | ( | const std::string & | inString, |
| unsigned int & | currentPosition | ||
| ) | [virtual] |
Load entity with inString (in XML format)
Implements tlp::GlSimpleEntity.