Commit 3288e972 authored by Pierre Kraemer's avatar Pierre Kraemer

ridge lines computation

parent 9567ab6e
...@@ -36,64 +36,141 @@ namespace Algo ...@@ -36,64 +36,141 @@ namespace Algo
namespace Geometry namespace Geometry
{ {
#define EMPTY 0 enum
#define SEGMENT 1 {
#define BARY 2 EMPTY,
SEGMENT,
BARY
};
//#define EMPTY 0
//#define SEGMENT 1
//#define BARY 2
typedef struct { Dart d ; float w ; } e0point ; typedef struct { Dart d ; float w ; } e0point ;
typedef struct { e0point p1 ; e0point p2 ; int valid ; } e0segment ; typedef struct { e0point p1 ; e0point p2 ; unsigned char type ; } e0segment ;
typedef NoMathIONameAttribute<e0segment> ridgeSegment ; typedef NoMathIONameAttribute<e0segment> ridgeSegment ;
template <typename PFP> template <typename PFP>
void featureEdgeDetection(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& featureEdge) ; void featureEdgeDetection(
typename PFP::MAP& map,
template <typename PFP> const typename PFP::TVEC3& position,
void computeArea(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TREAL& area, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; CellMarker& featureEdge) ;
template <typename PFP> template <typename PFP>
void computeFaceGradient(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& face_gradient, const typename PFP::TVEC3& face_normal, const typename PFP::TREAL& kmax, const typename PFP::TREAL& area, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; void computeFaceGradient(
typename PFP::MAP& map,
template <typename PFP> const typename PFP::TVEC3& position,
void computeGradient(typename PFP::MAP& map, const typename PFP::TVEC3& position, typename PFP::TVEC3& gradient, typename PFP::TVEC3& face_gradient, const typename PFP::TREAL& area, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; typename PFP::TVEC3& face_gradient,
const typename PFP::TVEC3& face_normal,
template <typename PFP> const typename PFP::TREAL& kmax,
void computeTriangleType(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& regularMarker, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; const typename PFP::TREAL& area,
const FunctorSelect& select = allDarts,
template <typename PFP> unsigned int thread = 0) ;
void computeRidgeLines(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& regularMarker, const typename PFP::TVEC3& faceGradient, const typename PFP::TREAL& area, typename PFP::TVEC3& k, AttributeHandler<ridgeSegment>& ridge_segments, const FunctorSelect& select = allDarts, unsigned int thread = 0) ;
//template <typename PFP>
template <typename PFP> //void computeVertexGradient(
void initRidgeSegments(typename PFP::MAP& map, const typename PFP::TVEC3& position, AttributeHandler<ridgeSegment>& ridge_segments, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; // typename PFP::MAP& map,
// const typename PFP::TVEC3& position,
template <typename PFP> // typename PFP::TVEC3& gradient,
void computeSingularTriangle(typename PFP::MAP& map, const typename PFP::TVEC3& position, CellMarker& regularMarker, typename PFP::TVEC3& k, AttributeHandler<ridgeSegment>& ridge_segments, const FunctorSelect& select = allDarts, unsigned int thread = 0) ; // typename PFP::TVEC3& face_gradient,
// const typename PFP::TREAL& area,
template <typename PFP> // const FunctorSelect& select = allDarts,
std::vector<typename PFP::VEC3> occludingContoursDetection(typename PFP::MAP& map, const typename PFP::VEC3& cameraPosition, const typename PFP::TVEC3& position, const typename PFP::TVEC3& normal) ; // unsigned int thread = 0) ;
template <typename PFP> template <typename PFP>
typename PFP::TREAL faceArea(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ; void computeTriangleType(
typename PFP::MAP& map,
template <typename PFP> const typename PFP::TVEC3& Kmax,
typename PFP::VEC3 faceGradient(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, const typename PFP::TVEC3& face_normal, const typename PFP::TREAL& kmax, const typename PFP::TREAL& area) ; CellMarker& regularMarker,
const FunctorSelect& select = allDarts,
template <typename PFP> unsigned int thread = 0) ;
bool triangleType(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position) ;
template <typename PFP>
template <typename PFP> void computeRidgeLines(
bool isInSameOctant(const typename PFP::VEC3& pos1, const typename PFP::VEC3& pos2) ; typename PFP::MAP& map,
const typename PFP::TVEC3& position,
template <typename PFP> CellMarker& regularMarker,
void ridgeLines(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, CellMarker& regularMarker, typename PFP::TVEC3& k, const typename PFP::TVEC3& faceGradient, const typename PFP::TREAL& area, AttributeHandler<ridgeSegment>& ridge_segments) ; const typename PFP::TVEC3& faceGradient,
const typename PFP::TREAL& area,
template <typename PFP> const typename PFP::TVEC3& K,
typename PFP::REAL extremality(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, typename PFP::TVEC3& k, const typename PFP::TVEC3& faceGradient, const typename PFP::TREAL& area) ; AttributeHandler<ridgeSegment>& ridge_segments,
const FunctorSelect& select = allDarts,
template <typename PFP> unsigned int thread = 0) ;
typename PFP::TVEC3 vertexGradient(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, const typename PFP::TVEC3& face_gradient, const typename PFP::TREAL& area) ;
template <typename PFP>
template <typename PFP> void initRidgeSegments(
void singularTriangle(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& position, CellMarker& regularMarker, AttributeHandler<ridgeSegment>& ridge_segments) ; typename PFP::MAP& map,
const typename PFP::TVEC3& position,
AttributeHandler<ridgeSegment>& ridge_segments,
const FunctorSelect& select = allDarts,
unsigned int thread = 0) ;
template <typename PFP>
void computeSingularTriangle(
typename PFP::MAP& map,
const typename PFP::TVEC3& position,
CellMarker& regularMarker,
typename PFP::TVEC3& k,
AttributeHandler<ridgeSegment>& ridge_segments,
const FunctorSelect& select = allDarts,
unsigned int thread = 0) ;
template <typename PFP>
std::vector<typename PFP::VEC3> occludingContoursDetection(
typename PFP::MAP& map,
const typename PFP::VEC3& cameraPosition,
const typename PFP::TVEC3& position,
const typename PFP::TVEC3& normal) ;
template <typename PFP>
typename PFP::VEC3 faceGradient(
typename PFP::MAP& map,
Dart d,
const typename PFP::TVEC3& position,
const typename PFP::TVEC3& face_normal,
const typename PFP::TREAL& kmax,
const typename PFP::TREAL& area) ;
template <typename PFP>
bool isTriangleRegular(typename PFP::MAP& map, Dart d, const typename PFP::TVEC3& Kmax) ;
//template <typename PFP>
//bool isInSameOctant(const typename PFP::VEC3& pos1, const typename PFP::VEC3& pos2) ;
template <typename PFP>
void ridgeLines(
typename PFP::MAP& map,
Dart d,
const typename PFP::TVEC3& position,
const typename PFP::TVEC3& K,
const typename PFP::TVEC3& faceGradient,
const typename PFP::TREAL& area,
AttributeHandler<ridgeSegment>& ridge_segments) ;
template <typename PFP>
typename PFP::REAL extremality(
typename PFP::MAP& map,
Dart d,
const typename PFP::VEC3& K,
const typename PFP::TVEC3& faceGradient,
const typename PFP::TREAL& area) ;
//template <typename PFP>
//typename PFP::TVEC3 vertexGradient(
// typename PFP::MAP& map,
// Dart d,
// const typename PFP::TVEC3& position,
// const typename PFP::TVEC3& face_gradient,
// const typename PFP::TREAL& area) ;
template <typename PFP>
void singularTriangle(
typename PFP::MAP& map,
Dart d,
const typename PFP::TVEC3& position,
CellMarker& regularMarker,
AttributeHandler<ridgeSegment>& ridge_segments) ;
template <typename PFP> template <typename PFP>
bool isEdgeInTriangle(typename PFP::MAP& map, Dart edge, Dart triangle) ; bool isEdgeInTriangle(typename PFP::MAP& map, Dart edge, Dart triangle) ;
......
This diff is collapsed.
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