Overview | Modules | Class Hierarchy | Classes | Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
tlp::GlAbstractPolygon Class Reference
GlEntities

`#include <GlAbstractPolygon.h>`

Inheritance diagram for tlp::GlAbstractPolygon:
[legend]
Collaboration diagram for tlp::GlAbstractPolygon:
[legend]

List of all members.

## Public Types

- enum PolygonMode { POLYGON = 0, QUAD_STRIP = 1 }

## Public Member Functions

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

## Protected Member Functions

- 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

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

## Member Enumeration Documentation

enum tlp::GlAbstractPolygon::PolygonMode

Enumerator:

  POLYGON |
  QUAD_STRIP |

## Constructor & Destructor Documentation

tlp::GlAbstractPolygon::GlAbstractPolygon | ( |  | ) |

Constructor

virtual tlp::GlAbstractPolygon::~GlAbstractPolygon | ( |  | ) | `[virtual]`

Default empty destructor

## Member Function Documentation

virtual void tlp::GlAbstractPolygon::clearGenerated | ( |  | ) | `[protected, virtual]`

Clear previously generated VBO

virtual void tlp::GlAbstractPolygon::draw | ( | float | lod,
|  | Camera * | camera
| ) |  | `[virtual]`

Draw the polygon

Implements tlp::GlSimpleEntity.

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

const Color& tlp::GlAbstractPolygon::fcolor | ( | const unsigned int | i | ) | const

return the ith color used for filling the polygon

Deprecated:
  use getFillColor

Reimplemented in tlp::GlCircle.

Color& tlp::GlAbstractPolygon::fcolor | ( | const unsigned int | i | ) |

return the ith color used for filling the polygon

Deprecated:
  use getFillColor

Reimplemented in tlp::GlCircle.

Color tlp::GlAbstractPolygon::getFillColor | ( | unsigned int | i | ) |

Get the ith color used to filling the polygon

bool tlp::GlAbstractPolygon::getFillMode | ( |  | ) |

Get if the polygon is filled or not

float tlp::GlAbstractPolygon::getHideOutlineLod | ( |  | ) |

Get the lod outline value, below this lod value outline will not be displayed

bool tlp::GlAbstractPolygon::getLightingMode | ( |  | ) |

Get if the polygon use light or not

Color tlp::GlAbstractPolygon::getOutlineColor | ( | unsigned int | i | ) |

Get the ith color used to outlining the polygon

bool tlp::GlAbstractPolygon::getOutlineMode | ( |  | ) |

Get if the polygon is outlined or not

float tlp::GlAbstractPolygon::getOutlineSize | ( |  | ) |

Get the outline size

PolygonMode tlp::GlAbstractPolygon::getPolygonMode | ( |  | ) |

Get the polygon mode (see PolygonMode enum)

std::string tlp::GlAbstractPolygon::getTextureName | ( |  | ) |

Get the textureName

virtual void tlp::GlAbstractPolygon::getXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`

Function to export data and type in XML

Implements tlp::GlSimpleEntity.

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

virtual void tlp::GlAbstractPolygon::getXMLOnlyData | ( | xmlNodePtr | rootNode | ) | `[virtual]`

Function to export data in XML

const Color& tlp::GlAbstractPolygon::ocolor | ( | const unsigned int | i | ) | const

return the ith color used for outlining the polygon

Deprecated:
  use getOutlineColor

Reimplemented in tlp::GlCircle.

virtual Color& tlp::GlAbstractPolygon::ocolor | ( | const unsigned int | i | ) | `[virtual]`

return the ith color used for outlining the polygon

Deprecated:
  use getOutlineColor

Reimplemented in tlp::GlCircle.

virtual void tlp::GlAbstractPolygon::recomputeBoundingBox | ( |  | ) | `[protected, virtual]`

Clear previous bounding box and expand bounding box with polygons' points

void tlp::GlAbstractPolygon::setFColor | ( | const unsigned int | i,
|  | const Color & | color
| ) |  |

Set the ith color used for filling the polygon

Deprecated:
  use setFillColor

void tlp::GlAbstractPolygon::setFillColor | ( | unsigned int | i,
|  | const Color & | color
| ) |  |

Set the ith color used to filling the polygon

void tlp::GlAbstractPolygon::setFillColor | ( | const Color & | color | ) |

Set color used to filling the whole polygon

virtual void tlp::GlAbstractPolygon::setFillColors | ( | const std::vector< Color > & | colors | ) | `[protected, virtual]`

set fill colors of the polygon

void tlp::GlAbstractPolygon::setFillMode | ( | const bool |  | ) |

Set if the polygon is filled or not

void tlp::GlAbstractPolygon::setHideOutlineLod | ( | float | lod | ) |

Set the lod outline value, below this lod value outline will not be displayed

void tlp::GlAbstractPolygon::setLightingMode | ( | const bool |  | ) |

Set if the polygon use light or not

virtual void tlp::GlAbstractPolygon::setOColor | ( | const unsigned int | i,
|  | const Color & | color
| ) |  | `[virtual]`

Set the ith color used for outlining the polygon

Deprecated:
  use setOutlineColor

void tlp::GlAbstractPolygon::setOutlineColor | ( | unsigned int | i,
|  | const Color & | color
| ) |  |

Set the ith color used to outlining the polygon

void tlp::GlAbstractPolygon::setOutlineColor | ( | const Color & | color | ) |

Set the color used to outlining the whole polygon

virtual void tlp::GlAbstractPolygon::setOutlineColors | ( | const std::vector< Color > & | colors | ) | `[protected, virtual]`

set outline colors of the polygon

void tlp::GlAbstractPolygon::setOutlineMode | ( | const bool |  | ) |

Set if the polygon is outlined or not

void tlp::GlAbstractPolygon::setOutlineSize | ( | float | size | ) |

Set the outline size

virtual void tlp::GlAbstractPolygon::setPoint | ( | unsigned int | index,
|  | const Coord & | point
| ) |  | `[protected, virtual]`

set ith Coord of the polygon

virtual void tlp::GlAbstractPolygon::setPoints | ( | const std::vector< Coord > & | points | ) | `[protected, virtual]`

set Coords of the polygon

void tlp::GlAbstractPolygon::setPolygonMode | ( | PolygonMode | mode | ) |

Set the polygon mode (see PolygonMode enum)

void tlp::GlAbstractPolygon::setTextureName | ( | const std::string & | name | ) |

Set the textureName

virtual void tlp::GlAbstractPolygon::setWithXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`

Function to set data with XML

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::Gl2DRect, tlp::GlQuad, and tlp::GlRect.

virtual void tlp::GlAbstractPolygon::translate | ( | const Coord & | mouvement | ) | `[virtual]`

Translate entity

Reimplemented from tlp::GlSimpleEntity.

Reimplemented in tlp::Gl2DRect.

## Member Data Documentation

GLubyte* tlp::GlAbstractPolygon::auxIndices`[protected]`

GLuint tlp::GlAbstractPolygon::buffers[7]`[protected]`

std::vector<Color> tlp::GlAbstractPolygon::fillColors`[protected]`

bool tlp::GlAbstractPolygon::filled`[protected]`

bool tlp::GlAbstractPolygon::generated`[protected]`

float tlp::GlAbstractPolygon::hideOutlineLod`[protected]`

GLubyte* tlp::GlAbstractPolygon::indices`[protected]`

bool tlp::GlAbstractPolygon::invertYTexture`[protected]`

bool tlp::GlAbstractPolygon::lighting`[protected]`

std::vector<Coord> tlp::GlAbstractPolygon::normalArray`[protected]`

std::vector<Color> tlp::GlAbstractPolygon::outlineColors`[protected]`

bool tlp::GlAbstractPolygon::outlined`[protected]`

float tlp::GlAbstractPolygon::outlineSize`[protected]`

std::vector<Coord> tlp::GlAbstractPolygon::points`[protected]`

PolygonMode tlp::GlAbstractPolygon::polygonMode`[protected]`

GLfloat* tlp::GlAbstractPolygon::texArray`[protected]`

std::string tlp::GlAbstractPolygon::textureName`[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2012