A class for managing curves on a 2manifold. More...
#include <curve_on_manifold.h>
Classes | |
| class | EdgePointPred |
| struct | EdgePointSplit |
| class | Param |
| class | QualitySign |
| struct | QualitySignSplit |
Public Types | |
| typedef Box3< ScalarType > | Box3Type |
| typedef MeshType::CoordType | CoordType |
| typedef vcg::GridStaticPtr < EdgeType, ScalarType > | EdgeGrid |
| typedef MeshType::EdgeIterator | EdgeIterator |
| typedef MeshType::EdgeType | EdgeType |
| typedef MeshType::FaceIterator | FaceIterator |
| typedef MeshType::FacePointer | FacePointer |
| typedef MeshType::FaceType | FaceType |
| typedef vcg::GridStaticPtr < FaceType, ScalarType > | MeshGrid |
| typedef face::Pos< FaceType > | PosType |
| typedef MeshType::ScalarType | ScalarType |
| typedef MeshType::VertexIterator | VertexIterator |
| typedef MeshType::VertexPointer | VertexPointer |
| typedef MeshType::VertexType | VertexType |
Public Member Functions | |
| void | BuildConnectedComponentVectors (MeshType &poly, std::vector< std::vector< int > > &ccVec) |
| void | BuildConnectedComponentVectorsOld (MeshType &poly, std::vector< std::vector< int > > &ccVec) |
| void | BuildVisitTree (MeshType &dualMesh) |
| void | CleanSpuriousDanglingEdges (MeshType &poly) |
| CoM (MeshType &_m) | |
| Plane3f | ComputeEdgePlane (VertexType *v0, VertexType *v1) |
| void | ComputePlaneField (MeshType &poly, EdgeGrid &edgeGrid, int ind) |
| int | countNonVisitedEdges (VertexType *vp, EdgeType *&ep) |
| void | CutAlongPolyLineUsingField (MeshType &poly, EdgeGrid &edgeGrid, std::vector< int > &newVertVec) |
| void | CutWithPolyLine (MeshType &poly) |
| void | DecomposeNonManifoldPolyline (MeshType &poly, bool singSplitFlag=true) |
| void | DumpPlaneMesh (MeshType &poly, std::vector< Plane3f > &planeVec, int i=0) |
| void | EvaluateHausdorffDistance (MeshType &poly, Distribution< ScalarType > &dist) |
| bool | ExistEdge (KdTree< ScalarType > &kdtree, CoordType &p0, CoordType &p1, PosType &fpos) |
| void | ExtractSubMesh (MeshType &poly, std::vector< int > &ind, MeshType &subPoly) |
| void | Init () |
| void | MarkFauxEdgeWithPolyLine (MeshType &m, MeshType &e) |
| float | MaxSegDist (VertexType *v0, VertexType *v1, Point3f &farthestPointOnSurf, Point3f &farthestN, Distribution< ScalarType > *dist=0) |
| float | MinDistOnEdge (Point3f samplePnt, EdgeGrid &edgeGrid, MeshType &poly, Point3f &closestPoint) |
| bool | OptimizeTree (MeshType &t) |
| void | Refine (MeshType &poly, bool uniformFlag=false) |
| void | RefineBaseMesh (MeshType &poly) |
| void | Reorient (MeshType &poly, std::vector< std::vector< int > > &ccVec) |
| void | Retract (MeshType &t) |
| void | Simplify (MeshType &poly) |
| void | SmoothProject (MeshType &poly, int iterNum, ScalarType smoothWeight, ScalarType projectWeight) |
| SmoothProject. | |
| void | SnapPolyline (MeshType &t) |
| void | SnapPolyline (MeshType &poly, std::vector< int > *newVertVec) |
| void | SplitMeshWithPoints (MeshType &m, std::vector< VertexType * > &vec, std::vector< int > &newVertVec) |
| void | WalkAlongPolyLine (MeshType &poly, std::vector< VertexType * > &ptVec) |
Static Public Member Functions | |
| static bool | CompareVertex (const MeshType &m, const VertexType &vA, const VertexType &vB) |
| static void | ExtractVertex (const MeshType &srcMesh, const FaceType &f, int whichWedge, const MeshType &dstMesh, VertexType &v) |
| ExtractVertex must extract an unambiguous representation of a vertex to be used with attribute_seam.h. | |
| static void | FindTerminalPoints (MeshType &poly, std::vector< VertexType * > &vec) |
| static float | MinDistOnEdge (VertexType *v0, VertexType *v1, EdgeGrid &edgeGrid, MeshType &poly, Point3f &closestPoint) |
| static Point3f | QLerp (VertexType *v0, VertexType *v1) |
Public Attributes | |
| MeshType & | base |
| Param | par |
| MeshGrid | uniformGrid |
A class for managing curves on a 2manifold.
This class is used to project/simplify/smooth polylines over a triangulated surface.
Definition at line 53 of file curve_on_manifold.h.
| typedef Box3<ScalarType> vcg::tri::CoM< MeshType >::Box3Type |
Definition at line 66 of file curve_on_manifold.h.
| typedef MeshType::CoordType vcg::tri::CoM< MeshType >::CoordType |
Definition at line 57 of file curve_on_manifold.h.
| typedef vcg::GridStaticPtr<EdgeType, ScalarType> vcg::tri::CoM< MeshType >::EdgeGrid |
Definition at line 68 of file curve_on_manifold.h.
| typedef MeshType::EdgeIterator vcg::tri::CoM< MeshType >::EdgeIterator |
Definition at line 61 of file curve_on_manifold.h.
| typedef MeshType::EdgeType vcg::tri::CoM< MeshType >::EdgeType |
Definition at line 62 of file curve_on_manifold.h.
| typedef MeshType::FaceIterator vcg::tri::CoM< MeshType >::FaceIterator |
Definition at line 65 of file curve_on_manifold.h.
| typedef MeshType::FacePointer vcg::tri::CoM< MeshType >::FacePointer |
Definition at line 64 of file curve_on_manifold.h.
| typedef MeshType::FaceType vcg::tri::CoM< MeshType >::FaceType |
Definition at line 63 of file curve_on_manifold.h.
| typedef vcg::GridStaticPtr<FaceType, ScalarType> vcg::tri::CoM< MeshType >::MeshGrid |
Definition at line 67 of file curve_on_manifold.h.
| typedef face::Pos<FaceType> vcg::tri::CoM< MeshType >::PosType |
Definition at line 69 of file curve_on_manifold.h.
| typedef MeshType::ScalarType vcg::tri::CoM< MeshType >::ScalarType |
Definition at line 56 of file curve_on_manifold.h.
| typedef MeshType::VertexIterator vcg::tri::CoM< MeshType >::VertexIterator |
Definition at line 60 of file curve_on_manifold.h.
| typedef MeshType::VertexPointer vcg::tri::CoM< MeshType >::VertexPointer |
Definition at line 59 of file curve_on_manifold.h.
| typedef MeshType::VertexType vcg::tri::CoM< MeshType >::VertexType |
Definition at line 58 of file curve_on_manifold.h.
| vcg::tri::CoM< MeshType >::CoM | ( | MeshType & | _m | ) | [inline] |
Definition at line 113 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::BuildConnectedComponentVectors | ( | MeshType & | poly, |
| std::vector< std::vector< int > > & | ccVec | ||
| ) | [inline] |
Definition at line 999 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::BuildConnectedComponentVectorsOld | ( | MeshType & | poly, |
| std::vector< std::vector< int > > & | ccVec | ||
| ) | [inline] |
Definition at line 1047 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::BuildVisitTree | ( | MeshType & | dualMesh | ) | [inline] |
Definition at line 328 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::CleanSpuriousDanglingEdges | ( | MeshType & | poly | ) | [inline] |
Definition at line 245 of file curve_on_manifold.h.
| static bool vcg::tri::CoM< MeshType >::CompareVertex | ( | const MeshType & | m, |
| const VertexType & | vA, | ||
| const VertexType & | vB | ||
| ) | [inline, static] |
Definition at line 499 of file curve_on_manifold.h.
| Plane3f vcg::tri::CoM< MeshType >::ComputeEdgePlane | ( | VertexType * | v0, |
| VertexType * | v1 | ||
| ) | [inline] |
Definition at line 663 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::ComputePlaneField | ( | MeshType & | poly, |
| EdgeGrid & | edgeGrid, | ||
| int | ind | ||
| ) | [inline] |
Definition at line 676 of file curve_on_manifold.h.
| int vcg::tri::CoM< MeshType >::countNonVisitedEdges | ( | VertexType * | vp, |
| EdgeType *& | ep | ||
| ) | [inline] |
Definition at line 118 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::CutAlongPolyLineUsingField | ( | MeshType & | poly, |
| EdgeGrid & | edgeGrid, | ||
| std::vector< int > & | newVertVec | ||
| ) | [inline] |
Definition at line 714 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::CutWithPolyLine | ( | MeshType & | poly | ) | [inline] |
Definition at line 828 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::DecomposeNonManifoldPolyline | ( | MeshType & | poly, |
| bool | singSplitFlag = true |
||
| ) | [inline] |
Definition at line 938 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::DumpPlaneMesh | ( | MeshType & | poly, |
| std::vector< Plane3f > & | planeVec, | ||
| int | i = 0 |
||
| ) | [inline] |
Definition at line 648 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::EvaluateHausdorffDistance | ( | MeshType & | poly, |
| Distribution< ScalarType > & | dist | ||
| ) | [inline] |
Definition at line 1291 of file curve_on_manifold.h.
| bool vcg::tri::CoM< MeshType >::ExistEdge | ( | KdTree< ScalarType > & | kdtree, |
| CoordType & | p0, | ||
| CoordType & | p1, | ||
| PosType & | fpos | ||
| ) | [inline] |
Definition at line 138 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::ExtractSubMesh | ( | MeshType & | poly, |
| std::vector< int > & | ind, | ||
| MeshType & | subPoly | ||
| ) | [inline] |
Definition at line 1099 of file curve_on_manifold.h.
| static void vcg::tri::CoM< MeshType >::ExtractVertex | ( | const MeshType & | srcMesh, |
| const FaceType & | f, | ||
| int | whichWedge, | ||
| const MeshType & | dstMesh, | ||
| VertexType & | v | ||
| ) | [inline, static] |
ExtractVertex must extract an unambiguous representation of a vertex to be used with attribute_seam.h.
Definition at line 489 of file curve_on_manifold.h.
| static void vcg::tri::CoM< MeshType >::FindTerminalPoints | ( | MeshType & | poly, |
| std::vector< VertexType * > & | vec | ||
| ) | [inline, static] |
Definition at line 986 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::Init | ( | ) | [inline] |
Definition at line 1245 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::MarkFauxEdgeWithPolyLine | ( | MeshType & | m, |
| MeshType & | e | ||
| ) | [inline] |
Definition at line 379 of file curve_on_manifold.h.
| float vcg::tri::CoM< MeshType >::MaxSegDist | ( | VertexType * | v0, |
| VertexType * | v1, | ||
| Point3f & | farthestPointOnSurf, | ||
| Point3f & | farthestN, | ||
| Distribution< ScalarType > * | dist = 0 |
||
| ) | [inline] |
Definition at line 1314 of file curve_on_manifold.h.
| float vcg::tri::CoM< MeshType >::MinDistOnEdge | ( | Point3f | samplePnt, |
| EdgeGrid & | edgeGrid, | ||
| MeshType & | poly, | ||
| Point3f & | closestPoint | ||
| ) | [inline] |
Definition at line 450 of file curve_on_manifold.h.
| static float vcg::tri::CoM< MeshType >::MinDistOnEdge | ( | VertexType * | v0, |
| VertexType * | v1, | ||
| EdgeGrid & | edgeGrid, | ||
| MeshType & | poly, | ||
| Point3f & | closestPoint | ||
| ) | [inline, static] |
Definition at line 459 of file curve_on_manifold.h.
| bool vcg::tri::CoM< MeshType >::OptimizeTree | ( | MeshType & | t | ) | [inline] |
Definition at line 172 of file curve_on_manifold.h.
| static Point3f vcg::tri::CoM< MeshType >::QLerp | ( | VertexType * | v0, |
| VertexType * | v1 | ||
| ) | [inline, static] |
Definition at line 510 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::Refine | ( | MeshType & | poly, |
| bool | uniformFlag = false |
||
| ) | [inline] |
Definition at line 1338 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::RefineBaseMesh | ( | MeshType & | poly | ) | [inline] |
Definition at line 1364 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::Reorient | ( | MeshType & | poly, |
| std::vector< std::vector< int > > & | ccVec | ||
| ) | [inline] |
Definition at line 1124 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::Retract | ( | MeshType & | t | ) | [inline] |
Definition at line 195 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::Simplify | ( | MeshType & | poly | ) | [inline] |
Definition at line 1255 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::SmoothProject | ( | MeshType & | poly, |
| int | iterNum, | ||
| ScalarType | smoothWeight, | ||
| ScalarType | projectWeight | ||
| ) | [inline] |
SmoothProject.
| poly | |
| iterNum | |
| smoothWeight | [0..1] range; |
| projectWeight | [0..1] range; |
The very important function to adapt a polyline onto the base mesh The projection process must be done slowly to guarantee some empirical convergence... For each iteration it choose a new position of each vertex of the polyline. The new position is a blend between the smoothed position, the closest point on the surface and the original position. You need a good balance... after each iteration the polyline is refined and simplified.
Definition at line 1434 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::SnapPolyline | ( | MeshType & | t | ) | [inline] |
Definition at line 412 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::SnapPolyline | ( | MeshType & | poly, |
| std::vector< int > * | newVertVec | ||
| ) | [inline] |
Definition at line 873 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::SplitMeshWithPoints | ( | MeshType & | m, |
| std::vector< VertexType * > & | vec, | ||
| std::vector< int > & | newVertVec | ||
| ) | [inline] |
Definition at line 1171 of file curve_on_manifold.h.
| void vcg::tri::CoM< MeshType >::WalkAlongPolyLine | ( | MeshType & | poly, |
| std::vector< VertexType * > & | ptVec | ||
| ) | [inline] |
Definition at line 798 of file curve_on_manifold.h.
| MeshType& vcg::tri::CoM< MeshType >::base |
Definition at line 109 of file curve_on_manifold.h.
| Param vcg::tri::CoM< MeshType >::par |
Definition at line 112 of file curve_on_manifold.h.
| MeshGrid vcg::tri::CoM< MeshType >::uniformGrid |
Definition at line 110 of file curve_on_manifold.h.