mirror of https://github.com/CGAL/cgal
Merge branch 'CGAL-Qt5_support-GF' of github.com:CGAL/cgal-public-dev into CGAL-Qt5_support-GF
Conflicts: Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp
This commit is contained in:
commit
cac3fb7414
|
|
@ -716,8 +716,6 @@ void
|
|||
C3t3_rib_exporter_plugin::
|
||||
write_surface_cells(const C3t3& c3t3, const Plane& plane, std::ofstream& out)
|
||||
{
|
||||
typedef Kernel::Oriented_side Side;
|
||||
|
||||
for ( C3t3::Cells_in_complex_iterator it_cell = c3t3.cells_in_complex_begin(),
|
||||
end = c3t3.cells_in_complex_end() ; it_cell != end ; ++it_cell )
|
||||
{
|
||||
|
|
@ -788,6 +786,8 @@ write_surface_cells(const C3t3& c3t3, const Plane& plane, std::ofstream& out)
|
|||
QColor edgecolor = facecolor.darker(150);
|
||||
|
||||
/*
|
||||
typedef Kernel::Oriented_side Side;
|
||||
|
||||
// Transparency on the negative side of the plane
|
||||
const Side s0 = plane.oriented_side(c->vertex(0)->point());
|
||||
const Side s1 = plane.oriented_side(c->vertex(1)->point());
|
||||
|
|
|
|||
|
|
@ -19,18 +19,6 @@
|
|||
#include <QGLViewer/manipulatedFrame.h>
|
||||
#include <QGLViewer/qglviewer.h>
|
||||
|
||||
namespace {
|
||||
void CGALglcolor(QColor c, int dv = 0)
|
||||
{
|
||||
if ( 0 != dv )
|
||||
{
|
||||
c = c.darker(dv);
|
||||
#undef darker
|
||||
}
|
||||
|
||||
::glColor4f(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0);
|
||||
}
|
||||
}
|
||||
struct Scene_c3t3_item_priv {
|
||||
Scene_c3t3_item_priv() : c3t3() {}
|
||||
Scene_c3t3_item_priv(const C3t3& c3t3_) : c3t3(c3t3_) {}
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ void Scene_polygon_soup::initialize_buffers() const
|
|||
buffers[2].release();
|
||||
std::vector<float> empty_array;
|
||||
empty_array.resize(0);
|
||||
for(int i=0; i<v_edge.size(); i++)
|
||||
for(std::size_t i=0; i<v_edge.size(); i++)
|
||||
empty_array.push_back(0.0);
|
||||
buffers[3].bind();
|
||||
buffers[3].allocate(empty_array.data(), empty_array.size()*sizeof(float));
|
||||
|
|
@ -313,7 +313,7 @@ void Scene_polygon_soup::initialize_buffers() const
|
|||
rendering_program.setAttributeBuffer(poly_vertexLocation[0],GL_FLOAT,0,3);
|
||||
buffers[4].release();
|
||||
empty_array.resize(0);
|
||||
for(int i=0; i<v_edge.size(); i++)
|
||||
for(std::size_t i=0; i<v_edge.size(); i++)
|
||||
empty_array.push_back(0.0);
|
||||
buffers[5].bind();
|
||||
buffers[5].allocate(empty_array.data(), empty_array.size()*sizeof(float));
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ void Scene_polyhedron_item::initialize_buffers() const
|
|||
buffers[4].release();
|
||||
std::vector<float> empty_array;
|
||||
empty_array.resize(0);
|
||||
for(int i=0; i<v_edge.size(); i++)
|
||||
for(std::size_t i=0; i<v_edge.size(); i++)
|
||||
empty_array.push_back(0.0);
|
||||
buffers[5].bind();
|
||||
buffers[5].allocate(empty_array.data(), empty_array.size()*sizeof(float));
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ Scene_segmented_image_item::initialize_buffers()
|
|||
|
||||
draw_Bbox(bbox(), v_box);
|
||||
std::vector<float> nul_vec(0);
|
||||
for(int i=0; i<v_box->size(); i++)
|
||||
for(std::size_t i=0; i<v_box->size(); i++)
|
||||
nul_vec.push_back(0.0);
|
||||
|
||||
rendering_program.bind();
|
||||
|
|
@ -748,7 +748,7 @@ Scene_segmented_image_item::initialize_buffers()
|
|||
vao[0].release();
|
||||
|
||||
color.resize(0);
|
||||
for(int i=0; i<helper.color_size()/sizeof(GLuint); i++)
|
||||
for(std::size_t i=0; i<helper.color_size()/sizeof(GLuint); i++)
|
||||
color.push_back(0.0);
|
||||
|
||||
vao[1].bind();
|
||||
|
|
|
|||
|
|
@ -935,7 +935,9 @@ void Scene::update_position()
|
|||
if(y>1.)y-=1.;
|
||||
if(z>1.)z-=1.;
|
||||
moving_point = Point(x,y,z);
|
||||
float moving_ball[] = {moving_point.x(), moving_point.y(), moving_point.z()};
|
||||
float moving_ball[] = {float(moving_point.x()),
|
||||
float(moving_point.y()),
|
||||
float(moving_point.z())};
|
||||
vao[4].bind();
|
||||
buffers[5].bind();
|
||||
buffers[5].allocate(moving_ball, 3*sizeof(float));
|
||||
|
|
@ -1355,9 +1357,9 @@ void Scene::gl_draw_location() {
|
|||
Point cp = Point(c.x(),c.y(),c.z());
|
||||
// project facet center
|
||||
double px,py,pz;
|
||||
// gluProject(cp.x(),cp.y(),cp.z(),
|
||||
// modelMatrix, projMatrix, viewport,
|
||||
// &px,&py,&pz);
|
||||
gluProject(cp.x(),cp.y(),cp.z(),
|
||||
modelMatrix, projMatrix, viewport,
|
||||
&px,&py,&pz);
|
||||
cf.push_back(Projected_triangle(pz,Triangle(p,q,r)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,10 @@ int main(int argc, char **argv)
|
|||
mainWindow.enableScriptDebugger();
|
||||
args.removeAt(0);
|
||||
}
|
||||
mainWindow.load_script(QFileInfo("autostart.js"));
|
||||
QFileInfo autostart_js("autostart.js");
|
||||
if(autostart_js.exists()) {
|
||||
mainWindow.load_script(autostart_js);
|
||||
}
|
||||
#endif
|
||||
Q_FOREACH(QString filename, args) {
|
||||
mainWindow.open(filename);
|
||||
|
|
|
|||
|
|
@ -60,14 +60,13 @@ void Polyhedron_demo_point_set_smoothing_plugin::on_actionJetSmoothing_triggered
|
|||
|
||||
const unsigned int nb_neighbors =
|
||||
QInputDialog::getInt((QWidget*)mw,
|
||||
tr("Jet Smoothing"), // dialog title
|
||||
tr("Number of neighbors:"), // field label
|
||||
24, // default value = fast
|
||||
6, // min
|
||||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
|
||||
tr("Jet Smoothing"), // dialog title
|
||||
tr("Number of neighbors:"), // field label
|
||||
24, // default value = fast
|
||||
6, // min
|
||||
1000, // max
|
||||
1, // step
|
||||
&ok);
|
||||
if(!ok) return;
|
||||
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
|
|
|||
|
|
@ -101,13 +101,13 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
|
|||
|
||||
target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} )
|
||||
|
||||
else( QGLVIEWER_FOUND)
|
||||
else( QGLVIEWER_FOUND AND Qt5_FOUND)
|
||||
message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.")
|
||||
endif( QGLVIEWER_FOUND)
|
||||
else(CGAL_FOUND AND CGAL_Qt5_FOUND)
|
||||
endif( QGLVIEWER_FOUND AND Qt5_FOUND)
|
||||
else(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
|
||||
if(RUNNING_CGAL_AUTO_TEST)
|
||||
# Just to avoid a warning from CMake if that variable is set on the command line...
|
||||
endif()
|
||||
|
||||
message(STATUS "NOTICE: This demo needs Qt5, and will not be compiled.")
|
||||
endif(CGAL_FOUND AND CGAL_Qt5_FOUND)
|
||||
endif(CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND)
|
||||
|
|
|
|||
|
|
@ -1559,7 +1559,7 @@ void Viewer::draw()
|
|||
drawText( width()-200, 40, tr("Shift+Wheel: Resize trackball"), fontPrompt );
|
||||
|
||||
}
|
||||
if(m_curMode != NORMAL && m_showTrackball)
|
||||
if(m_selMode != NORMAL && m_showTrackball)
|
||||
{
|
||||
rendering_program_spheres.bind();
|
||||
vao[11].bind();
|
||||
|
|
@ -2390,9 +2390,9 @@ void Viewer::draw_cylinder(float R, int prec, std::vector<float> *vertices, std:
|
|||
{
|
||||
vertices->resize(0);
|
||||
normals->resize(0);
|
||||
int rings=360/prec, sectors=360/prec;
|
||||
float T, P;
|
||||
float x[4],y[4],z[4];
|
||||
// int rings=360/prec, sectors=360/prec;
|
||||
// float T, P;
|
||||
// float x[4],y[4],z[4];
|
||||
//Closing nicely the tubes will cause z-fighting and the spherical parts will get all messy
|
||||
/*
|
||||
//top of the cylinder
|
||||
|
|
|
|||
Loading…
Reference in New Issue