Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 7dd5fd61 by Pierre Kraemer

### diverses petites modifs..

parent 4eff38ed
 ... ... @@ -117,12 +117,12 @@ void computeCurvatureVertex_QuadraticFitting( template void vertexQuadraticFitting( typename PFP::MAP& map, Dart dart, typename PFP::MATRIX33& localFrame, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal, float& a, float& b, float& c, float& d, float& e) typename PFP::MAP& map, Dart dart, typename PFP::MATRIX33& localFrame, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal, float& a, float& b, float& c, float& d, float& e) { typename PFP::VEC3 p = position[dart] ; ... ... @@ -352,7 +352,7 @@ void computeCurvatureVertex_NormalCycles( const std::vector& vd1 = neigh.getInsideEdges() ; for (std::vector::const_iterator it = vd1.begin(); it != vd1.end(); ++it) { const VEC3 e = position[map.phi2(*it)] - position[*it] ; const VEC3 e = Algo::Geometry::vectorOutOfDart(map, *it, position) ; tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ; } // border ... ...
 ... ... @@ -38,7 +38,7 @@ template void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& featureEdge) ; template std::vector occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& viewDir, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; std::vector occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; } // namespace Geometry ... ...
 ... ... @@ -62,7 +62,7 @@ void featureEdgeDetection(typename PFP::MAP& map, typename PFP::TVEC3& position, } template std::vector occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& viewDir, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) std::vector occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) { typedef typename PFP::VEC3 VEC3 ; typedef typename PFP::REAL REAL ; ... ... @@ -75,38 +75,44 @@ std::vector occludingContoursDetection(typename PFP::MAP& ma if(!m.isMarked(d)) { m.mark(d) ; REAL dp1 = viewDir * normal[d] ; REAL dp2 = viewDir * normal[map.phi1(d)] ; REAL dp3 = viewDir * normal[map.phi_1(d)] ; VEC3 p1 = position[d] ; VEC3 p2 = position[map.phi1(d)] ; VEC3 p3 = position[map.phi_1(d)] ; REAL dp1 = (p1 - cameraPosition) * normal[d] ; REAL dp2 = (p2 - cameraPosition) * normal[map.phi1(d)] ; REAL dp3 = (p3 - cameraPosition) * normal[map.phi_1(d)] ; if(dp1 < 0 && dp2 > 0) { REAL alpha = -dp1 / (-dp1 + dp2) ; occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p2) ; } if(dp2 < 0 && dp1 > 0) { REAL alpha = dp1 / (dp1 - dp2) ; occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p2) ; } if(dp1 < 0 && dp3 > 0) { REAL alpha = -dp1 / (-dp1 + dp3) ; occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p3) ; } if(dp3 < 0 && dp1 > 0) { REAL alpha = dp1 / (dp1 - dp3) ; occludingContours.push_back(alpha * position[d] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p1 + (1 - alpha) * p3) ; } if(dp2 < 0 && dp3 > 0) { REAL alpha = -dp2 / (-dp2 + dp3) ; occludingContours.push_back(alpha * position[map.phi1(d)] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p2 + (1 - alpha) * p3) ; } if(dp3 < 0 && dp2 > 0) { REAL alpha = dp2 / (dp2 - dp3) ; occludingContours.push_back(alpha * position[map.phi1(d)] + (1 - alpha) * position[map.phi_1(d)]) ; occludingContours.push_back(alpha * p2 + (1 - alpha) * p3) ; } } } ... ...
 ... ... @@ -84,7 +84,7 @@ typename PFP::VEC3 faceNormal(typename PFP::MAP& map, Dart d, const typename PFP { VEC3 n = triangleNormal(map, it, position) ; //if(!std::isnan(n[0]) && !std::isnan(n[1]) && !std::isnan(n[2])) if (n[0] == n[0] && n[1] == n[1] && n[2] == n[2]) if(!n.hasNan()) N += n ; it = map.phi1(it) ; } while (it != d) ; ... ... @@ -130,24 +130,6 @@ void computeNormalFaces(typename PFP::MAP& map, const typename PFP::TVEC3& posit } } template class computeNormalVerticesFunctor : public FunctorMap { protected: typename PFP::MAP& m_map; const typename PFP::TVEC3& m_position; typename PFP::TVEC3& m_normal; public: computeNormalVerticesFunctor(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& normal): m_map(map), m_position(position), m_normal(normal) {} bool operator()(Dart d) { m_normal[d] = vertexNormal(m_map, d, m_position) ; return false; } }; template void computeNormalVertices(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& normal, const FunctorSelect& select, unsigned int thread) { ... ... @@ -186,7 +168,8 @@ typename PFP::REAL computeAngleBetweenNormalsOnEdge(typename PFP::MAP& map, Dart if (s >= 0) a = acos(c) ; else a = -acos(c) ; } if (isnan(a)) // if (isnan(a)) if(a != a) std::cerr<< "Warning : computeAngleBetweenNormalsOnEdge returns NaN on edge " << d << "-" << dd << std::endl ; return a ; } ... ...
 ... ... @@ -106,9 +106,9 @@ void addRowsRHS_Equality( LinearSolver* s, const AttributeHandler index, const AttributeHandler& attr, float amount) const AttributeHandler& weight) { FunctorEquality_Scalar ec(s, index, attr, amount) ; FunctorEquality_PerVertexWeight_Scalar ec(s, index, attr, weight) ; m.foreach_orbit(VERTEX, ec) ; } ... ... @@ -118,10 +118,35 @@ void addRowsRHS_Equality( LinearSolver* s, const AttributeHandler index, const AttributeHandler& attr, float amount, float weight) { FunctorEquality_UniformWeight_Scalar ec(s, index, attr, weight) ; m.foreach_orbit(VERTEX, ec) ; } template void addRowsRHS_Equality( typename PFP::MAP& m, LinearSolver* s, const AttributeHandler index, const AttributeHandler& attr, const AttributeHandler& weight, unsigned int coord) { FunctorEquality_PerVertexWeight_Vector ec(s, index, attr, weight, coord) ; m.foreach_orbit(VERTEX, ec) ; } template void addRowsRHS_Equality( typename PFP::MAP& m, LinearSolver* s, const AttributeHandler index, const AttributeHandler& attr, float weight, unsigned int coord) { FunctorEquality_Vector ec(s, index, attr, amount, coord) ; FunctorEquality_UniformWeight_Vector ec(s, index, attr, weight, coord) ; m.foreach_orbit(VERTEX, ec) ; } ... ...
 ... ... @@ -36,7 +36,36 @@ namespace LinearSolving *******************************************************************************/ template class FunctorEquality_Scalar : public FunctorType class FunctorEquality_PerVertexWeight_Scalar : public FunctorType { protected: LinearSolver* solver ; const AttributeHandler& indexTable ; const AttributeHandler& attrTable ; const AttributeHandler& weightTable ; public: FunctorEquality_PerVertexWeight_Scalar( LinearSolver* s, const AttributeHandler& index, const AttributeHandler& attr, const AttributeHandler& weight ) : solver(s), indexTable(index), attrTable(attr), weightTable(weight) {} bool operator()(Dart d) { solver->begin_row() ; solver->add_coefficient(indexTable[d], 1) ; solver->set_right_hand_side(attrTable[d]) ; solver->normalize_row(weightTable[d]) ; solver->end_row() ; return false ; } } ; template class FunctorEquality_UniformWeight_Scalar : public FunctorType { protected: LinearSolver* solver ; ... ... @@ -45,7 +74,7 @@ protected: float weight ; public: FunctorEquality_Scalar( FunctorEquality_UniformWeight_Scalar( LinearSolver* s, const AttributeHandler& index, const AttributeHandler& attr, ... ... @@ -69,7 +98,38 @@ public: *******************************************************************************/ template class FunctorEquality_Vector : public FunctorType class FunctorEquality_PerVertexWeight_Vector : public FunctorType { protected: LinearSolver* solver ; const AttributeHandler& indexTable ; const AttributeHandler& attrTable ; const AttributeHandler& weightTable ; unsigned int coord ; public: FunctorEquality_PerVertexWeight_Vector( LinearSolver* s, const AttributeHandler& index, const AttributeHandler& attr, const AttributeHandler& weight, unsigned int c ) : solver(s), indexTable(index), attrTable(attr), weightTable(weight), coord(c) {} bool operator()(Dart d) { solver->begin_row() ; solver->add_coefficient(indexTable[d], 1) ; solver->set_right_hand_side((attrTable[d])[coord]) ; solver->normalize_row(weightTable[d]) ; solver->end_row() ; return false ; } } ; template class FunctorEquality_UniformWeight_Vector : public FunctorType { protected: LinearSolver* solver ; ... ... @@ -79,7 +139,7 @@ protected: unsigned int coord ; public: FunctorEquality_Vector( FunctorEquality_UniformWeight_Vector( LinearSolver* s, const AttributeHandler& index, const AttributeHandler& attr, ... ...
 ... ... @@ -60,6 +60,7 @@ protected: GLuint m_uniform_size; GLuint m_uniform_color; public: /** * init shaders, texture and variables ... ...
 ... ... @@ -80,7 +80,7 @@ public: * @param signal use macro SIGNAL(qt_signal) * @param method use macro SLOT(name_of_method(params)) */ void setCallBack( const QObject* sender, const char* signal, const char* method); void setCallBack(const QObject* sender, const char* signal, const char* method); /** * set window Title ... ... @@ -147,11 +147,11 @@ public: void setGLWidgetMouseTracking(bool b); protected: GLWidget *m_glWidget; GLWidget* m_glWidget; QDockWidget *m_dock; QDockWidget* m_dock; QDockWidget *m_dockConsole; QDockWidget* m_dockConsole; QTextEdit* m_textConsole; ... ... @@ -219,7 +219,7 @@ public: * @param pixel_width width on pixel on screen * @param center reference point on world to use (defaut 0,0,0) */ float getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& center=Geom::Vec3f(0.0f,0.0f,0.0f)); float getWidthInWorld(unsigned int pixel_width, const Geom::Vec3f& center = Geom::Vec3f(0.0f,0.0f,0.0f)); const glm::mat4& transfoMatrix() const { return m_transfo_matrix; } glm::mat4& transfoMatrix() { return m_transfo_matrix; } ... ...
 ... ... @@ -88,6 +88,8 @@ protected: int m_state_modifier; bool allow_rotation; /** * met a jour la matrice modelview */ ... ... @@ -102,6 +104,8 @@ protected: public: void setParamObject(float width, float* pos); void setRotation(bool b); void initializeGL(); void paintGL(); ... ...