Tulip  4.4.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::GlRect Class Reference

#include <GlRect.h>

Inherits tlp::GlPolygon.

Inherited by tlp::Gl2DRect.

Public Member Functions

 GlRect (const Coord &topLeftPos, const Coord &bottomRightPos, const Color &topLeftCol, const Color &bottomRightCol, bool filled=true, bool outlined=false)
 
 GlRect (const Coord &center, const float width, const float height, const Color &fillColor, const Color &outlineColor)
 
 GlRect (bool filled=true, bool outlined=false)
 
virtual ~GlRect ()
 
virtual void draw (float lod, Camera *camera)
 
virtual Color getBottomRightColor ()
 
virtual Coord getBottomRightPos ()
 
virtual Coord getCenter ()
 
virtual Color getTopLeftColor ()
 
virtual Coord getTopLeftPos ()
 
bool inRect (double x, double y)
 
virtual void setBottomRightColor (const Color &bottomRightCol)
 
virtual void setBottomRightPos (const Coord &bottomRightPos)
 
void setCenterAndSize (const Coord &center, const Size &size)
 
virtual void setTopLeftColor (const Color &topLeftCol)
 
virtual void setTopLeftPos (const Coord &topLeftPos)
 
- 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 const Coord & point (const unsigned int i) const
 
virtual Coord & point (const unsigned int i)
 
virtual void resizeColors (const unsigned int nbColors)
 
virtual void resizePoints (const unsigned int nbPoints)
 
- Public Member Functions inherited from tlp::GlAbstractPolygon
float getOutlineSize ()
 
std::string getTextureName ()
 
void setFillColor (const Color &color)
 
void setOutlineColor (const Color &color)
 
void setOutlineSize (float size)
 
void setTextureName (const std::string &name)
 
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 
virtual ~GlSimpleEntity ()
 
virtual BoundingBox getBoundingBox ()
 
int getStencil ()
 
virtual void getXML (std::string &outString)=0
 
bool isVisible () const
 
virtual void setStencil (int stencil)
 
virtual void setVisible (bool visible)
 
virtual void setWithXML (const std::string &inString, unsigned int &currentPosition)=0
 

Additional Inherited Members

- Protected Attributes inherited from tlp::GlAbstractPolygon
GLubyte * auxIndices
 
GLuint buffers [7]
 
std::vector< Color > fillColors
 
bool filled
 
bool generated
 
float hideOutlineLod
 
GLubyte * indices
 
bool invertYTexture
 
bool lighting
 
std::vector< Coord > normalArray
 
std::vector< Color > outlineColors
 
bool outlined
 
float outlineSize
 
std::vector< Coord > points
 
PolygonMode polygonMode
 
GLfloat * texArray
 
std::string textureName
 

Detailed Description

This is a general class for the rendering of 2D rectangles.

This class is used as a 2D HUD for the rendering of 2D rectangles.

Definition at line 36 of file GlRect.h.

Constructor & Destructor Documentation

tlp::GlRect::GlRect ( const Coord &  topLeftPos,
const Coord &  bottomRightPos,
const Color &  topLeftCol,
const Color &  bottomRightCol,
bool  filled = true,
bool  outlined = false 
)

Constructor : with topLeft/bottomRight coords, topLeft/bottomRight colors and if GlRect is filled/outlined

tlp::GlRect::GlRect ( const Coord &  center,
const float  width,
const float  height,
const Color &  fillColor,
const Color &  outlineColor 
)

Constructor : with center coords and size, fill color and outline color

tlp::GlRect::GlRect ( bool  filled = true,
bool  outlined = false 
)

Constructor : with GlRect is filled/outlined

virtual tlp::GlRect::~GlRect ( )
virtual

Destructor

Member Function Documentation

virtual void tlp::GlRect::draw ( float  lod,
Camera camera 
)
virtual

Draw function.

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

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::Gl2DRect.

virtual Color tlp::GlRect::getBottomRightColor ( )
virtual

Accessor in reading to the Bottom Right Corner Color of the Rectangle

virtual Coord tlp::GlRect::getBottomRightPos ( )
virtual

Accessor in reading to the Bottom Right Corner of the rectangle

virtual Coord tlp::GlRect::getCenter ( )
virtual

Accessor in reading to the Top Left Corner of the rectangle

virtual Color tlp::GlRect::getTopLeftColor ( )
virtual

Accessor in reading to the Top Left Corner Color of the rectangle

virtual Coord tlp::GlRect::getTopLeftPos ( )
virtual

Accessor in reading to the Top Left Corner of the rectangle

bool tlp::GlRect::inRect ( double  x,
double  y 
)

Is the point in the rectangle ?

virtual void tlp::GlRect::setBottomRightColor ( const Color &  bottomRightCol)
virtual

Accessor in writing to the Bottom Right Corner Color of the rectangle

virtual void tlp::GlRect::setBottomRightPos ( const Coord &  bottomRightPos)
virtual

Accessor in writing to the Bottom Right Corner Color of the rectangle

void tlp::GlRect::setCenterAndSize ( const Coord &  center,
const Size &  size 
)

Set the center and the size of the GlRect

virtual void tlp::GlRect::setTopLeftColor ( const Color &  topLeftCol)
virtual

Accessor in writing to the Top Left Corner of the rectangle

virtual void tlp::GlRect::setTopLeftPos ( const Coord &  topLeftPos)
virtual

Accessor in writing to the Top Left Corner of the rectangle