Tulip  4.6.0
Better Visualization Through Research
tlp::Gl2DRect Class Reference

#include <Gl2DRect.h>

+ Inheritance diagram for tlp::Gl2DRect:
+ Collaboration diagram for tlp::Gl2DRect:

List of all members.

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 &currentPosition)
virtual void translate (const Coord &mouvement)

Protected Attributes

float bottom
bool inPercent
float left
float right
float top
bool xInv
bool yInv

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 (90%90%) If you whan a simple 2D rectangle with normal coordinates use GlRect class

See also:
GlRect

Definition at line 37 of file Gl2DRect.h.


Constructor & Destructor Documentation

Don't use this constructor.

tlp::Gl2DRect::Gl2DRect ( float  top,
float  bottom,
float  left,
float  right,
const std::string &  textureName,
bool  inPercent = false 
)

Constructor.

Parameters:
topcoordinate
bottomcoordinate
leftcoordinate
rightcoordinate
textureNamepath to a texture
inPercentif 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.

Parameters:
topcoordinate
bottomcoordinate
leftcoordinate
rightcoordinate
textureNamepath to a texture
xInvif true : use viewportX - left and viewportX - right
yInvif true : use viewportY - top and viewportY - bottom
virtual tlp::Gl2DRect::~Gl2DRect ( ) [inline, virtual]

Destructor.

Definition at line 77 of file Gl2DRect.h.


Member Function Documentation

virtual void tlp::Gl2DRect::draw ( float  lod,
Camera camera 
) [virtual]

Draw function.

Warning:
You don't have to call this function, the Tulip OpenGL engine call it.

Reimplemented from tlp::GlRect.

Return the entity boundingbox.

Warning:
You don't have to call this function, the Tulip OpenGL engine call it.

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)

Warning:
You don't have to call this function, the Tulip OpenGL engine call it.

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)

Warning:
You don't have to call this function, the Tulip OpenGL engine call it.

Implements tlp::GlSimpleEntity.

 All Classes Files Functions Variables Enumerations Enumerator Properties