Commit 3235b80c authored by Sylvain Thery's avatar Sylvain Thery

Merge branch 'develop' of cgogn:~kraemer/CGoGN into develop

parents 068bbeba 2f294c4b
...@@ -376,7 +376,10 @@ void Viewer::importMesh(std::string& filename) ...@@ -376,7 +376,10 @@ void Viewer::importMesh(std::string& filename)
if(!normal.isValid()) if(!normal.isValid())
normal = myMap.addAttribute<VEC3, VERTEX>("normal") ; normal = myMap.addAttribute<VEC3, VERTEX>("normal") ;
Utils::Chrono c;
c.start();
Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ; Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
std::cout << "compute normals -> " << c.elapsed() << std::endl;
m_positionVBO->updateData(position) ; m_positionVBO->updateData(position) ;
m_normalVBO->updateData(normal) ; m_normalVBO->updateData(normal) ;
...@@ -385,8 +388,6 @@ void Viewer::importMesh(std::string& filename) ...@@ -385,8 +388,6 @@ void Viewer::importMesh(std::string& filename)
updateGLMatrices() ; updateGLMatrices() ;
std::cout << "#vertices -> " << Algo::Topo::getNbOrbits<VERTEX>(myMap) << std::endl; std::cout << "#vertices -> " << Algo::Topo::getNbOrbits<VERTEX>(myMap) << std::endl;
Vertex v(myMap.begin());
unsigned int e = myMap.getEmbedding(v);
} }
void Viewer::exportMesh(std::string& filename, bool askExportMode) void Viewer::exportMesh(std::string& filename, bool askExportMode)
......
...@@ -187,12 +187,12 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event) ...@@ -187,12 +187,12 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
MapHandlerGen* mh = m_schnapps->getSelectedMap(); MapHandlerGen* mh = m_schnapps->getSelectedMap();
MapParameters& p = h_parameterSet[mh]; MapParameters& p = h_parameterSet[mh];
const std::vector<Dart>& handle = p.handleSelector->getSelectedCells(); const std::vector<Vertex>& handle = p.handleSelector->getSelectedCells();
if(!m_draginit) if(!m_draginit)
{ {
m_dragZ = 0; m_dragZ = 0;
for(std::vector<Dart>::const_iterator it = handle.begin(); it != handle.end(); ++it) for(std::vector<Vertex>::const_iterator it = handle.begin(); it != handle.end(); ++it)
{ {
const PFP2::VEC3& pp = p.positionAttribute[*it]; const PFP2::VEC3& pp = p.positionAttribute[*it];
qglviewer::Vec q = view->camera()->projectedCoordinatesOf(qglviewer::Vec(pp[0],pp[1],pp[2])); qglviewer::Vec q = view->camera()->projectedCoordinatesOf(qglviewer::Vec(pp[0],pp[1],pp[2]));
...@@ -212,7 +212,7 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event) ...@@ -212,7 +212,7 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
qglviewer::Vec vec = qq - m_dragPrevious; qglviewer::Vec vec = qq - m_dragPrevious;
PFP2::VEC3 t(vec.x, vec.y, vec.z); PFP2::VEC3 t(vec.x, vec.y, vec.z);
for(std::vector<Dart>::const_iterator it = handle.begin(); it != handle.end(); ++it) for(std::vector<Vertex>::const_iterator it = handle.begin(); it != handle.end(); ++it)
p.positionAttribute[*it] += t; p.positionAttribute[*it] += t;
m_dragPrevious = qq; m_dragPrevious = qq;
......
...@@ -83,9 +83,9 @@ protected: ...@@ -83,9 +83,9 @@ protected:
bool m_selecting; bool m_selecting;
// cell under the mouse when selecting // cell under the mouse when selecting
Dart m_selectingVertex; Vertex m_selectingVertex;
Dart m_selectingEdge; Edge m_selectingEdge;
Dart m_selectingFace; Face m_selectingFace;
// selecting & selected cells drawing // selecting & selected cells drawing
Utils::PointSprite* m_pointSprite; Utils::PointSprite* m_pointSprite;
......
...@@ -28,48 +28,12 @@ public: ...@@ -28,48 +28,12 @@ public:
inline const QString& getName() { return m_name; } inline const QString& getName() { return m_name; }
inline const std::vector<Dart>& getSelectedCells() { return m_cells; } virtual inline unsigned int getOrbit() const = 0;
virtual unsigned int getOrbit() = 0; virtual inline unsigned int getNbSelectedCells() const = 0;
virtual void select(Dart d, bool emitSignal = true) = 0;
virtual void unselect(Dart d, bool emitSignal = true) = 0;
inline void select(const std::vector<Dart>& d)
{
for(unsigned int i = 0; i < d.size(); ++i)
select(d[i], false);
checkChange();
if(m_isMutuallyExclusive && !m_mutuallyExclusive.empty())
{
foreach(CellSelectorGen* cs, m_mutuallyExclusive)
cs->checkChange();
}
}
inline void unselect(const std::vector<Dart>& d)
{
for(unsigned int i = 0; i < d.size(); ++i)
unselect(d[i], false);
checkChange();
}
virtual bool isSelected(Dart d) = 0;
virtual void rebuild() = 0; virtual void rebuild() = 0;
inline void setMutuallyExclusive(bool b) { m_isMutuallyExclusive = b; }
inline bool isMutuallyExclusive() const { return m_isMutuallyExclusive; }
inline void setMutuallyExclusiveSet(const QList<CellSelectorGen*>& mex)
{
m_mutuallyExclusive.clear();
foreach(CellSelectorGen* cs, mex)
{
if(cs != this)
m_mutuallyExclusive.append(cs);
}
}
inline void checkChange() inline void checkChange()
{ {
if(m_selectionChanged) if(m_selectionChanged)
...@@ -79,22 +43,25 @@ public: ...@@ -79,22 +43,25 @@ public:
} }
} }
inline void setMutuallyExclusive(bool b) { m_isMutuallyExclusive = b; }
inline bool isMutuallyExclusive() const { return m_isMutuallyExclusive; }
virtual inline void setMutuallyExclusiveSet(const QList<CellSelectorGen*>& mex) = 0;
signals: signals:
void selectedCellsChanged(); void selectedCellsChanged();
protected: protected:
QString m_name; QString m_name;
std::vector<Dart> m_cells;
bool m_selectionChanged;
bool m_isMutuallyExclusive; bool m_isMutuallyExclusive;
QList<CellSelectorGen*> m_mutuallyExclusive; bool m_selectionChanged;
}; };
template <typename MAP, unsigned int ORBIT> template <typename MAP, unsigned int ORBIT>
class CellSelector : public CellSelectorGen class CellSelector : public CellSelectorGen
{ {
typedef Cell<ORBIT> CELL;
typedef CellSelector<MAP, ORBIT> SELECTOR;
public: public:
CellSelector(MAP& map, const QString& name, unsigned int thread = 0) : CellSelector(MAP& map, const QString& name, unsigned int thread = 0) :
CellSelectorGen(name), CellSelectorGen(name),
...@@ -105,20 +72,24 @@ public: ...@@ -105,20 +72,24 @@ public:
~CellSelector() ~CellSelector()
{} {}
inline unsigned int getOrbit() { return ORBIT; } inline unsigned int getOrbit() const { return ORBIT; }
inline const CellMarker<MAP, ORBIT>& getMarker() { return m_cm; } inline const CellMarker<MAP, ORBIT>& getMarker() { return m_cm; }
inline void select(Dart d, bool emitSignal = true) inline const std::vector<CELL>& getSelectedCells() { return m_cells; }
inline unsigned int getNbSelectedCells() const { return m_cells.size(); }
inline void select(CELL c, bool emitSignal = true)
{ {
if(!m_cm.isMarked(d)) if(!m_cm.isMarked(c))
{ {
m_cm.mark(d); m_cm.mark(c);
m_cells.push_back(d); m_cells.push_back(c);
if(m_isMutuallyExclusive && !m_mutuallyExclusive.empty()) if(m_isMutuallyExclusive && !m_mutuallyExclusive.empty())
{ {
foreach(CellSelectorGen* cs, m_mutuallyExclusive) foreach(SELECTOR* cs, m_mutuallyExclusive)
cs->unselect(d, emitSignal); cs->unselect(c, emitSignal);
} }
if(emitSignal) if(emitSignal)
emit(selectedCellsChanged()); emit(selectedCellsChanged());
...@@ -127,16 +98,28 @@ public: ...@@ -127,16 +98,28 @@ public:
} }
} }
inline void unselect(Dart d, bool emitSignal = true) inline void select(const std::vector<CELL>& c)
{ {
if(m_cm.isMarked(d)) for(unsigned int i = 0; i < c.size(); ++i)
select(c[i], false);
checkChange();
if(m_isMutuallyExclusive && !m_mutuallyExclusive.empty())
{ {
unsigned int v = m_map.template getEmbedding<ORBIT>(d); foreach(SELECTOR* cs, m_mutuallyExclusive)
cs->checkChange();
}
}
inline void unselect(CELL c, bool emitSignal = true)
{
if(m_cm.isMarked(c))
{
unsigned int emb = m_map.getEmbedding(c);
bool found = false; bool found = false;
unsigned int i; unsigned int i;
for(i = 0; i < m_cells.size() && !found; ++i) for(i = 0; i < m_cells.size() && !found; ++i)
{ {
if(m_map.template getEmbedding<ORBIT>(m_cells[i]) == v) if(m_map.template getEmbedding<ORBIT>(m_cells[i]) == emb)
found = true ; found = true ;
} }
if(found) if(found)
...@@ -152,26 +135,50 @@ public: ...@@ -152,26 +135,50 @@ public:
} }
} }
inline bool isSelected(Dart d) inline void unselect(const std::vector<CELL>& c)
{
for(unsigned int i = 0; i < c.size(); ++i)
unselect(c[i], false);
checkChange();
}
inline bool isSelected(CELL c)
{ {
return m_cm.isMarked(d); return m_cm.isMarked(c);
} }
void rebuild() void rebuild()
{ {
m_cells.clear(); m_cells.clear();
TraversorCell<MAP, ORBIT> t(m_map, true); foreach_cell<ORBIT>(m_map, [&] (CELL c)
for(Dart d = t.begin(); d != t.end(); d = t.next())
{ {
if(m_cm.isMarked(d)) if(m_cm.isMarked(c))
m_cells.push_back(d); m_cells.push_back(c);
} });
emit(selectedCellsChanged()); emit(selectedCellsChanged());
} }
inline void setMutuallyExclusiveSet(const QList<CellSelectorGen*>& mex)
{
m_mutuallyExclusive.clear();
foreach(CellSelectorGen* cs, mex)
{
if(cs != this)
{
SELECTOR* s = dynamic_cast<SELECTOR*>(cs);
if (s)
m_mutuallyExclusive.append(s);
}
}
}
private: private:
MAP& m_map; MAP& m_map;
CellMarker<MAP, ORBIT> m_cm; CellMarker<MAP, ORBIT> m_cm;
std::vector<CELL> m_cells;
QList<SELECTOR*> m_mutuallyExclusive;
}; };
} // namespace SCHNApps } // namespace SCHNApps
......
...@@ -10,8 +10,8 @@ unsigned int CellSelectorGen::selectorCount = 0; ...@@ -10,8 +10,8 @@ unsigned int CellSelectorGen::selectorCount = 0;
CellSelectorGen::CellSelectorGen(const QString& name) : CellSelectorGen::CellSelectorGen(const QString& name) :
m_name(name), m_name(name),
m_selectionChanged(false), m_isMutuallyExclusive(false),
m_isMutuallyExclusive(false) m_selectionChanged(false)
{ {
++selectorCount; ++selectorCount;
} }
......
...@@ -63,7 +63,7 @@ void computeCurvatureVertices_QuadraticFitting( ...@@ -63,7 +63,7 @@ void computeCurvatureVertices_QuadraticFitting(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_QuadraticFitting( void computeCurvatureVertex_QuadraticFitting(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& kmax, VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& kmax,
...@@ -74,7 +74,7 @@ void computeCurvatureVertex_QuadraticFitting( ...@@ -74,7 +74,7 @@ void computeCurvatureVertex_QuadraticFitting(
template <typename PFP> template <typename PFP>
void vertexQuadraticFitting( void vertexQuadraticFitting(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::MATRIX33& localFrame, typename PFP::MATRIX33& localFrame,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -104,7 +104,8 @@ template <typename PFP> ...@@ -104,7 +104,8 @@ template <typename PFP>
void cubicFittingAddVertexNormal(typename PFP::VEC3& v, typename PFP::VEC3& n, typename PFP::VEC3& p, typename PFP::MATRIX33& localFrame) ; void cubicFittingAddVertexNormal(typename PFP::VEC3& v, typename PFP::VEC3& n, typename PFP::VEC3& p, typename PFP::MATRIX33& localFrame) ;
*/ */
/* normal cycles by [ACDLD03] : useful for parallel computing*/ /* normal cycles by [ACDLD03] : useful for parallel computing */
template <typename PFP> template <typename PFP>
void computeCurvatureVertices_NormalCycles( void computeCurvatureVertices_NormalCycles(
typename PFP::MAP& map, typename PFP::MAP& map,
...@@ -122,7 +123,7 @@ void computeCurvatureVertices_NormalCycles( ...@@ -122,7 +123,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles( void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::REAL radius, typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -174,7 +175,7 @@ void computeCurvatureVertices_NormalCycles_Projected( ...@@ -174,7 +175,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected( void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart dart, Vertex v,
typename PFP::REAL radius, typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -204,8 +205,7 @@ void computeCurvatureVertices_NormalCycles( ...@@ -204,8 +205,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles( void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map, Vertex v,
Dart dart,
Algo::Surface::Selection::Collector<PFP> & neigh, Algo::Surface::Selection::Collector<PFP> & neigh,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
...@@ -233,8 +233,7 @@ void computeCurvatureVertices_NormalCycles_Projected( ...@@ -233,8 +233,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP> template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected( void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map, Vertex v,
Dart dart,
Algo::Surface::Selection::Collector<PFP> & neigh, Algo::Surface::Selection::Collector<PFP> & neigh,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal, const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
......
This diff is collapsed.
...@@ -41,19 +41,19 @@ namespace Geometry ...@@ -41,19 +41,19 @@ namespace Geometry
{ {
template<typename PFP, typename V_ATT> template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE triangleNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ; typename V_ATT::DATA_TYPE triangleNormal(typename PFP::MAP& map, Face f, const V_ATT& position) ;
template<typename PFP, typename V_ATT> template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE newellNormal(typename PFP::MAP& map, Dart d, const V_ATT& position); typename V_ATT::DATA_TYPE newellNormal(typename PFP::MAP& map, Face f, const V_ATT& position);
template<typename PFP, typename V_ATT> template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE faceNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ; typename V_ATT::DATA_TYPE faceNormal(typename PFP::MAP& map, Face f, const V_ATT& position) ;
template<typename PFP, typename V_ATT> template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ; typename V_ATT::DATA_TYPE vertexNormal(typename PFP::MAP& map, Vertex v, const V_ATT& position) ;
template<typename PFP, typename V_ATT> template<typename PFP, typename V_ATT>
typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Dart d, const V_ATT& position) ; typename V_ATT::DATA_TYPE vertexBorderNormal(typename PFP::MAP& map, Vertex v, const V_ATT& position) ;
template <typename PFP, typename V_ATT, typename F_ATT> template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread = 0) ; void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int thread = 0) ;
...@@ -79,6 +79,9 @@ void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT& ...@@ -79,6 +79,9 @@ void computeNormalVertices(typename PFP::MAP& map, const V_ATT& position, V_ATT&
template <typename PFP, typename V_ATT, typename F_ATT> template <typename PFP, typename V_ATT, typename F_ATT>
void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int nbth = 0) ; void computeNormalFaces(typename PFP::MAP& map, const V_ATT& position, F_ATT& face_normal, unsigned int nbth = 0) ;
template <typename PFP, typename V_ATT, typename E_ATT>
void computeAnglesBetweenNormalsOnEdges(typename PFP::MAP& map, const V_ATT& position, E_ATT& angles, unsigned int nbth = 0) ;
} }
......
This diff is collapsed.
...@@ -175,7 +175,7 @@ void ExplodeVolumeRender::updateSmooth(typename PFP::MAP& map, const V_ATT& posi ...@@ -175,7 +175,7 @@ void ExplodeVolumeRender::updateSmooth(typename PFP::MAP& map, const V_ATT& posi
{ {
// compute normals // compute normals
VEC3 centerFace = Algo::Surface::Geometry::faceCentroidELW<PFP>(map, d.dart, positions); VEC3 centerFace = Algo::Surface::Geometry::faceCentroidELW<PFP>(map, d.dart, positions);
VEC3 centerNormalFace = Algo::Surface::Geometry::newellNormal<PFP>(map,d,positions); VEC3 centerNormalFace = Algo::Surface::Geometry::newellNormal<PFP>(map, d.dart, positions);
computeFace<PFP>(map,d,positions,centerFace,centerNormalFace,vertices,normals); computeFace<PFP>(map,d,positions,centerFace,centerNormalFace,vertices,normals);
......
...@@ -67,9 +67,9 @@ protected: ...@@ -67,9 +67,9 @@ protected:
bool isInsideCollected; bool isInsideCollected;
std::vector<Dart> insideVertices; std::vector<Vertex> insideVertices;
std::vector<Dart> insideEdges; std::vector<Edge> insideEdges;
std::vector<Dart> insideFaces; std::vector<Face> insideFaces;
std::vector<Dart> border; std::vector<Dart> border;
public: public:
...@@ -105,9 +105,9 @@ public: ...@@ -105,9 +105,9 @@ public:
inline Dart getCenterDart() const { return centerDart; } inline Dart getCenterDart() const { return centerDart; }
inline const std::vector<Dart>& getInsideVertices() const { assert(isInsideCollected || !"getInsideVertices: inside cells have not been collected.") ; return insideVertices; } inline const std::vector<Vertex>& getInsideVertices() const { assert(isInsideCollected || !"getInsideVertices: inside cells have not been collected.") ; return insideVertices; }
inline const std::vector<Dart>& getInsideEdges() const { assert(isInsideCollected || !"getInsideEdges: inside cells have not been collected.") ; return insideEdges; } inline const std::vector<Edge>& getInsideEdges() const { assert(isInsideCollected || !"getInsideEdges: inside cells have not been collected.") ; return insideEdges; }
inline const std::vector<Dart>& getInsideFaces() const { assert(isInsideCollected || !"getInsideFaces: inside cells have not been collected.") ; return insideFaces; } inline const std::vector<Face>& getInsideFaces() const { assert(isInsideCollected || !"getInsideFaces: inside cells have not been collected.") ; return insideFaces; }
inline const std::vector<Dart>& getBorder() const { return border; } inline const std::vector<Dart>& getBorder() const { return border; }
inline unsigned int getNbInsideVertices() const { assert(isInsideCollected || !"getNbInsideVertices: inside cells have not been collected.") ; return insideVertices.size(); } inline unsigned int getNbInsideVertices() const { assert(isInsideCollected || !"getNbInsideVertices: inside cells have not been collected.") ; return insideVertices.size(); }
...@@ -118,12 +118,19 @@ public: ...@@ -118,12 +118,19 @@ public:
template <typename PPFP> template <typename PPFP>
friend std::ostream& operator<<(std::ostream &out, const Collector<PPFP>& c); friend std::ostream& operator<<(std::ostream &out, const Collector<PPFP>& c);
virtual REAL computeArea (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/) { virtual REAL computeArea (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/)
{
assert(!"Warning: Collector<PFP>::computeArea() should be overloaded in non-virtual derived classes"); assert(!"Warning: Collector<PFP>::computeArea() should be overloaded in non-virtual derived classes");
return 0.0; return 0.0;
} }
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, const EdgeAttribute<REAL, MAP_IMPL>& /*edgeangle*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); } virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, const EdgeAttribute<REAL, MAP_IMPL>& /*edgeangle*/, typename PFP::MATRIX33&)
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, typename PFP::MATRIX33&) {assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes"); } {
assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes");
}
virtual void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& /*pos*/, typename PFP::MATRIX33&)
{
assert(!"Warning: Collector<PFP>::computeNormalCyclesTensor() should be overloaded in non-virtual derived classes");
}
}; };
/********************************************************* /*********************************************************
...@@ -186,8 +193,9 @@ public: ...@@ -186,8 +193,9 @@ public:
void collectBorder(Dart d); void collectBorder(Dart d);
REAL computeArea(const VertexAttribute<VEC3, MAP_IMPL>& pos); REAL computeArea(const VertexAttribute<VEC3, MAP_IMPL>& pos);
void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, const EdgeAttribute<REAL, MAP_IMPL>&edgeangle, typename PFP::MATRIX33&); void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, const EdgeAttribute<REAL, MAP_IMPL>& edgeangle, typename PFP::MATRIX33&);
void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, typename PFP::MATRIX33&); void computeNormalCyclesTensor (const VertexAttribute<VEC3, MAP_IMPL>& pos, typename PFP::MATRIX33&);
}; };
/********************************************************* /*********************************************************
...@@ -345,7 +353,7 @@ public : ...@@ -345,7 +353,7 @@ public :
} }
}; };