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);
65 void draw(
float lod,
Camera *camera)
override;
70 void translate(
const Coord &mouvement)
override;
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;
134 #endif // Tulip_GLSCENE_H
Base class for all Tulip OpenGL entities.
void setColor(const Color &newColor)
Set the color.
const Coord & getPosition() const
Get absolute position.
virtual void setTexture(const std::string &texture)
Set the texture name.
void setPosition(const Coord &pos)
Set absolute position.
Tulip OpenGL camera object.
Class to create a sphere with GlEntity system.
const Color & getColor() const
Get the color.