Commit eadfb56d authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'develop' into 'develop'

Develop

See merge request !63
parents acfee411 b5f3f45d
...@@ -40,7 +40,7 @@ qt_wrap_cpp( viewer_moc viewer.h ) ...@@ -40,7 +40,7 @@ qt_wrap_cpp( viewer_moc viewer.h )
add_executable( viewer viewer.cpp ${viewer_moc} ${viewer_ui} ) add_executable( viewer viewer.cpp ${viewer_moc} ${viewer_ui} )
target_link_libraries( viewer ${CGoGN_LIBS} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( viewer ${CGoGN_LIBS} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} )
IF (CGoGN_GCC_4_9) IF (HAS_CPP11_REGEX)
qt_wrap_ui( clipping_ui clipping.ui ) qt_wrap_ui( clipping_ui clipping.ui )
qt_wrap_cpp( clipping_moc clipping.h ) qt_wrap_cpp( clipping_moc clipping.h )
add_executable( clipping clipping.cpp ${clipping_ui} ${clipping_moc} ) add_executable( clipping clipping.cpp ${clipping_ui} ${clipping_moc} )
......
...@@ -94,6 +94,12 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs) ; ...@@ -94,6 +94,12 @@ void quadranguleFaces(typename PFP::MAP& map, EMBV& attributs) ;
template <typename PFP, typename EMBV> template <typename PFP, typename EMBV>
void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs) ; void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs) ;
/**
* Interpolant Catmull-Clark subdivision scheme
*/
template <typename PFP, typename EMBV>
void CatmullClarkInterpolSubdivision(typename PFP::MAP& map, EMBV& attributs);
/** /**
* Loop subdivision scheme * Loop subdivision scheme
*/ */
......
...@@ -536,8 +536,11 @@ void MapRender::initPrimitives(typename PFP::MAP& map, int prim, const VertexAtt ...@@ -536,8 +536,11 @@ void MapRender::initPrimitives(typename PFP::MAP& map, int prim, const VertexAtt
m_indexBufferUpToDate[prim] = true; m_indexBufferUpToDate[prim] = true;
// setup du buffer d'indices // setup du buffer d'indices
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[prim]); if (m_nbIndices[prim] > 0)
glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_nbIndices[prim] * sizeof(GLuint), &(tableIndices[0]), GL_STREAM_DRAW); {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_indexBuffers[prim]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_nbIndices[prim] * sizeof(GLuint), &(tableIndices[0]), GL_STREAM_DRAW);
}
} }
template <typename PFP> template <typename PFP>
......
...@@ -75,7 +75,7 @@ void set_eval_direction (vec3 v) ...@@ -75,7 +75,7 @@ void set_eval_direction (vec3 v)
void main (void) void main (void)
{ {
int size = (textureSize(texture,0)).x; // supposed square matrix int size = (textureSize(texture,0)).x; // supposed square matrix
vec3 eyeV = normalize(camera - vxPos); // normalized outgoing line-of-sight vector vec3 eyeV = normalize(camera - vxPos); // normalized outgoing line-of-sight vector
eyeV = 2*dot(vxNorm,eyeV)*vxNorm-eyeV ; // symmetrize eyeV = 2*dot(vxNorm,eyeV)*vxNorm-eyeV ; // symmetrize
......
...@@ -67,6 +67,9 @@ public: ...@@ -67,6 +67,9 @@ public:
unsigned int setAttributePosition(VBO* vbo); unsigned int setAttributePosition(VBO* vbo);
void setClippingPlane(const Geom::Vec4f& plane); void setClippingPlane(const Geom::Vec4f& plane);
inline void setNoClippingPlane() { setClippingPlane(Geom::Vec4f(0.0f,0.0f,0.0f,0.0f)); }
}; };
} // namespace Utils } // namespace Utils
......
...@@ -39,41 +39,43 @@ namespace CGoGN ...@@ -39,41 +39,43 @@ namespace CGoGN
namespace Utils namespace Utils
{ {
#ifdef CGOGN_USE_OGL_CORE_PROFILE //#ifdef CGOGN_USE_OGL_CORE_PROFILE
unsigned int GLSLShader::CURRENT_OGL_VERSION = 3; //unsigned int GLSLShader::CURRENT_OGL_VERSION = 3;
unsigned int GLSLShader::MAJOR_OGL_CORE = 3; //unsigned int GLSLShader::MAJOR_OGL_CORE = 3;
unsigned int GLSLShader::MINOR_OGL_CORE = 3; //unsigned int GLSLShader::MINOR_OGL_CORE = 3;
#else //#else
unsigned int GLSLShader::CURRENT_OGL_VERSION = 2; //unsigned int GLSLShader::CURRENT_OGL_VERSION = 2;
unsigned int GLSLShader::MAJOR_OGL_CORE = 2; //unsigned int GLSLShader::MAJOR_OGL_CORE = 2;
unsigned int GLSLShader::MINOR_OGL_CORE = 1; //unsigned int GLSLShader::MINOR_OGL_CORE = 1;
#endif //#endif
std::string GLSLShader::DEFINES_GL2=\
"#version 110\n"
"#define PRECISION float pipo_PRECISION\n" //std::string GLSLShader::DEFINES_GL2=\
"#define ATTRIBUTE attribute\n" //"#version 110\n"
"#define VARYING_VERT varying\n" //"#define PRECISION float pipo_PRECISION\n"
"#define VARYING_FRAG varying\n" //"#define ATTRIBUTE attribute\n"
"#define FRAG_OUT_DEF float pipo_FRAGDEF\n" //"#define VARYING_VERT varying\n"
"#define FRAG_OUT gl_FragColor\n" //"#define VARYING_FRAG varying\n"
"#define INVARIANT_POS float pipo_INVARIANT\n" //"#define FRAG_OUT_DEF float pipo_FRAGDEF\n"
"#define TEXTURE2D texture2D\n" //"#define FRAG_OUT gl_FragColor\n"
; //"#define INVARIANT_POS float pipo_INVARIANT\n"
//"#define TEXTURE2D texture2D\n";
std::string GLSLShader::DEFINES_GL3=\
"#version 330\n"
"#define PRECISION precision highp float\n" //std::string GLSLShader::DEFINES_GL3=\
"#define ATTRIBUTE in\n" //"#version 150\n"
"#define VARYING_VERT out\n" //"#define PRECISION precision highp float\n"
"#define VARYING_FRAG in\n" //"#define ATTRIBUTE in\n"
"#define FRAG_OUT_DEF out vec4 outFragColor\n" //"#define VARYING_VERT out\n"
"#define FRAG_OUT outFragColor\n" //"#define VARYING_FRAG in\n"
"#define INVARIANT_POS invariant gl_Position\n" //"#define FRAG_OUT_DEF out vec4 outFragColor\n"
"#define TEXTURE2D texture\n" //"#define FRAG_OUT outFragColor\n"
; //"#define INVARIANT_POS invariant gl_Position\n"
//"#define TEXTURE2D texture\n";
std::string* GLSLShader::DEFINES_GL = NULL;
//std::string* GLSLShader::DEFINES_GL = NULL;
std::vector<std::string> GLSLShader::m_pathes; std::vector<std::string> GLSLShader::m_pathes;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* Contact information: cgogn@unistra.fr * * Contact information: cgogn@unistra.fr *
* * * *
*******************************************************************************/ *******************************************************************************/
#define CGoGN_UTILS_DLL_EXPORT 1 #define CGoGN_UTILS_DLL_EXPORT 1
#include <GL/glew.h> #include <GL/glew.h>
#include "Utils/Shaders/shaderPhong.h" #include "Utils/Shaders/shaderPhong.h"
...@@ -37,6 +36,7 @@ namespace Utils ...@@ -37,6 +36,7 @@ namespace Utils
#include "shaderPhongClip.vert" #include "shaderPhongClip.vert"
#include "shaderPhongClip.frag" #include "shaderPhongClip.frag"
ShaderPhong::ShaderPhong(bool withClipping, bool doubleSided, bool withEyePosition): ShaderPhong::ShaderPhong(bool withClipping, bool doubleSided, bool withEyePosition):
m_with_color(false), m_with_color(false),
m_with_eyepos(withEyePosition), m_with_eyepos(withEyePosition),
...@@ -54,17 +54,30 @@ ShaderPhong::ShaderPhong(bool withClipping, bool doubleSided, bool withEyePositi ...@@ -54,17 +54,30 @@ ShaderPhong::ShaderPhong(bool withClipping, bool doubleSided, bool withEyePositi
std::string glxvert(GLSLShader::defines_gl()); std::string glxvert(GLSLShader::defines_gl());
std::string glxfrag(GLSLShader::defines_gl()); std::string glxfrag(GLSLShader::defines_gl());
// get choose GL defines (2 or 3) if (withClipping)
// ans compile shaders {
std::string glxvert(GLSLShader::defines_gl()); m_nameVS = "ShaderPhongClip_vs";
if (m_with_eyepos) m_nameFS = "ShaderPhongClip_fs";
glxvert.append("#define WITH_EYEPOSITION"); if (m_with_eyepos)
glxvert.append(vertexShaderText); glxvert.append("#define WITH_EYEPOSITION");
std::string glxfrag(GLSLShader::defines_gl()); glxvert.append(vertexShaderClipText);
// Use double sided lighting if set // Use double sided lighting if set
if (doubleSided) if (doubleSided)
glxfrag.append("#define DOUBLE_SIDED\n"); glxfrag.append("#define DOUBLE_SIDED\n");
glxfrag.append(fragmentShaderText); glxfrag.append(fragmentShaderClipText);
}
else
{
m_nameVS = "ShaderPhong_vs";
m_nameFS = "ShaderPhong_fs";
if (m_with_eyepos)
glxvert.append("#define WITH_EYEPOSITION");
glxvert.append(vertexShaderText);
// Use double sided lighting if set
if (doubleSided)
glxfrag.append("#define DOUBLE_SIDED\n");
glxfrag.append(fragmentShaderText);
}
loadShadersFromMemory(glxvert.c_str(), glxfrag.c_str()); loadShadersFromMemory(glxvert.c_str(), glxfrag.c_str());
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* Contact information: cgogn@unistra.fr * * Contact information: cgogn@unistra.fr *
* * * *
*******************************************************************************/ *******************************************************************************/
#define CGoGN_UTILS_DLL_EXPORT 1 #define CGoGN_UTILS_DLL_EXPORT 1
#include <GL/glew.h> #include <GL/glew.h>
#include "Utils/Shaders/shaderSimpleFlat.h" #include "Utils/Shaders/shaderSimpleFlat.h"
...@@ -37,6 +36,8 @@ namespace Utils ...@@ -37,6 +36,8 @@ namespace Utils
#include "shaderSimpleFlatClip.vert" #include "shaderSimpleFlatClip.vert"
#include "shaderSimpleFlatClip.frag" #include "shaderSimpleFlatClip.frag"
ShaderSimpleFlat::ShaderSimpleFlat(bool withClipping, bool doubleSided): ShaderSimpleFlat::ShaderSimpleFlat(bool withClipping, bool doubleSided):
m_with_color(false), m_with_color(false),
m_ambiant(Geom::Vec4f(0.05f,0.05f,0.1f,0.0f)), m_ambiant(Geom::Vec4f(0.05f,0.05f,0.1f,0.0f)),
...@@ -47,18 +48,8 @@ ShaderSimpleFlat::ShaderSimpleFlat(bool withClipping, bool doubleSided): ...@@ -47,18 +48,8 @@ ShaderSimpleFlat::ShaderSimpleFlat(bool withClipping, bool doubleSided):
m_vboColor(NULL), m_vboColor(NULL),
m_planeClip(Geom::Vec4f(0.0f,0.0f,0.0f,0.0f)) m_planeClip(Geom::Vec4f(0.0f,0.0f,0.0f,0.0f))
{ {
m_nameVS = "ShaderSimpleFlat_vs";
m_nameFS = "ShaderSimpleFlat_fs";
// m_nameGS = "ShaderSimpleFlat_gs";
// get choose GL defines (2 or 3)
// ans compile shaders
std::string glxvert(GLSLShader::defines_gl()); std::string glxvert(GLSLShader::defines_gl());
glxvert.append(vertexShaderText);
std::string glxfrag(GLSLShader::defines_gl()); std::string glxfrag(GLSLShader::defines_gl());
if (doubleSided)
glxfrag.append("#define DOUBLE_SIDED\n");
glxfrag.append(fragmentShaderText);
if (withClipping) if (withClipping)
{ {
...@@ -126,6 +117,7 @@ void ShaderSimpleFlat::setDiffuse(const Geom::Vec4f& diffuse) ...@@ -126,6 +117,7 @@ void ShaderSimpleFlat::setDiffuse(const Geom::Vec4f& diffuse)
unbind(); unbind();
} }
void ShaderSimpleFlat::setLightPosition(const Geom::Vec3f& lightPos) void ShaderSimpleFlat::setLightPosition(const Geom::Vec3f& lightPos)
{ {
bind(); bind();
...@@ -134,6 +126,7 @@ void ShaderSimpleFlat::setLightPosition(const Geom::Vec3f& lightPos) ...@@ -134,6 +126,7 @@ void ShaderSimpleFlat::setLightPosition(const Geom::Vec3f& lightPos)
unbind(); unbind();
} }
void ShaderSimpleFlat::setBackColor(const Geom::Vec4f& back) void ShaderSimpleFlat::setBackColor(const Geom::Vec4f& back)
{ {
bind(); bind();
...@@ -142,6 +135,7 @@ void ShaderSimpleFlat::setBackColor(const Geom::Vec4f& back) ...@@ -142,6 +135,7 @@ void ShaderSimpleFlat::setBackColor(const Geom::Vec4f& back)
unbind(); unbind();
} }
void ShaderSimpleFlat::setParams(const Geom::Vec4f& ambiant, const Geom::Vec4f& diffuse, const Geom::Vec3f& lightPos) void ShaderSimpleFlat::setParams(const Geom::Vec4f& ambiant, const Geom::Vec4f& diffuse, const Geom::Vec3f& lightPos)
{ {
m_ambiant = ambiant; m_ambiant = ambiant;
...@@ -231,6 +225,8 @@ void ShaderSimpleFlat::setClippingPlane(const Geom::Vec4f& plane) ...@@ -231,6 +225,8 @@ void ShaderSimpleFlat::setClippingPlane(const Geom::Vec4f& plane)
} }
} }
} // namespace Utils } // namespace Utils
} // namespace CGoGN } // namespace CGoGN
...@@ -46,8 +46,6 @@ namespace Utils ...@@ -46,8 +46,6 @@ namespace Utils
* *
***********************************************/ ***********************************************/
#ifdef CGOGN_GCC_4_9
ShaderMutator::ShaderMutator(const std:: string& shaderName, const std::string& vertShaderSrc, const std::string& fragShaderSrc, const std::string& geomShaderSrc) ShaderMutator::ShaderMutator(const std:: string& shaderName, const std::string& vertShaderSrc, const std::string& fragShaderSrc, const std::string& geomShaderSrc)
{ {
...@@ -790,106 +788,6 @@ bool ShaderMutator::srcInsertCodeAtMainFunctionEnd(const std::string& insertedCo ...@@ -790,106 +788,6 @@ bool ShaderMutator::srcInsertCodeAtMainFunctionEnd(const std::string& insertedCo
return true; return true;
} }
#else
ShaderMutator::ShaderMutator(const std:: string& /*shaderName*/, const std::string& /*vertShaderSrc*/, const std::string& /*fragShaderSrc*/, const std::string& /*geomShaderSrc*/)
{
}
bool ShaderMutator::containsVariableDeclaration(shaderSrcType /*srcType*/, const std::string& /*variableName*/)
{
bool result = false;
return result;
}
bool ShaderMutator::setMinShadingLanguageVersion(shaderSrcType /*srcType*/, int /*version*/)
{
bool result = false;
return result;
}
bool ShaderMutator::changeIntConstantValue(shaderSrcType /*srcType*/, const std::string& /*constantName*/, int /*newVal*/)
{
return true;
}
bool ShaderMutator::changeFloatConstantValue(shaderSrcType /*srcType*/, const std::string& /*constantName*/, float /*newVal*/)
{
return true;
}
bool ShaderMutator::insertCodeBeforeMainFunction(shaderSrcType /*srcType*/, const std::string& /*insertedCode*/)
{
return true;
}
bool ShaderMutator::insertCodeAtMainFunctionBeginning(shaderSrcType /*srcType*/, const std::string& /*insertedCode*/)
{
return true;
}
bool ShaderMutator::insertCodeAtMainFunctionEnd(shaderSrcType /*srcType*/, const std::string& /*insertedCode*/)
{
return true;
}
/***********************************************
*
* Private Section
*
***********************************************/
bool ShaderMutator::srcIsCommented(size_t /*pos*/, const std::string& /*src*/)
{
return false;
}
bool ShaderMutator::srcIsOneLineCommented(size_t /*pos*/, const std::string& /*src*/)
{
return false;
}
bool ShaderMutator::srcContainsVariableDeclaration(const std::string& /*variableName*/, std::string& /*src*/)
{
return false;
}
bool ShaderMutator::srcSetMinShadingLanguageVersion(int /*version*/, std::string& /*modifiedSrc*/)
{
return true;
}
bool ShaderMutator::srcChangeIntConstantValue(int /*newVal*/, const std::string& /*constantName*/, std::string& /*modifiedSrc*/)
{
return false;
}
bool ShaderMutator::srcChangeFloatConstantValue(float /*newVal*/, const std::string& /*constantName*/, std::string& /*modifiedSrc*/)
{
return false;
}
bool ShaderMutator::srcInsertCodeBeforeMainFunction(const std::string& /*insertedCode*/, std::string& /*modifiedSrc*/)
{
return false;
}
bool ShaderMutator::srcInsertCodeAtMainFunctionBeginning(const std::string& /*insertedCode*/, std::string& /*modifiedSrc*/)
{
return false;
}
bool ShaderMutator::srcInsertCodeAtMainFunctionEnd(const std::string& /*insertedCode*/, std::string& /*modifiedSrc*/)
{
return true;
}
#endif
} // namespace Utils } // namespace Utils
} // namespace CGoGN } // namespace CGoGN
...@@ -35,12 +35,6 @@ IF (WIN32) ...@@ -35,12 +35,6 @@ IF (WIN32)
SET ( CGoGN_WITH_QTCREATOR OFF CACHE BOOL "use QtCreator to compile (Experimental" ) SET ( CGoGN_WITH_QTCREATOR OFF CACHE BOOL "use QtCreator to compile (Experimental" )
ENDIF() ENDIF()
IF (LINUX)
SET ( CGoGN_GCC_4_9 OFF CACHE BOOL "using gcc version > 4.9 (std::regex ok !)" )
ENDIF()
SET ( BUILD_SHARED_LIBS ON CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
checkCpp11Support() checkCpp11Support()
checkCpp11Feature("regex" HAS_CPP11_REGEX "False") checkCpp11Feature("regex" HAS_CPP11_REGEX "False")
...@@ -172,8 +166,12 @@ IF(WIN32) ...@@ -172,8 +166,12 @@ IF(WIN32)
ENDIF () ENDIF ()
IF (CGoGN_GCC_4_9) IF (APPLE)
LIST(APPEND CGoGN_DEFS -DCGOGN_GCC_4_9) LIST(APPEND CGoGN_DEFS -DCGOGN_APPLE)
ENDIF ()
IF (HAS_CPP11_REGEX)
LIST(APPEND CGoGN_DEFS -DHAS_CPP11_REGEX)
ENDIF () ENDIF ()
......
...@@ -28,7 +28,7 @@ ADD_SUBDIRECTORY(surface_modelisation) ...@@ -28,7 +28,7 @@ ADD_SUBDIRECTORY(surface_modelisation)
ADD_SUBDIRECTORY(surface_distance) ADD_SUBDIRECTORY(surface_distance)
ADD_SUBDIRECTORY(surface_radiance) ADD_SUBDIRECTORY(surface_radiance)
ADD_SUBDIRECTORY(cage2D_deformation) #ADD_SUBDIRECTORY(cage2D_deformation)
ADD_SUBDIRECTORY(volume_import) ADD_SUBDIRECTORY(volume_import)
#ADD_SUBDIRECTORY(volume_render) #ADD_SUBDIRECTORY(volume_render)
......
...@@ -36,7 +36,7 @@ MapHandlerGen* Surface_Import_Plugin::importMeshFromFile(const QString& fileName ...@@ -36,7 +36,7 @@ MapHandlerGen* Surface_Import_Plugin::importMeshFromFile(const QString& fileName
QFileInfo fi(fileName); QFileInfo fi(fileName);
if(fi.exists()) if(fi.exists())
{ {
pythonRecording("importFromFile", fi.baseName(), fileName); pythonRecording("importMeshFromFile", fi.baseName(), fileName);
MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2); MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2);
if(mhg) if(mhg)
...@@ -80,6 +80,8 @@ MapHandlerGen* Surface_Import_Plugin::importImageFromFile(const QString& fileNam ...@@ -80,6 +80,8 @@ MapHandlerGen* Surface_Import_Plugin::importImageFromFile(const QString& fileNam
QFileInfo fi(fileName); QFileInfo fi(fileName);
if(fi.exists()) if(fi.exists())
{ {
pythonRecording("importImageFromFile", fi.baseName(), fileName);
MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2); MapHandlerGen* mhg = m_schnapps->addMap(fi.baseName(), 2);
if(mhg) if(mhg)
{ {
......
...@@ -120,46 +120,51 @@ void MapHandler<PFP>::updateBB() ...@@ -120,46 +120,51 @@ void MapHandler<PFP>::updateBB()
template <typename PFP> template <typename PFP>
void MapHandler<PFP>::updateBBDrawer() void MapHandler<PFP>::updateBBDrawer()
{ {
if (!m_bb.isInitialized())
return;
if (!m_bbDrawer) if (!m_bbDrawer)
m_bbDrawer = new Utils::Drawer(); m_bbDrawer = new Utils::Drawer();
Geom::Vec3f bbmin = m_bb.min(); if (m_bb.isInitialized())
Geom::Vec3f bbmax = m_bb.max(); {
float shift = 0.005f * (bbmax - bbmin).norm(); Geom::Vec3f bbmin = m_bb.min();
bbmin -= Geom::Vec3f(shift, shift, shift); Geom::Vec3f bbmax = m_bb.max();
bbmax += Geom::Vec3f(shift, shift, shift); float shift = 0.005f * (bbmax - bbmin).norm();
bbmin -= Geom::Vec3f(shift, shift, shift);
m_bbDrawer->newList(GL_COMPILE); bbmax += Geom::Vec3f(shift, shift, shift);
m_bbDrawer->color3f(0.0f,1.0f,0.0f);
m_bbDrawer->lineWidth(1.0f); m_bbDrawer->newList(GL_COMPILE);
m_bbDrawer->begin(GL_LINE_LOOP); m_bbDrawer->color3f(0.0f, 1.0f, 0.0f);
m_bbDrawer->vertex(bbmin); m_bbDrawer->lineWidth(1.0f);
m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmin[2]); m_bbDrawer->begin(GL_LINE_LOOP);
m_bbDrawer->vertex3f(bbmax[0], bbmax[1], bbmin[2]); m_bbDrawer->vertex(bbmin);
m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmin[2]); m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmin[2]);
m_bbDrawer->vertex(bbmin); m_bbDrawer->vertex3f(bbmax[0], bbmax[1], bbmin[2]);
m_bbDrawer->end(); m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmin[2]);
m_bbDrawer->begin(GL_LINE_LOOP); m_bbDrawer->vertex(bbmin);
m_bbDrawer->vertex(bbmax); m_bbDrawer->end();
m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmax[2]); m_bbDrawer->begin(GL_LINE_LOOP);
m_bbDrawer->vertex3f(bbmin[0], bbmin[1], bbmax[2]); m_bbDrawer->vertex(bbmax);
m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmax[2]); m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmax[2]);
m_bbDrawer->vertex(bbmax); m_bbDrawer->vertex3f(bbmin[0], bbmin[1], bbmax[2]);
m_bbDrawer->end(); m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmax[2]);
m_bbDrawer->begin(GL_LINES); m_bbDrawer->vertex(bbmax);
m_bbDrawer->vertex(bbmin); m_bbDrawer->end();
m_bbDrawer->vertex3f(bbmin[0], bbmin[1], bbmax[2]); m_bbDrawer->begin(GL_LINES);
m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmin[2]); m_bbDrawer->vertex(bbmin);
m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmax[2]); m_bbDrawer->vertex3f(bbmin[0], bbmin[1], bbmax[2]);
m_bbDrawer->vertex3f(bbmax[0], bbmax[1], bbmin[2]); m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmin[2]);
m_bbDrawer->vertex(bbmax); m_bbDrawer->vertex3f(bbmin[0], bbmax[1], bbmax[2]);
m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmin[2]); m_bbDrawer->vertex3f(bbmax[0], bbmax[1], bbmin[2]);
m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmax[2]); m_bbDrawer->vertex(bbmax);
m_bbDrawer->end(); m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmin[2]);
m_bbDrawer->endList(); m_bbDrawer->vertex3f(bbmax[0], bbmin[1], bbmax[2]);
m_bbDrawer->end();
m_bbDrawer->endList();
}
else
{
m_bbDrawer->newList();
m_bbDrawer->endList();
}
} }
template <typename PFP> template <typename PFP>
......
...@@ -96,7 +96,10 @@ void Plugin::pythonRecording(QString slotName, QString returned, T1 param1) ...