opengl visualization

This commit is contained in:
Joachim Schoeberl 2014-10-06 20:00:40 +00:00
parent e398e948b6
commit ece18134d1

View File

@ -74,7 +74,6 @@ namespace netgen
double shine = vispar.shininess;
double transp = vispar.transp;
glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, shine);
glLogicOp (GL_COPY);
@ -93,7 +92,6 @@ namespace netgen
}
}
glPolygonOffset (1, 1);
glEnable (GL_POLYGON_OFFSET_FILL);
@ -185,7 +183,6 @@ namespace netgen
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
/*
for (int j = 0; j < ta.GetNT(); j++)
{
@ -195,6 +192,7 @@ namespace netgen
int pi = ta.GetTriangle(j)[k];
glNormal3dv (ta.GetNormal(pi));
glVertex3dv (ta.GetPoint(pi));
cout << "v = " << ta.GetPoint(pi) << endl;
}
glEnd ();
}
@ -528,8 +526,6 @@ inline string ToString (const T& t)
void Hi () { cout << "hi from csgvis" << endl; }
#ifdef NG_PYTHON
#include <boost/python.hpp>
namespace bp = boost::python;
@ -549,20 +545,17 @@ BOOST_PYTHON_MODULE(libcsgvis)
bp::def ("VS", FunctionPointer
([] (CSGeometry & geom)
// ([] (shared_ptr<CSGeometry> geom)
{
geom.FindIdenticSurfaces (1e-6);
geom.CalcTriangleApproximation (0.01, 20);
auto vs = make_shared<VisualSceneGeometry>();
vs->SetGeometry(const_cast<CSGeometry*>(&geom));
// vs->SetGeometry(geom.get());
vs->SetGeometry(&geom);
return vs;
}));
bp::def ("MouseMove", FunctionPointer
([] ( VisualSceneGeometry &vsgeom, int oldx, int oldy, int newx, int newy, char mode)
// ([] (shared_ptr<CSGeometry> geom)
{
vsgeom.MouseMove(oldx,oldy,newx,newy,mode);
}));