Overview     Modules     Class Hierarchy     Classes     Members  

#include <GlRegularPolygon.h>

Inheritance diagram for tlp::GlRegularPolygon:
Collaboration diagram for tlp::GlRegularPolygon:

Public Member Functions

 GlRegularPolygon (const Coord &position, const Size &size, unsigned int numberOfSides, const Color &outlineColor=Color(255, 0, 0, 255), const Color &fillColor=Color(0, 0, 255, 255), bool filled=true, bool outlined=true, const std::string &textureName="", float outlineSize=1.)
virtual ~GlRegularPolygon ()
void setStartAngle (float angle)
unsigned int getNumberOfSides ()
void resizePoints (const unsigned int number)
void setNumberOfSides (unsigned int number)
- 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 ~GlPolygon ()
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 ()

Protected Member Functions

void computePolygon ()

Protected Attributes

Coord position
Size size
unsigned int numberOfSides
float startAngle

Additional Inherited Members

- Public Types inherited from tlp::GlAbstractPolygon
enum  PolygonMode { POLYGON = 0, QUAD_STRIP = 1 }

Detailed Description

class to create a regular polygon

Constructor & Destructor Documentation

tlp::GlRegularPolygon::GlRegularPolygon ( const Coord &  position,
const Size &  size,
unsigned int  numberOfSides,
const Color &  outlineColor = Color(255, 0, 0, 255),
const Color &  fillColor = Color(0, 0, 255, 255),
bool  filled = true,
bool  outlined = true,
const std::string &  textureName = "",
float  outlineSize = 1. 
)

Constructor

virtual tlp::GlRegularPolygon::~GlRegularPolygon ( )
virtual

Default empty destructor

Member Function Documentation

void tlp::GlRegularPolygon::computePolygon ( )
protected
unsigned int tlp::GlRegularPolygon::getNumberOfSides ( )

Get the number of Sides

void tlp::GlRegularPolygon::resizePoints ( const unsigned int  number)
virtual

Set the number of sides (use setNumberOfSides)

Reimplemented from tlp::GlPolygon.

void tlp::GlRegularPolygon::setNumberOfSides ( unsigned int  number)

Set the number of sides

void tlp::GlRegularPolygon::setStartAngle ( float  angle)

Set the start angle

Member Data Documentation

unsigned int tlp::GlRegularPolygon::numberOfSides
protected
Coord tlp::GlRegularPolygon::position
protected
Size tlp::GlRegularPolygon::size
protected
float tlp::GlRegularPolygon::startAngle
protected


Tulip Software by LaBRI Visualization Team    2001 - 2012