tlp::GlPolygon Class Reference#include <GlPolygon.h>
Inherits tlp::GlSimpleEntity.
Inherited by tlp::GlCircle, and tlp::GlRect.
Inheritance diagram for tlp::GlPolygon:
[legend]Collaboration diagram for tlp::GlPolygon:
[legend]List of all members.
Detailed Description
class to create a polygon
Public Member Functions
- GlPolygon (const bool filled=true, const bool outlined=true, const int 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 int outlineSize=1)
- GlPolygon (const unsigned int nbPoints, const unsigned int nbFillColors, const unsigned int nbOutlineColors, const bool filled=true, const bool outlined=true, const int outlineSize=1)
- virtual ~GlPolygon ()
- void draw (float lod, Camera *camera)
- 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)
- virtual void addPoint (const Coord &point, const Color &fcolor, const Color &ocolor)
- virtual const Color & fcolor (const unsigned int i) const
- virtual Color & fcolor (const unsigned int i)
- virtual void setFColor (const unsigned int i, const Color &color)
- virtual 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)
- virtual int getOutlineSize ()
- virtual void setOutlineSize (int size)
- bool getFillMode ()
- void setFillMode (const bool)
- bool getOutlineMode ()
- void setOutlineMode (const bool)
- virtual void translate (const Coord &mouvement)
- virtual void getXML (xmlNodePtr rootNode)
- virtual void getXMLOnlyData (xmlNodePtr rootNode)
- virtual void setWithXML (xmlNodePtr rootNode)
Protected Attributes
Constructor & Destructor Documentation
tlp::GlPolygon::GlPolygon |
( |
const bool |
filled = true , |
|
|
const bool |
outlined = true , |
|
|
const int |
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 int |
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 int |
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 void tlp::GlPolygon::addPoint |
( |
const Coord & |
point, |
|
|
const Color & |
fcolor, |
|
|
const Color & |
ocolor |
|
) |
[virtual] |
|
|
Add a new point with a Coord, a fill color and an ouline color |
void tlp::GlPolygon::draw |
( |
float |
lod, |
|
|
Camera * |
camera |
|
) |
[virtual] |
|
virtual Color& tlp::GlPolygon::fcolor |
( |
const unsigned int |
i |
) |
[virtual] |
|
|
return the ith color used for filling the polygon
Reimplemented in tlp::GlCircle. |
virtual const Color& tlp::GlPolygon::fcolor |
( |
const unsigned int |
i |
) |
const [virtual] |
|
|
return the ith color used for filling the polygon
Reimplemented in tlp::GlCircle. |
bool tlp::GlPolygon::getFillMode |
( |
|
) |
|
|
|
Get if the polygon is filled or not |
bool tlp::GlPolygon::getOutlineMode |
( |
|
) |
|
|
|
Get if the polygon is outlined or not |
virtual int tlp::GlPolygon::getOutlineSize |
( |
|
) |
[inline, virtual] |
|
virtual void tlp::GlPolygon::getXML |
( |
xmlNodePtr |
rootNode |
) |
[virtual] |
|
virtual void tlp::GlPolygon::getXMLOnlyData |
( |
xmlNodePtr |
rootNode |
) |
[virtual] |
|
|
Function to export data in XML |
virtual Color& tlp::GlPolygon::ocolor |
( |
const unsigned int |
i |
) |
[virtual] |
|
|
return the ith color used for outlining the polygon
Reimplemented in tlp::GlCircle. |
virtual const Color& tlp::GlPolygon::ocolor |
( |
const unsigned int |
i |
) |
const [virtual] |
|
|
return the ith color used for outlining the polygon
Reimplemented in tlp::GlCircle. |
virtual Coord& tlp::GlPolygon::point |
( |
const unsigned int |
i |
) |
[virtual] |
|
virtual const Coord& tlp::GlPolygon::point |
( |
const unsigned int |
i |
) |
const [virtual] |
|
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 |
virtual void tlp::GlPolygon::setFColor |
( |
const unsigned int |
i, |
|
|
const Color & |
color |
|
) |
[virtual] |
|
|
Set the ith color used for filling the polygon |
void tlp::GlPolygon::setFillMode |
( |
const |
bool |
) |
|
|
|
Set if the polygon is filled or not |
virtual void tlp::GlPolygon::setOColor |
( |
const unsigned int |
i, |
|
|
const Color & |
color |
|
) |
[virtual] |
|
|
Set the ith color used for outlining the polygon |
void tlp::GlPolygon::setOutlineMode |
( |
const |
bool |
) |
|
|
|
Set if the polygon is outlined or not |
virtual void tlp::GlPolygon::setOutlineSize |
( |
int |
size |
) |
[inline, virtual] |
|
virtual void tlp::GlPolygon::setWithXML |
( |
xmlNodePtr |
rootNode |
) |
[virtual] |
|
virtual void tlp::GlPolygon::translate |
( |
const Coord & |
mouvement |
) |
[virtual] |
|
Member Data Documentation
|