44 #ifndef _SHARED_4PCS_H_ 45 #define _SHARED_4PCS_H_ 47 #include "super4pcs/utils/disablewarnings.h" 69 normal_(other.normal_),
71 template<
typename Scalar>
72 explicit inline Point3D(
const Eigen::Matrix<Scalar, 3, 1>& other):
73 pos_({ other(0), other(1), other(2) }){
86 normal_ = normal.normalized();
98 Scalar x()
const {
return pos_.coeff(0); }
99 Scalar y()
const {
return pos_.coeff(1); }
119 vertices = { vertex0, vertex1, vertex2, vertex3 };
123 return vertices[0] != rhs[0] ? vertices[0] < rhs[0]
124 : vertices[1] != rhs[1] ? vertices[1] < rhs[1]
125 : vertices[2] != rhs[2] ? vertices[2] < rhs[2]
126 : vertices[3] < rhs[3];
130 return vertices[0] == rhs[0] &&
131 vertices[1] == rhs[1] &&
132 vertices[2] == rhs[2] &&
133 vertices[3] == rhs[3];
141 ofs <<
"[" << q[0] <<
" " << q[1] <<
" " << q[2] <<
" " << q[3] <<
"]";
165 size_t sample_size = 200;
169 int max_time_seconds = 60;
171 unsigned int randomSeed = std::mt19937::default_seed;
174 if(terminate_threshold_ < overlap_)
return false;
175 overlap_estimation = overlap_;
176 terminate_threshold = terminate_threshold_;
185 Scalar terminate_threshold = 1.0;
189 Scalar overlap_estimation = 0.2;
196 #endif //_SHARED_4PCS_H_ const VectorType & pos() const
Definition: shared4pcs.h:78
Point3D(const Eigen::Matrix< Scalar, 3, 1 > &other)
Definition: shared4pcs.h:72
typename Point3D::Scalar Scalar
Definition: shared4pcs.h:149
Match4PCSOptions()
Definition: shared4pcs.h:150
void normalize()
Definition: shared4pcs.h:89
Scalar y() const
Definition: shared4pcs.h:99
void set_normal(const VectorType &normal)
Definition: shared4pcs.h:85
int & operator[](int idx)
Definition: shared4pcs.h:137
Point3D()
Definition: shared4pcs.h:76
Scalar getOverlapEstimation() const
Definition: shared4pcs.h:180
Scalar & z()
Definition: shared4pcs.h:96
Point3D(const Point3D &other)
Definition: shared4pcs.h:67
The basic 3D point structure. A point potentially contains also directional information and color...
Definition: shared4pcs.h:61
int operator[](int idx) const
Definition: shared4pcs.h:136
const VectorType & rgb() const
Definition: shared4pcs.h:79
Eigen::Matrix< Scalar, 3, 1 > VectorType
Definition: shared4pcs.h:64
Scalar getTerminateThreshold() const
Definition: shared4pcs.h:179
bool hasColor() const
Definition: shared4pcs.h:92
Scalar z() const
Definition: shared4pcs.h:100
delta and overlap_estimation are the application parameters. All other parameters are more likely to ...
Definition: shared4pcs.h:148
void set_rgb(const VectorType &rgb)
Definition: shared4pcs.h:82
std::ofstream & operator<<(std::ofstream &ofs, const Quadrilateral &q)
Definition: shared4pcs.h:140
std::array< int, 4 > vertices
Definition: shared4pcs.h:117
float Scalar
Definition: shared4pcs.h:63
VectorType & pos()
Definition: shared4pcs.h:77
Scalar & y()
Definition: shared4pcs.h:95
Holds a base from P. The base contains 4 points (indices) from the set P.
Definition: shared4pcs.h:116
const VectorType & normal() const
Definition: shared4pcs.h:81
Quadrilateral(int vertex0, int vertex1, int vertex2, int vertex3)
Definition: shared4pcs.h:118
Scalar x() const
Definition: shared4pcs.h:98
bool configureOverlap(Scalar overlap_, Scalar terminate_threshold_=Scalar(1))
Definition: shared4pcs.h:173
Scalar & x()
Definition: shared4pcs.h:94
Point3D(Scalar x, Scalar y, Scalar z)
Definition: shared4pcs.h:66