Commit 198ca480 authored by untereiner's avatar untereiner
Browse files

Merge cgogn:~cgogn/CGoGN

parents 218edf05 6698b410
...@@ -226,10 +226,8 @@ void Clipping::slot_spinBox_SphereResolution(int i) ...@@ -226,10 +226,8 @@ void Clipping::slot_spinBox_SphereResolution(int i)
void Clipping::slot_pushButton_changeSpheresColor() void Clipping::slot_pushButton_changeSpheresColor()
{ {
QColor NewColor; QColor NewColor = QColorDialog::getColor();
QColorDialog ColDialog;
NewColor = ColDialog.getColor();
int r, g, b; int r, g, b;
NewColor.getRgb(&r, &g, &b); NewColor.getRgb(&r, &g, &b);
......
...@@ -251,7 +251,7 @@ template <unsigned int DIM, typename T> ...@@ -251,7 +251,7 @@ template <unsigned int DIM, typename T>
inline double Vector<DIM,T>::normalize() inline double Vector<DIM,T>::normalize()
{ {
double n = norm() ; double n = norm() ;
if(n != T(0.0)) if(n != T(0))
for(unsigned int i = 0; i < DIM; ++i) for(unsigned int i = 0; i < DIM; ++i)
m_data[i] /= T(n) ; m_data[i] /= T(n) ;
return n ; return n ;
...@@ -357,7 +357,8 @@ inline T tripleProduct(const Vector<DIM,T>& v1, const Vector<DIM,T>& v2, const V ...@@ -357,7 +357,8 @@ inline T tripleProduct(const Vector<DIM,T>& v1, const Vector<DIM,T>& v2, const V
} }
template <unsigned int DIM, typename T> template <unsigned int DIM, typename T>
inline Vector<DIM,T> slerp(const Vector<DIM,T> &v1, const Vector<DIM,T> &v2, const T &t) { inline Vector<DIM,T> slerp(const Vector<DIM,T>& v1, const Vector<DIM,T>& v2, const T& t)
{
Vector<DIM,T> res ; Vector<DIM,T> res ;
T omega = acos(v1 * v2) ; // assume v1,v2 normalized T omega = acos(v1 * v2) ; // assume v1,v2 normalized
......
...@@ -156,7 +156,7 @@ void TopoRender::drawRelation2() ...@@ -156,7 +156,7 @@ void TopoRender::drawRelation2()
m_shader1->setColor(Geom::Vec4f(1.0f,0.0f,0.0f,0.0f)); m_shader1->setColor(Geom::Vec4f(1.0f,0.0f,0.0f,0.0f));
m_shader1->enableVertexAttribs(); m_shader1->enableVertexAttribs();
glDrawArrays(GL_LINES, 0, m_nbDarts*2); glDrawArrays(GL_LINES, 0, m_nbRel2*2);
m_shader1->disableVertexAttribs(); m_shader1->disableVertexAttribs();
} }
......
...@@ -87,6 +87,11 @@ GenericMap::~GenericMap() ...@@ -87,6 +87,11 @@ GenericMap::~GenericMap()
if(isOrbitEmbedded(i)) if(isOrbitEmbedded(i))
m_attribs[i].clear(true) ; m_attribs[i].clear(true) ;
} }
for(std::multimap<AttributeMultiVectorGen*, AttributeHandlerGen*>::iterator it = attributeHandlers.begin(); it != attributeHandlers.end(); ++it)
(*it).second->setInvalid() ;
attributeHandlers.clear() ;
if(m_attributes_registry_map) if(m_attributes_registry_map)
{ {
delete m_attributes_registry_map; delete m_attributes_registry_map;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment