Commit 6698b410 authored by Pierre Kraemer's avatar Pierre Kraemer

GenericMap destructor invalidates AttributeHandlers

parent 8402f715
......@@ -251,7 +251,7 @@ template <unsigned int DIM, typename T>
inline double Vector<DIM,T>::normalize()
{
double n = norm() ;
if(n != T(0.0))
if(n != T(0))
for(unsigned int i = 0; i < DIM; ++i)
m_data[i] /= T(n) ;
return n ;
......@@ -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>
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 ;
T omega = acos(v1 * v2) ; // assume v1,v2 normalized
......
......@@ -87,6 +87,11 @@ GenericMap::~GenericMap()
if(isOrbitEmbedded(i))
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)
{
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