Structural deformable models
Public Member Functions | Public Attributes | List of all members
NMerge Class Reference
Inheritance diagram for NMerge:
Inheritance graph
[legend]
Collaboration diagram for NMerge:
Collaboration graph
[legend]

Public Member Functions

 NMerge (float maxd, enum Model::DistType dtype=Model::DIST_XYS)
 
bool operator() (const Model *lhs, const Model *rhs) const
 

Public Attributes

enum Model::DistType m_DType
 
const float m_MaxD
 

Detailed Description

Definition at line 56 of file Searcher.cpp.

Constructor & Destructor Documentation

NMerge::NMerge ( float  maxd,
enum Model::DistType  dtype = Model::DIST_XYS 
)
inline

Definition at line 58 of file Searcher.cpp.

58  :
59  m_DType(dtype), m_MaxD(maxd) {};
enum Model::DistType m_DType
Definition: Searcher.cpp:71
const float m_MaxD
Definition: Searcher.cpp:72

Member Function Documentation

bool NMerge::operator() ( const Model lhs,
const Model rhs 
) const
inline

Definition at line 60 of file Searcher.cpp.

References Model::distance().

60  {
61  if(lhs && rhs) {
62  if(lhs == rhs) return true;
63  else {
64  register float dist = lhs->distance(*rhs, m_DType);
65 // cout << lhs << " merge " << rhs << " dist = " << dist
66 // << " > " << m_MaxD << endl;
67  return dist > m_MaxD;
68  }
69  } else return true;
70  }
enum Model::DistType m_DType
Definition: Searcher.cpp:71
const float m_MaxD
Definition: Searcher.cpp:72
float distance(const Model &rhs, enum Model::DistType kind=DIST_POINTS) const
Definition: Model.cpp:1043

Member Data Documentation

enum Model::DistType NMerge::m_DType

Definition at line 71 of file Searcher.cpp.

const float NMerge::m_MaxD

Definition at line 72 of file Searcher.cpp.


The documentation for this class was generated from the following file: