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)
if(!normal.isValid())
normal = myMap.addAttribute<VEC3, VERTEX>("normal") ;
Utils::Chrono c;
c.start();
Algo::Surface::Geometry::computeNormalVertices<PFP>(myMap, position, normal) ;
std::cout << "compute normals -> " << c.elapsed() << std::endl;
m_positionVBO->updateData(position) ;
m_normalVBO->updateData(normal) ;
......@@ -385,8 +388,6 @@ void Viewer::importMesh(std::string& filename)
updateGLMatrices() ;
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)
......
......@@ -187,12 +187,12 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
MapHandlerGen* mh = m_schnapps->getSelectedMap();
MapParameters& p = h_parameterSet[mh];
const std::vector<Dart>& handle = p.handleSelector->getSelectedCells();
const std::vector<Vertex>& handle = p.handleSelector->getSelectedCells();
if(!m_draginit)
{
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];
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)
qglviewer::Vec vec = qq - m_dragPrevious;
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;
m_dragPrevious = qq;
......
......@@ -83,9 +83,9 @@ protected:
bool m_selecting;
// cell under the mouse when selecting
Dart m_selectingVertex;
Dart m_selectingEdge;
Dart m_selectingFace;
Vertex m_selectingVertex;
Edge m_selectingEdge;
Face m_selectingFace;
// selecting & selected cells drawing
Utils::PointSprite* m_pointSprite;
......
......@@ -28,48 +28,12 @@ public:
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 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 inline unsigned int getNbSelectedCells() const = 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()
{
if(m_selectionChanged)
......@@ -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:
void selectedCellsChanged();
protected:
QString m_name;
std::vector<Dart> m_cells;
bool m_selectionChanged;
bool m_isMutuallyExclusive;
QList<CellSelectorGen*> m_mutuallyExclusive;
bool m_selectionChanged;
};
template <typename MAP, unsigned int ORBIT>
class CellSelector : public CellSelectorGen
{
typedef Cell<ORBIT> CELL;
typedef CellSelector<MAP, ORBIT> SELECTOR;
public:
CellSelector(MAP& map, const QString& name, unsigned int thread = 0) :
CellSelectorGen(name),
......@@ -105,20 +72,24 @@ public:
~CellSelector()
{}
inline unsigned int getOrbit() { return ORBIT; }
inline unsigned int getOrbit() const { return ORBIT; }
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_cells.push_back(d);
m_cm.mark(c);
m_cells.push_back(c);
if(m_isMutuallyExclusive && !m_mutuallyExclusive.empty())
{
foreach(CellSelectorGen* cs, m_mutuallyExclusive)
cs->unselect(d, emitSignal);
foreach(SELECTOR* cs, m_mutuallyExclusive)
cs->unselect(c, emitSignal);
}
if(emitSignal)
emit(selectedCellsChanged());
......@@ -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;
unsigned int 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 ;
}
if(found)
......@@ -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()
{
m_cells.clear();
TraversorCell<MAP, ORBIT> t(m_map, true);
for(Dart d = t.begin(); d != t.end(); d = t.next())
foreach_cell<ORBIT>(m_map, [&] (CELL c)
{
if(m_cm.isMarked(d))
m_cells.push_back(d);
}
if(m_cm.isMarked(c))
m_cells.push_back(c);
});
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:
MAP& m_map;
CellMarker<MAP, ORBIT> m_cm;
std::vector<CELL> m_cells;
QList<SELECTOR*> m_mutuallyExclusive;
};
} // namespace SCHNApps
......
......@@ -10,8 +10,8 @@ unsigned int CellSelectorGen::selectorCount = 0;
CellSelectorGen::CellSelectorGen(const QString& name) :
m_name(name),
m_selectionChanged(false),
m_isMutuallyExclusive(false)
m_isMutuallyExclusive(false),
m_selectionChanged(false)
{
++selectorCount;
}
......
......@@ -63,7 +63,7 @@ void computeCurvatureVertices_QuadraticFitting(
template <typename PFP>
void computeCurvatureVertex_QuadraticFitting(
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>& normal,
VertexAttribute<typename PFP::REAL, typename PFP::MAP::IMPL>& kmax,
......@@ -74,7 +74,7 @@ void computeCurvatureVertex_QuadraticFitting(
template <typename PFP>
void vertexQuadraticFitting(
typename PFP::MAP& map,
Dart dart,
Vertex v,
typename PFP::MATRIX33& localFrame,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
......@@ -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) ;
*/
/* normal cycles by [ACDLD03] : useful for parallel computing*/
/* normal cycles by [ACDLD03] : useful for parallel computing */
template <typename PFP>
void computeCurvatureVertices_NormalCycles(
typename PFP::MAP& map,
......@@ -122,7 +123,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP>
void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map,
Dart dart,
Vertex v,
typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
......@@ -174,7 +175,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map,
Dart dart,
Vertex v,
typename PFP::REAL radius,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& normal,
......@@ -204,8 +205,7 @@ void computeCurvatureVertices_NormalCycles(
template <typename PFP>
void computeCurvatureVertex_NormalCycles(
typename PFP::MAP& map,
Dart dart,
Vertex v,
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>& normal,
......@@ -233,8 +233,7 @@ void computeCurvatureVertices_NormalCycles_Projected(
template <typename PFP>
void computeCurvatureVertex_NormalCycles_Projected(
typename PFP::MAP& map,
Dart dart,
Vertex v,
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>& normal,
......
This diff is collapsed.
......@@ -41,19 +41,19 @@ namespace Geometry
{
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>
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>
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>
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>
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>
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&
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) ;
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
{
// compute normals
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);
......
......@@ -67,9 +67,9 @@ protected:
bool isInsideCollected;
std::vector<Dart> insideVertices;
std::vector<Dart> insideEdges;
std::vector<Dart> insideFaces;
std::vector<Vertex> insideVertices;
std::vector<Edge> insideEdges;
std::vector<Face> insideFaces;
std::vector<Dart> border;
public:
......@@ -105,9 +105,9 @@ public:
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<Dart>& 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<Vertex>& getInsideVertices() const { assert(isInsideCollected || !"getInsideVertices: inside cells have not been collected.") ; return insideVertices; }
inline const std::vector<Edge>& getInsideEdges() const { assert(isInsideCollected || !"getInsideEdges: inside cells have not been collected.") ; return insideEdges; }
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 unsigned int getNbInsideVertices() const { assert(isInsideCollected || !"getNbInsideVertices: inside cells have not been collected.") ; return insideVertices.size(); }
......@@ -118,12 +118,19 @@ public:
template <typename PPFP>
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");
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*/, 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&)
{
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:
void collectBorder(Dart d);
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&);
};
/*********************************************************
......@@ -345,7 +353,7 @@ public :
}
};
// tests if the angle between vertex normals is below some threshold
// tests if the angle between triangle normals is below some threshold
template <typename PFP>
class CollectorCriterion_TriangleNormalAngle : public CollectorCriterion
{
......@@ -422,7 +430,6 @@ public:
Collector<PFP>(m, thread),
crit(c)
{}
void collectAll(Dart d);
void collectBorder(Dart d);
};
......@@ -450,7 +457,6 @@ public:
Collector_Triangles(typename PFP::MAP& m, CollectorCriterion& c, unsigned int thread = 0) :
Collector<PFP>(m,thread), crit(c)
{}
void collectAll(Dart d) ;
void collectBorder(Dart d) ;
};
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ namespace Selection
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB direction of ray (directed to the scene)
* @param vecFaces (out) vector to store the darts of intersected faces
* @param vecFaces (out) vector to store the intersected faces
* @param iPoints (out) vector to store the intersection points
*/
template<typename PFP>
......@@ -53,7 +53,7 @@ void facesRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
std::vector<Dart>& vecFaces,
std::vector<Face>& vecFaces,
std::vector<typename PFP::VEC3>& iPoints);
/**
......@@ -62,7 +62,7 @@ void facesRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB direction of ray (directed to the scene)
* @param vecFaces (out) vector to store the darts of intersected faces
* @param vecFaces (out) vector to store the intersected faces
*/
template<typename PFP>
void facesRaySelection(
......@@ -70,7 +70,7 @@ void facesRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
std::vector<Dart>& vecFaces);
std::vector<Face>& vecFaces);
/**
* Function that does the selection of one face
......@@ -78,7 +78,7 @@ void facesRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param face (out) dart of selected vertex (set to NIL if no face selected)
* @param face (out) selected face (set to NIL if no face selected)
*/
template<typename PFP>
void faceRaySelection(
......@@ -86,7 +86,7 @@ void faceRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
Dart& face);
Face& face);
/**
* Function that does the selection of edges, returned darts are sorted from closest to farthest
......@@ -94,8 +94,8 @@ void faceRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vecEdges (out) vector to store dart of intersected edges
* @param dist radius of the cylinder of selection
* @param vecEdges (out) vector to store intersected edges
* @param distMax radius of the cylinder of selection
*/
template<typename PFP>
void edgesRaySelection(
......@@ -103,7 +103,7 @@ void edgesRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
std::vector<Dart>& vecEdges,
std::vector<Edge>& vecEdges,
float distMax);
/**
......@@ -112,7 +112,7 @@ void edgesRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param edge (out) dart of selected vertex (set to NIL if no edge selected)
* @param edge (out) selected edge (set to NIL if no edge selected)
*/
template<typename PFP>
void edgeRaySelection(
......@@ -120,7 +120,7 @@ void edgeRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
Dart& edge);
Edge& edge);
/**
* Function that does the selection of vertices, returned darts are sorted from closest to farthest
......@@ -128,7 +128,7 @@ void edgeRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vecVertices (out) vector to store dart of intersected vertices
* @param vecVertices (out) vector to store intersected vertices
* @param dist radius of the cylinder of selection
*/
template<typename PFP>
......@@ -137,7 +137,8 @@ void verticesRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
std::vector<Dart>& vecVertices);
std::vector<Vertex>& vecVertices,
float dist);
/**
* Function that does the selection of one vertex
......@@ -145,7 +146,7 @@ void verticesRaySelection(
* @param position the vertex attribute storing positions
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param vertex (out) dart of selected vertex (set to NIL if no vertex selected)
* @param vertex (out) selected vertex (set to NIL if no vertex selected)
*/
template<typename PFP>
void vertexRaySelection(
......@@ -153,7 +154,7 @@ void vertexRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
Dart& vertex);
Vertex& vertex);
/**
* Volume selection, not yet functional
......@@ -164,14 +165,14 @@ void volumesRaySelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,
const typename PFP::VEC3& rayAB,
std::vector<Dart>& vecVolumes);
std::vector<Vol>& vecVolumes);
template<typename PFP>
void facesPlanSelection(
typename PFP::MAP& map,
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename Geom::Plane3D<typename PFP::VEC3::DATA_TYPE>& plan,
std::vector<Dart>& vecDartss);
std::vector<Face>& vecFaces);
/**
* Function that does the selection of vertices in a cone, returned darts are sorted from closest to farthest
......@@ -179,8 +180,8 @@ void facesPlanSelection(
* @param position the position attribute
* @param rayA first point of ray (user side)
* @param rayAB vector of ray (directed ot the scene)
* @param angle angle of the code in degree.
* @param vecVertices (out) vector to store dart of intersected vertices
* @param angle angle of the cone in degree.
* @param vecVertices (out) vector to store intersected vertices
*/
template<typename PFP>
void verticesConeSelection(
......@@ -188,7 +189,8 @@ void verticesConeSelection(
const VertexAttribute<typename PFP::VEC3, typename PFP::MAP::IMPL>& position,
const typename PFP::VEC3& rayA,