Tulip  6.0.0
Large graphs analysis and drawing
tlp::GlPolygon Class Reference

#include <GlPolygon.h>

+ Inheritance diagram for tlp::GlPolygon:
+ Collaboration diagram for tlp::GlPolygon:

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 Coord & point (const unsigned int i)
 
virtual const Coord & point (const unsigned int i) const
 
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 ()
 
 ~GlSimpleEntity () override
 
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
 
- Protected Attributes inherited from tlp::GlSimpleEntity
BoundingBox boundingBox
 
std::vector< GlComposite * > parents
 
int stencil
 
bool visible
 

Detailed Description

Class to create a polygon GlEntity.

Definition at line 36 of file GlPolygon.h.

Constructor & Destructor Documentation

◆ GlPolygon() [1/3]

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.

◆ GlPolygon() [2/3]

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.

◆ GlPolygon() [3/3]

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

◆ point() [1/2]

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

return the ith point

◆ point() [2/2]

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

return the ith point

◆ resizeColors()

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

Change number of colors of the polygon.

◆ resizePoints()

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

Change number of point of the polygon.

Reimplemented in tlp::GlRegularPolygon.