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

#include <GlPolygon.h>

Inherits tlp::GlAbstractPolygon.

Inherited by tlp::GlRect, and tlp::GlRegularPolygon.

Public Member Functions

 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 void draw (float lod, Camera *camera)=0
 
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

Class to create a polygon GlEntity.

Definition at line 37 of file GlPolygon.h.

Constructor & Destructor Documentation

tlp::GlPolygon::GlPolygon ( const bool  filled = true,
const bool  outlined = true,
const std::string &  textureName = "",
const float  outlineSize = 1 
)

Constructor where specify if the polygon is filled, is outlines the texture name and the outline size.

tlp::GlPolygon::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 
)

Constructor with a vector of point, a vector of fill color, a vector of outline color and if the polygon is filled, is outlined and the outline size.

tlp::GlPolygon::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 
)

Constructor with a number of point, a number of fill color, a number of outline color and if the polygon is filled, outlined and the ouline size.

Member Function Documentation

virtual const Coord& tlp::GlPolygon::point ( const unsigned int  i) const
virtual

return the ith point

virtual Coord& tlp::GlPolygon::point ( const unsigned int  i)
virtual

return the ith point

virtual void tlp::GlPolygon::resizeColors ( const unsigned int  nbColors)
virtual

Change number of colors of the polygon.

virtual void tlp::GlPolygon::resizePoints ( const unsigned int  nbPoints)
virtual

Change number of point of the polygon.

Reimplemented in tlp::GlRegularPolygon.