Tulip  5.3.1
Large graphs analysis and drawing
tlp::GlSphere Class Reference

#include <GlSphere.h>

+ Inheritance diagram for tlp::GlSphere:
+ Collaboration diagram for tlp::GlSphere:

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)
 
void draw (float lod, Camera *camera) override
 
const Color & getColor () const
 
const Coord & getPosition () const
 
void getXML (std::string &outString) override
 
void setColor (const Color &newColor)
 
void setPosition (const Coord &pos)
 
virtual void setTexture (const std::string &texture)
 
void setWithXML (const std::string &inString, unsigned int &currentPosition) override
 
void translate (const Coord &mouvement) override
 
- Public Member Functions inherited from tlp::GlSimpleEntity
 GlSimpleEntity ()
 
 ~GlSimpleEntity () override
 
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

◆ GlSphere() [1/3]

tlp::GlSphere::GlSphere ( )
inline

Constructor.

Warning
Don't use this constructor

Definition at line 44 of file GlSphere.h.

◆ GlSphere() [2/3]

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)

◆ GlSphere() [3/3]

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

◆ draw()

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

Draw the sphere.

Implements tlp::GlSimpleEntity.

◆ getColor()

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

Get the color.

Definition at line 96 of file GlSphere.h.

◆ getPosition()

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

Get absolute position.

Definition at line 75 of file GlSphere.h.

◆ getXML()

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

Function to export data in outString (in XML format)

Implements tlp::GlSimpleEntity.

◆ setColor()

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

Set the color.

Definition at line 103 of file GlSphere.h.

◆ setPosition()

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

Set absolute position.

Definition at line 82 of file GlSphere.h.

◆ setTexture()

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

Set the texture name.

Definition at line 89 of file GlSphere.h.

◆ setWithXML()

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

Function to set data with inString (in XML format)

Implements tlp::GlSimpleEntity.

◆ translate()

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

Translate entity.