41 #ifndef PCL_SURFACE_ORGANIZED_FAST_MESH_H_
42 #define PCL_SURFACE_ORGANIZED_FAST_MESH_H_
44 #include <pcl/common/angles.h>
45 #include <pcl/surface/reconstruction.h>
64 template <
typename Po
intInT>
68 typedef boost::shared_ptr<OrganizedFastMesh<PointInT> >
Ptr;
69 typedef boost::shared_ptr<const OrganizedFastMesh<PointInT> >
ConstPtr;
183 addTriangle (
int a,
int b,
int c,
int idx, std::vector<pcl::Vertices>& polygons)
185 assert (idx < static_cast<int> (polygons.size ()));
186 polygons[idx].vertices.resize (3);
187 polygons[idx].vertices[0] = a;
188 polygons[idx].vertices[1] = b;
189 polygons[idx].vertices[2] = c;
201 addQuad (
int a,
int b,
int c,
int d,
int idx, std::vector<pcl::Vertices>& polygons)
203 assert (idx < static_cast<int> (polygons.size ()));
204 polygons[idx].vertices.resize (4);
205 polygons[idx].vertices[0] = a;
206 polygons[idx].vertices[1] = b;
207 polygons[idx].vertices[2] = c;
208 polygons[idx].vertices[3] = d;
221 int field_x_idx = 0,
int field_y_idx = 1,
int field_z_idx = 2)
223 float new_value = value;
234 isShadowed (
const PointInT& point_a,
const PointInT& point_b)
236 Eigen::Vector3f viewpoint = Eigen::Vector3f::Zero ();
237 Eigen::Vector3f dir_a = viewpoint - point_a.getVector3fMap ();
238 Eigen::Vector3f dir_b = point_b.getVector3fMap () - point_a.getVector3fMap ();
239 float distance_to_points = dir_a.norm ();
240 float distance_between_points = dir_b.norm ();
241 float cos_angle = dir_a.dot (dir_b) / (distance_to_points*distance_between_points);
242 if (cos_angle != cos_angle)
283 isValidQuad (
const int& a,
const int& b,
const int& c,
const int& d)
334 #ifdef PCL_NO_PRECOMPILE
335 #include <pcl/surface/impl/organized_fast_mesh.hpp>
338 #endif // PCL_SURFACE_ORGANIZED_FAST_MESH_H_