Overview     Modules     Class Hierarchy     Classes     Members  
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 ~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 draw (float lod, Camera *camera)
virtual void translate (const Coord &mouvement)
virtual void getXML (xmlNodePtr rootNode)
virtual void getXMLOnlyData (xmlNodePtr rootNode)
virtual void setWithXML (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 BoundingBox getBoundingBox ()
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 ()

Additional Inherited Members

- Public Types inherited from tlp::GlAbstractPolygon
enum  PolygonMode { POLYGON = 0, QUAD_STRIP = 1 }
- Protected Member Functions inherited from tlp::GlAbstractPolygon
virtual void setPoints (const std::vector< Coord > &points)
virtual void setPoint (unsigned int index, const Coord &point)
virtual void setFillColors (const std::vector< Color > &colors)
virtual void setOutlineColors (const std::vector< Color > &colors)
virtual void recomputeBoundingBox ()
virtual void clearGenerated ()
- Protected Attributes inherited from tlp::GlAbstractPolygon
PolygonMode polygonMode
std::vector< Coord > points
std::vector< Color > fillColors
std::vector< Color > outlineColors
bool filled
bool outlined
bool lighting
bool invertYTexture
std::string textureName
float outlineSize
float hideOutlineLod
std::vector< Coord > normalArray
GLubyte * indices
GLubyte * auxIndices
GLfloat * texArray
bool generated
GLuint buffers [7]

Detailed Description

class to create a polygon

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

virtual tlp::GlPolygon::~GlPolygon ( )
virtual

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.



Tulip Software by LaBRI Visualization Team    2001 - 2012