| 42 | void exportPLY(); |
| 43 | |
| 44 | struct Comparator { |
| 45 | Comparator(const Vector3r &xi, std::vector<Vector3r>* x) : m_xi(xi), m_x(x) {}; |
| 46 | bool operator()(unsigned int a, unsigned int b) |
| 47 | { |
| 48 | return ((*m_x)[a] - m_xi).squaredNorm() < ((*m_x)[b] - m_xi).squaredNorm(); |
| 49 | } |
| 50 | |
| 51 | Vector3r m_xi; |
| 52 | std::vector<Vector3r> *m_x; |
| 53 | }; |
| 54 | |
| 55 | |
| 56 | const Real density0 = 1000.0; |