Tulip  4.2.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::GlSphere Class Reference

#include <GlSphere.h>

Inherits tlp::GlSimpleEntity.

Public Member Functions

 GlSphere ()
 
 GlSphere (const Coord &position, float radius, const Color &color=Color(0, 0, 0, 255), float rotX=0, float rotY=0, float rotZ=0)
 
 GlSphere (const Coord &position, float radius, const std::string &textureFile, int alpha=255, float rotX=0, float rotY=0, float rotZ=0)
 
virtual void draw (float lod, Camera *camera)
 
const Color & getColor () const
 
const Coord & getPosition () const
 
virtual void getXML (std::string &outString)
 
void setColor (const Color &newColor)
 
void setPosition (const Coord &pos)
 
virtual void setTexture (const std::string &texture)
 
virtual void setWithXML (const std::string &inString, unsigned int &currentPosition)
 
virtual void translate (const Coord &mouvement)
 
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 
virtual ~GlSimpleEntity ()
 
virtual BoundingBox getBoundingBox ()
 
int getStencil ()
 
bool isVisible () const
 
virtual void setStencil (int stencil)
 
virtual void setVisible (bool visible)
 

Additional Inherited Members

- Protected Attributes inherited from tlp::GlSimpleEntity
BoundingBox boundingBox
 
std::vector< GlComposite * > parents
 
int stencil
 
bool visible
 

Detailed Description

Class to create a sphere with GlEntity system.

Definition at line 36 of file GlSphere.h.

Constructor & Destructor Documentation

tlp::GlSphere::GlSphere ( )
inline

Constructor.

Warning
Don't use this constructor

Definition at line 45 of file GlSphere.h.

tlp::GlSphere::GlSphere ( const Coord &  position,
float  radius,
const Color &  color = Color(0, 0, 0, 255),
float  rotX = 0,
float  rotY = 0,
float  rotZ = 0 
)

Create a sphere with a position, a radius a fill color and multiple rotation (if you want)

tlp::GlSphere::GlSphere ( const Coord &  position,
float  radius,
const std::string &  textureFile,
int  alpha = 255,
float  rotX = 0,
float  rotY = 0,
float  rotZ = 0 
)

Create a sphere with a position, a radius, a texture, an alphe and multiple rotation (if you want)

Member Function Documentation

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

Draw the sphere.

Implements tlp::GlSimpleEntity.

const Color& tlp::GlSphere::getColor ( ) const
inline

Get the color.

Definition at line 91 of file GlSphere.h.

const Coord& tlp::GlSphere::getPosition ( ) const
inline

Get absolute position.

Definition at line 70 of file GlSphere.h.

virtual void tlp::GlSphere::getXML ( std::string &  outString)
virtual

Function to export data in outString (in XML format)

Implements tlp::GlSimpleEntity.

void tlp::GlSphere::setColor ( const Color &  newColor)
inline

Set the color.

Definition at line 98 of file GlSphere.h.

void tlp::GlSphere::setPosition ( const Coord &  pos)
inline

Set absolute position.

Definition at line 77 of file GlSphere.h.

virtual void tlp::GlSphere::setTexture ( const std::string &  texture)
inlinevirtual

Set the texture name.

Definition at line 84 of file GlSphere.h.

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

Function to set data with inString (in XML format)

Implements tlp::GlSimpleEntity.

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

Translate entity.