Overview     Modules     Class Hierarchy     Classes     Members  

Utility class to render a quadrilateral . More...

#include <GlQuad.h>

Inheritance diagram for tlp::GlQuad:
Collaboration diagram for tlp::GlQuad:

Public Member Functions

 GlQuad ()
 GlQuad (const Coord &p1, const Coord &p2, const Coord &p3, const Coord &p4, const Color &color)
 GlQuad (const Coord &p1, const Coord &p2, const Coord &p3, const Coord &p4, const Color &c1, const Color &c2, const Color &c3, const Color &c4)
_DEPRECATED GlQuad (const Coord positions[4], const Color &color)
_DEPRECATED GlQuad (const Coord positions[4], const Color colors[4])
virtual ~GlQuad ()
void setPosition (const int idPosition, const Coord &position)
void setColor (const int idColor, const Color &color)
void setColor (const Color &color)
const Coord & getPosition (const int idPosition) const
const Color & getColor (const int idColor) const
virtual void getXML (xmlNodePtr rootNode)
virtual void setWithXML (xmlNodePtr rootNode)
- 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 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 getXMLOnlyData (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

Utility class to render a quadrilateral .

This is an utility class class for rendering a quadrilateral.

Constructor & Destructor Documentation

tlp::GlQuad::GlQuad ( )

Constructor

tlp::GlQuad::GlQuad ( const Coord &  p1,
const Coord &  p2,
const Coord &  p3,
const Coord &  p4,
const Color &  color 
)

Constructor

Initializes a quadrilateral with 4 points winding in clockwise order and a single color.

Parameters
p1the first quad vertex
p2the second quad vertex
p3the third quad vertex
p4the fourth quad vertex
colorA single color indicating the color for every point of the quadrilateral.
tlp::GlQuad::GlQuad ( const Coord &  p1,
const Coord &  p2,
const Coord &  p3,
const Coord &  p4,
const Color &  c1,
const Color &  c2,
const Color &  c3,
const Color &  c4 
)
_DEPRECATED tlp::GlQuad::GlQuad ( const Coord  positions[4],
const Color &  color 
)

Constructor

Parameters
positionsArray indicating the position of the points. The first point is the top-left one. The next points are winding in clockwise order.
colorA single color indicating the color for every point of the Quad.
_DEPRECATED tlp::GlQuad::GlQuad ( const Coord  positions[4],
const Color  colors[4] 
)

Constructor

Parameters
positionsArray indicating the position of the points. The first point is the top-left one. The next points are winding in clockwise order.
colorsArray indicating the color of the points. The order is the same as for the positions.
virtual tlp::GlQuad::~GlQuad ( )
virtual

Destructor

Member Function Documentation

const Color& tlp::GlQuad::getColor ( const int  idColor) const

Accessor in reading to the color.

Parameters
idColorIndicates which point we want to get the color.
const Coord& tlp::GlQuad::getPosition ( const int  idPosition) const

Accessor in reading to the position.

Parameters
idPositionIndicates which point we want to get the position.
virtual void tlp::GlQuad::getXML ( xmlNodePtr  rootNode)
virtual

Function to export data in XML

Reimplemented from tlp::GlAbstractPolygon.

void tlp::GlQuad::setColor ( const int  idColor,
const Color &  color 
)

Accessor in writing to the color.

Parameters
idColorIndicates which point we want to colorize.
void tlp::GlQuad::setColor ( const Color &  color)

Accessor in writing to the basic color of GlAugmentedDisplay

void tlp::GlQuad::setPosition ( const int  idPosition,
const Coord &  position 
)

Accessor in writing to the position.

Parameters
idPositionIndicates which point we want to move.
virtual void tlp::GlQuad::setWithXML ( xmlNodePtr  rootNode)
virtual

Function to set data with XML

Reimplemented from tlp::GlAbstractPolygon.



Tulip Software by LaBRI Visualization Team    2001 - 2012