23 #ifndef DOXYGEN_NOTFOR_DEVEL 24 #include <tulip/tulipconf.h> 25 #include <tulip/Color.h> 26 #include <tulip/Coord.h> 27 #include <tulip/Size.h> 28 #include <tulip/Matrix.h> 30 #include <tulip/OpenGlIncludes.h> 36 typedef Matrix<float, 4> MatrixGL;
37 TLP_GL_SCOPE
const std::string &glGetErrorDescription(GLuint errorCode);
38 TLP_GL_SCOPE
void glTest(
const std::string &message = std::string(
"(no description)"),
39 int line = -1,
bool throwException =
true);
41 #define GL_TEST(throwEx) glTest(__FILE__, __LINE__, throwEx) 42 #define GL_TEST_ERROR() GL_TEST(false) 43 #define GL_THROW_ON_ERROR() GL_TEST(true) 45 #define GL_TEST(throwEx) 46 #define GL_TEST_ERROR() 47 #define GL_THROW_ON_ERROR() 49 TLP_GL_SCOPE
void setColor(
const Color &c);
50 TLP_GL_SCOPE
void setColor(GLfloat *);
51 TLP_GL_SCOPE
void setMaterial(
const Color &c);
52 TLP_GL_SCOPE
bool cameraIs3D();
57 TLP_GL_SCOPE Coord projectPoint(
const Coord &obj,
const MatrixGL &,
const Vector<int, 4> &viewport);
63 TLP_GL_SCOPE Coord unprojectPoint(
const Coord &obj,
const MatrixGL &,
64 const tlp::Vector<int, 4> &viewport);
65 TLP_GL_SCOPE GLfloat projectSize(
const BoundingBox &bb,
const MatrixGL &,
const MatrixGL &,
66 const Vector<int, 4> &viewport);
67 TLP_GL_SCOPE GLfloat projectSize(
const Coord &position,
const Size &size,
const MatrixGL &,
68 const MatrixGL &,
const Vector<int, 4> &viewport);
69 TLP_GL_SCOPE
float calculateAABBSize(
const BoundingBox &bb,
const Coord &eye,
70 const Matrix<float, 4> &transformMatrix,
71 const Vector<int, 4> &globalViewport,
72 const Vector<int, 4> ¤tViewport);
73 TLP_GL_SCOPE
float calculate2DLod(
const BoundingBox &bb,
const Vector<int, 4> &globalViewport,
74 const Vector<int, 4> ¤tViewport);
88 TLP_GL_SCOPE std::vector<Coord> computeNormals(
const std::vector<Coord> &vertices,
89 const std::vector<unsigned short> &facesIndices);
103 TLP_GL_SCOPE std::vector<Coord> computeNormals(
const std::vector<Coord> &vertices,
104 const std::vector<unsigned int> &facesIndices);
107 #endif // DOXYGEN_NOTFOR_DEVEL