Overview     Modules     Class Hierarchy     Classes     Members  

Create a 2D rectangle. More...

#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 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)
- Public Member Functions inherited from tlp::GlRect
 GlRect (const Coord &topLeftPos, const Coord &bottomRightPos, const Color &topLeftCol, const Color &bottomRightCol, bool filled=true, bool outlined=false)
 GlRect (const Coord &center, const Size &size, const Color &fillColor, const Color &outlineColor)
 GlRect (bool filled=true, bool outlined=false)
virtual ~GlRect ()
virtual Coord getCenter ()
void setCenterAndSize (const Coord &center, const Size &size)
virtual Coord getTopLeftPos ()
virtual Coord getBottomRightPos ()
virtual Color getTopLeftColor ()
virtual Color getBottomRightColor ()
virtual void setTopLeftPos (const Coord &topLeftPos)
virtual void setBottomRightPos (const Coord &bottomRightPos)
virtual void setTopLeftColor (const Color &topLeftCol)
virtual void setBottomRightColor (const Color &bottomRightCol)
bool inRect (double x, double y)
- Public Member Functions inherited from tlp::GlPolygon
 GlPolygon (const bool filled=true, const bool outlined=true, const std::string &textureName="", const float outlineSize=1)
 GlPolygon (const std::vector< Coord > &points, const std::vector< Color > &fillColors, const std::vector< Color > &outlineColors, const bool filled, const bool outlined, const std::string &textureName="", const float outlineSize=1)
 GlPolygon (const unsigned int nbPoints, const unsigned int nbFillColors, const unsigned int nbOutlineColors, const bool filled=true, const bool outlined=true, const std::string &textureName="", const float outlineSize=1)
virtual ~GlPolygon ()
virtual void resizePoints (const unsigned int nbPoints)
virtual void resizeColors (const unsigned int nbColors)
virtual const Coord & point (const unsigned int i) const
virtual Coord & point (const unsigned int i)
- Public Member Functions inherited from tlp::GlAbstractPolygon
 GlAbstractPolygon ()
virtual ~GlAbstractPolygon ()
PolygonMode getPolygonMode ()
void setPolygonMode (PolygonMode mode)
bool getFillMode ()
void setFillMode (const bool)
bool getOutlineMode ()
void setOutlineMode (const bool)
bool getLightingMode ()
void setLightingMode (const bool)
Color getFillColor (unsigned int i)
void setFillColor (unsigned int i, const Color &color)
void setFillColor (const Color &color)
Color getOutlineColor (unsigned int i)
void setOutlineColor (unsigned int i, const Color &color)
void setOutlineColor (const Color &color)
std::string getTextureName ()
void setTextureName (const std::string &name)
float getOutlineSize ()
void setOutlineSize (float size)
float getHideOutlineLod ()
void setHideOutlineLod (float lod)
virtual void getXMLOnlyData (xmlNodePtr rootNode)
const Color & fcolor (const unsigned int i) const
Color & fcolor (const unsigned int i)
void setFColor (const unsigned int i, const Color &color)
const Color & ocolor (const unsigned int i) const
virtual Color & ocolor (const unsigned int i)
virtual void setOColor (const unsigned int i, const Color &color)
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
virtual ~GlSimpleEntity ()
virtual void acceptVisitor (GlSceneVisitor *visitor)
virtual void setVisible (bool visible)
bool isVisible ()
virtual void setStencil (int stencil)
int getStencil ()
void setCheckByBoundingBoxVisitor (bool check)
bool isCheckByBoundingBoxVisitor ()
virtual void addLayerParent (GlLayer *)
virtual void removeLayerParent (GlLayer *)
void addParent (GlComposite *composite)
void removeParent (GlComposite *composite)
- Public Member Functions inherited from tlp::GlEntity
virtual ~GlEntity ()

Protected Attributes

float top
float bottom
float left
float right
bool inPercent
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


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 ( )
inlinevirtual

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 - 2012