20 #ifndef Tulip_GLSPHERE_H 
   21 #define Tulip_GLSPHERE_H 
   23 #include <tulip/tulipconf.h> 
   25 #include <tulip/Coord.h> 
   26 #include <tulip/Color.h> 
   28 #include <tulip/GlSimpleEntity.h> 
   52   GlSphere(
const Coord &position, 
float radius, 
const Color &color = Color(0, 0, 0, 255),
 
   53            float rotX = 0, 
float rotY = 0, 
float rotZ = 0);
 
   59   GlSphere(
const Coord &position, 
float radius, 
const std::string &textureFile, 
int alpha = 255,
 
   60            float rotX = 0, 
float rotY = 0, 
float rotZ = 0);
 
   90     textureFile = texture;
 
  110   void getXML(std::string &outString) 
override;
 
  115   void setWithXML(
const std::string &inString, 
unsigned int ¤tPosition) 
override;
 
  118   void generateBuffers(
int space);
 
  123   std::string textureFile;
 
  126   std::vector<unsigned int> buffers;
 
  127   std::vector<float> vertices;
 
  128   std::vector<float> texturesCoord;
 
  129   std::vector<unsigned short> indices;
 
  130   unsigned int verticesCount;
 
Tulip OpenGL camera object.
 
Base class for all Tulip OpenGL entities.
 
Class to create a sphere with GlEntity system.
 
void getXML(std::string &outString) override
Function to export data in outString (in XML format)
 
void translate(const Coord &mouvement) override
Translate entity.
 
const Coord & getPosition() const
Get absolute position.
 
void draw(float lod, Camera *camera) override
Draw the sphere.
 
virtual void setTexture(const std::string &texture)
Set the texture name.
 
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)
 
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)
 
void setColor(const Color &newColor)
Set the color.
 
void setPosition(const Coord &pos)
Set absolute position.
 
void setWithXML(const std::string &inString, unsigned int ¤tPosition) override
Function to set data with inString (in XML format)
 
const Color & getColor() const
Get the color.