Overview     Modules     Class Hierarchy     Classes     Members  

tlp::GlPolygon Class Reference

#include <GlPolygon.h>

Inherits tlp::GlSimpleEntity.

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

Collaboration diagram for tlp::GlPolygon:

List of all members.

Public Member Functions

Protected Attributes


Detailed Description

class to create a polygon


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]

Draw the polygon

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlRect.

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.

virtual void tlp::GlPolygon::getXML ( xmlNodePtr  rootNode  )  [virtual]

Function to export data and type in XML

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlCircle, and tlp::GlRect.

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]

return the ith point

virtual const Coord& tlp::GlPolygon::point ( const unsigned int  i  )  const [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

void tlp::GlPolygon::setFillMode ( const   bool  ) 

Set if the polygon is filled or not

void tlp::GlPolygon::setOutlineMode ( const   bool  ) 

Set if the polygon is outlined or not

virtual void tlp::GlPolygon::setWithXML ( xmlNodePtr  rootNode  )  [virtual]

Function to set data with XML

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlRect.

virtual void tlp::GlPolygon::translate ( const Coord &  mouvement  )  [virtual]

Translate entity

Reimplemented from tlp::GlSimpleEntity.


Member Data Documentation

std::vector<Color> tlp::GlPolygon::fillColors [protected]
bool tlp::GlPolygon::filled [protected]
std::vector<Color> tlp::GlPolygon::outlineColors [protected]
bool tlp::GlPolygon::outlined [protected]
int tlp::GlPolygon::outlineSize [protected]
std::vector<Coord> tlp::GlPolygon::points [protected]


Tulip Software by LaBRI Visualization Team    2001 - 2010