Overview     Modules     Class Hierarchy     Classes     Members  

General class used to render boxes as GlEntity. More...

#include <GlBox.h>

Inheritance diagram for tlp::GlBox:
Collaboration diagram for tlp::GlBox:

Public Member Functions

 GlBox ()
 GlBox (const Coord &position, const Size &size, const Color &fillColor, const Color &outlineColor, bool filled=true, bool outlined=true, const std::string &textureName="", float outlineSize=1.)
virtual ~GlBox ()
virtual void draw (float lod, Camera *camera)
Size getSize () const
void setSize (const Size &size)
Coord * getPosition () const
void setPosition (const Coord &position)
Color getFillColor () const
void setFillColor (const Color &color)
Color getOutlineColor () const
void setOutlineColor (const Color &color)
float getOutlineSize () const
void setOutlineSize (float size)
std::string getTextureName () const
void setTextureName (const std::string &textureName)
virtual void translate (const Coord &mouvement)
virtual void getXML (xmlNodePtr rootNode)
virtual void setWithXML (xmlNodePtr rootNode)
- 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

virtual void clearGenerated ()

Protected Attributes

Coord position
Size size
std::vector< Color > fillColors
std::vector< Color > outlineColors
bool filled
bool outlined
std::string textureName
float outlineSize
float * newCubeCoordArrays
bool generated
GLuint buffers [5]
- Protected Attributes inherited from tlp::GlSimpleEntity
bool visible
int stencil
bool checkByBoundingBoxVisitor
BoundingBox boundingBox
std::vector< GlComposite * > parents

Detailed Description

General class used to render boxes as GlEntity.

This class is a generic class to render boxes as GlEntity.

Constructor & Destructor Documentation

tlp::GlBox::GlBox ( )

The default constructor

Attention
It's usage is forbidden.
tlp::GlBox::GlBox ( const Coord &  position,
const Size &  size,
const Color &  fillColor,
const Color &  outlineColor,
bool  filled = true,
bool  outlined = true,
const std::string &  textureName = "",
float  outlineSize = 1. 
)

Constructor from size

Parameters
positionThe center of the box.
sizeThe length of each dimension of the box.
fillColorThe fill color of the box.
outlineColorThe outline color of the box
filledFill the box ?
outlinedoutline the box ?
outlineSizeThe size of the outline
virtual tlp::GlBox::~GlBox ( )
virtual

Destructor.

Member Function Documentation

virtual void tlp::GlBox::clearGenerated ( )
protectedvirtual
virtual void tlp::GlBox::draw ( float  lod,
Camera camera 
)
virtual

Virtual function used to draw the box.

Implements tlp::GlSimpleEntity.

Color tlp::GlBox::getFillColor ( ) const

Accessor in reading to the fill color.

Color tlp::GlBox::getOutlineColor ( ) const

Accessor in reading to the outline color.

float tlp::GlBox::getOutlineSize ( ) const

Accessor in reading to the outline size.

Coord* tlp::GlBox::getPosition ( ) const

Accessor in reading to the position.

Size tlp::GlBox::getSize ( ) const

Accessor in reading to the size.

std::string tlp::GlBox::getTextureName ( ) const

Accessor in reading to the texture name.

virtual void tlp::GlBox::getXML ( xmlNodePtr  rootNode)
virtual

Function to export data in XML

Implements tlp::GlSimpleEntity.

void tlp::GlBox::setFillColor ( const Color &  color)

Accessor in writing to the fill color of the box

void tlp::GlBox::setOutlineColor ( const Color &  color)

Accessor in writing to the outline color of the box

void tlp::GlBox::setOutlineSize ( float  size)

Accessor in writing to the outline size of the box

void tlp::GlBox::setPosition ( const Coord &  position)

Accessor in writing to the position.

void tlp::GlBox::setSize ( const Size &  size)

Accessor in writing to the size of the box

void tlp::GlBox::setTextureName ( const std::string &  textureName)

Accessor in writing to the texture name of the box

virtual void tlp::GlBox::setWithXML ( xmlNodePtr  rootNode)
virtual

Function to set data with XML

Implements tlp::GlSimpleEntity.

virtual void tlp::GlBox::translate ( const Coord &  mouvement)
virtual

Translate entity

Reimplemented from tlp::GlSimpleEntity.

Member Data Documentation

GLuint tlp::GlBox::buffers[5]
protected
std::vector<Color> tlp::GlBox::fillColors
protected

fillColor of the box

bool tlp::GlBox::filled
protected

the box is filled ?

bool tlp::GlBox::generated
protected
float* tlp::GlBox::newCubeCoordArrays
protected
std::vector<Color> tlp::GlBox::outlineColors
protected

outlineColor of the box

bool tlp::GlBox::outlined
protected

the box is outlined ?

float tlp::GlBox::outlineSize
protected

size of the ouline

Coord tlp::GlBox::position
protected

The position of the center of the box

Size tlp::GlBox::size
protected

size is the "radius" of the box

std::string tlp::GlBox::textureName
protected


Tulip Software by LaBRI Visualization Team    2001 - 2012