Tulip  4.8.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::GlSimpleEntity Class Referenceabstract

#include <GlSimpleEntity.h>

+ Inheritance diagram for tlp::GlSimpleEntity:
+ Collaboration diagram for tlp::GlSimpleEntity:

Public Member Functions

 GlSimpleEntity ()
 
virtual ~GlSimpleEntity ()
 
virtual void draw (float lod, Camera *camera)=0
 
virtual BoundingBox getBoundingBox ()
 
int getStencil ()
 
virtual void getXML (std::string &outString)=0
 
bool isVisible () const
 
virtual void setStencil (int stencil)
 
virtual void setVisible (bool visible)
 
virtual void setWithXML (const std::string &inString, unsigned int &currentPosition)=0
 

Protected Attributes

BoundingBox boundingBox
 
std::vector< GlComposite * > parents
 
int stencil
 
bool visible
 

Detailed Description

Base class for all Tulip OpenGL entities.

Other Tulip entities inherit for this class.

You don't have to create a GlSimpleEntity, you have to use GlLine, GlRect or GlSphere for example

See Also
Gl2DRect
GlPolygon
GlAxis
GlBezierCurve
GlBox
GlCatmullRomCurve
GlCircle
GlComplexPolygon
GlGrid
GlHexagon
GlLabel
GlSphere
GlPentagon
GlTriangle
GlOpenUniformCubicBSpline

To GlSimpleEntity manipulation :

See Also
GlLayer
GlScene

Definition at line 62 of file GlSimpleEntity.h.

Constructor & Destructor Documentation

tlp::GlSimpleEntity::GlSimpleEntity ( )
inline

Constructor.

Definition at line 69 of file GlSimpleEntity.h.

virtual tlp::GlSimpleEntity::~GlSimpleEntity ( )
virtual

Destructor.

Member Function Documentation

virtual void tlp::GlSimpleEntity::draw ( float  lod,
Camera camera 
)
pure virtual

Draw function.

Warning
You don't have to call this function, the Tulip OpenGL engine call it.

Implemented in tlp::GlLabel, tlp::GlRect, tlp::GlComplexPolygon, tlp::Gl2DRect, tlp::GlBox, tlp::GlSphere, and tlp::GlGrid.

virtual BoundingBox tlp::GlSimpleEntity::getBoundingBox ( )
inlinevirtual

Return the entity boundingbox.

Warning
You don't have to call this function, the Tulip OpenGL engine call it.

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

Definition at line 118 of file GlSimpleEntity.h.

int tlp::GlSimpleEntity::getStencil ( )
inline

Return stencil number of entity.

See Also
setStencil()

Definition at line 102 of file GlSimpleEntity.h.

virtual void tlp::GlSimpleEntity::getXML ( std::string &  outString)
pure virtual

Save the entity in outString (in XML format)

Warning
You don't have to call this function, the Tulip OpenGL engine call it.

Implemented in tlp::GlLabel, tlp::GlComplexPolygon, tlp::GlGraphComposite, tlp::GlBox, tlp::GlComposite, tlp::GlSphere, tlp::Gl2DRect, tlp::GlGrid, and tlp::GlCircle.

bool tlp::GlSimpleEntity::isVisible ( ) const
inline

Return if entity is visible.

Definition at line 83 of file GlSimpleEntity.h.

virtual void tlp::GlSimpleEntity::setStencil ( int  stencil)
inlinevirtual

Set stencil number of the entity.

Stencil is an OpenGl system to ensure that other entity can't be displayed above this entity; it's a "guaranted visibility" system. A small number causes a guaranted visibility Default value in Tulip is 0xFFFF (greater integer) And when we have stencil on entity value is 0x2

Reimplemented in tlp::GlComposite.

Definition at line 94 of file GlSimpleEntity.h.

virtual void tlp::GlSimpleEntity::setVisible ( bool  visible)
virtual

Set if entity is visible.

virtual void tlp::GlSimpleEntity::setWithXML ( const std::string &  inString,
unsigned int &  currentPosition 
)
pure virtual

Load entity with inString (in XML format)

Warning
You don't have to call this function, the Tulip OpenGL engine call it.

Implemented in tlp::GlLabel, tlp::GlComplexPolygon, tlp::GlGraphComposite, tlp::GlBox, tlp::GlComposite, tlp::GlSphere, tlp::Gl2DRect, and tlp::GlGrid.