Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef PCL_GEOMETRY_QUAD_MESH_H
00042 #define PCL_GEOMETRY_QUAD_MESH_H
00043
00044 #include <pcl/geometry/mesh_base.h>
00045
00046 namespace pcl
00047 {
00048 namespace geometry
00049 {
00051 struct QuadMeshTag {};
00052
00058 template <class MeshTraitsT>
00059 class QuadMesh : public pcl::geometry::MeshBase <QuadMesh <MeshTraitsT>, MeshTraitsT, QuadMeshTag>
00060 {
00061 public:
00062
00063 typedef pcl::geometry::MeshBase <QuadMesh <MeshTraitsT>, MeshTraitsT, QuadMeshTag> Base;
00064
00065 typedef QuadMesh <MeshTraitsT> Self;
00066 typedef boost::shared_ptr <Self> Ptr;
00067 typedef boost::shared_ptr <const Self> ConstPtr;
00068
00069 typedef typename Base::VertexData VertexData;
00070 typedef typename Base::HalfEdgeData HalfEdgeData;
00071 typedef typename Base::EdgeData EdgeData;
00072 typedef typename Base::FaceData FaceData;
00073 typedef typename Base::IsManifold IsManifold;
00074 typedef typename Base::MeshTag MeshTag;
00075
00076 typedef typename Base::HasVertexData HasVertexData;
00077 typedef typename Base::HasHalfEdgeData HasHalfEdgeData;
00078 typedef typename Base::HasEdgeData HasEdgeData;
00079 typedef typename Base::HasFaceData HasFaceData;
00080
00081 typedef typename Base::VertexDataCloud VertexDataCloud;
00082 typedef typename Base::HalfEdgeDataCloud HalfEdgeDataCloud;
00083 typedef typename Base::EdgeDataCloud EdgeDataCloud;
00084 typedef typename Base::FaceDataCloud FaceDataCloud;
00085
00086
00087 typedef typename Base::VertexIndex VertexIndex;
00088 typedef typename Base::HalfEdgeIndex HalfEdgeIndex;
00089 typedef typename Base::EdgeIndex EdgeIndex;
00090 typedef typename Base::FaceIndex FaceIndex;
00091
00092 typedef typename Base::VertexIndices VertexIndices;
00093 typedef typename Base::HalfEdgeIndices HalfEdgeIndices;
00094 typedef typename Base::EdgeIndices EdgeIndices;
00095 typedef typename Base::FaceIndices FaceIndices;
00096
00097
00098 typedef typename Base::VertexAroundVertexCirculator VertexAroundVertexCirculator;
00099 typedef typename Base::OutgoingHalfEdgeAroundVertexCirculator OutgoingHalfEdgeAroundVertexCirculator;
00100 typedef typename Base::IncomingHalfEdgeAroundVertexCirculator IncomingHalfEdgeAroundVertexCirculator;
00101 typedef typename Base::FaceAroundVertexCirculator FaceAroundVertexCirculator;
00102 typedef typename Base::VertexAroundFaceCirculator VertexAroundFaceCirculator;
00103 typedef typename Base::InnerHalfEdgeAroundFaceCirculator InnerHalfEdgeAroundFaceCirculator;
00104 typedef typename Base::OuterHalfEdgeAroundFaceCirculator OuterHalfEdgeAroundFaceCirculator;
00105 typedef typename Base::FaceAroundFaceCirculator FaceAroundFaceCirculator;
00106
00108 QuadMesh ()
00109 : Base (),
00110 add_quad_ (4)
00111 {
00112 }
00113
00115 using Base::addFace;
00116
00128 inline FaceIndex
00129 addFace (const VertexIndex& idx_v_0,
00130 const VertexIndex& idx_v_1,
00131 const VertexIndex& idx_v_2,
00132 const VertexIndex& idx_v_3,
00133 const FaceData& face_data = FaceData (),
00134 const EdgeData& edge_data = EdgeData (),
00135 const HalfEdgeData& half_edge_data = HalfEdgeData ())
00136 {
00137 add_quad_ [0] = idx_v_0;
00138 add_quad_ [1] = idx_v_1;
00139 add_quad_ [2] = idx_v_2;
00140 add_quad_ [3] = idx_v_3;
00141
00142 return (this->addFaceImplBase (add_quad_, face_data, edge_data, half_edge_data));
00143 }
00144
00145 private:
00146
00147
00148 friend class pcl::geometry::MeshBase <QuadMesh <MeshTraitsT>, MeshTraitsT, pcl::geometry::QuadMeshTag>;
00149
00151 inline FaceIndex
00152 addFaceImpl (const VertexIndices& vertices,
00153 const FaceData& face_data,
00154 const EdgeData& edge_data,
00155 const HalfEdgeData& half_edge_data)
00156 {
00157 if (vertices.size () == 4)
00158 return (this->addFaceImplBase (vertices, face_data, edge_data, half_edge_data));
00159 else
00160 return (FaceIndex ());
00161 }
00162
00164
00166
00168 VertexIndices add_quad_;
00169
00170 public:
00171
00172 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00173 };
00174 }
00175 }
00176
00177 #endif // PCL_GEOMETRY_QUAD_MESH_H