mesh_elements.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  * Point Cloud Library (PCL) - www.pointclouds.org
00005  * Copyright (c) 2009-2012, Willow Garage, Inc.
00006  * Copyright (c) 2012-, Open Perception, Inc.
00007  *
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  *
00014  *  * Redistributions of source code must retain the above copyright
00015  *    notice, this list of conditions and the following disclaimer.
00016  *  * Redistributions in binary form must reproduce the above
00017  *    copyright notice, this list of conditions and the following
00018  *    disclaimer in the documentation and/or other materials provided
00019  *    with the distribution.
00020  *  * Neither the name of the copyright holder(s) nor the names of its
00021  *    contributors may be used to endorse or promote products derived
00022  *    from this software without specific prior written permission.
00023  *
00024  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00026  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00027  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00028  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00029  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00030  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00031  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00032  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00033  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00034  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00035  * POSSIBILITY OF SUCH DAMAGE.
00036  *
00037  * $Id$
00038  *
00039  */
00040 
00041 #ifndef PCL_GEOMETRY_MESH_ELEMENTS_H
00042 #define PCL_GEOMETRY_MESH_ELEMENTS_H
00043 
00044 #include <pcl/geometry/mesh_indices.h>
00045 
00046 namespace pcl
00047 {
00048   namespace geometry
00049   {
00050     template <class DerivedT, class MeshTraitsT, class MeshTagT>
00051     class MeshBase;
00052 
00053     template <class MeshT>
00054     class MeshIO;
00055   } // End namespace geometry
00056 } // End namespace pcl
00057 
00059 // Vertex
00061 
00062 namespace pcl
00063 {
00064   namespace geometry
00065   {
00070     class Vertex
00071     {
00072       private:
00073 
00074         typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex;
00075 
00079         explicit Vertex (const HalfEdgeIndex& idx_outgoing_half_edge = HalfEdgeIndex ())
00080           : idx_outgoing_half_edge_ (idx_outgoing_half_edge)
00081         {}
00082 
00084         HalfEdgeIndex idx_outgoing_half_edge_;
00085 
00086         template <class DerivedT, class MeshTraitsT, class MeshTagT>
00087         friend class pcl::geometry::MeshBase;
00088 
00089         template <class MeshT>
00090         friend class pcl::geometry::MeshIO;
00091     };
00092   } // End namespace geometry
00093 } // End namespace pcl
00094 
00096 // HalfEdge
00098 
00099 namespace pcl
00100 {
00101   namespace geometry
00102   {
00107     class HalfEdge
00108     {
00109       private:
00110 
00111         typedef pcl::geometry::VertexIndex   VertexIndex;
00112         typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex;
00113         typedef pcl::geometry::FaceIndex     FaceIndex;
00114 
00121         explicit HalfEdge (const VertexIndex&   idx_terminating_vertex = VertexIndex   (),
00122                            const HalfEdgeIndex& idx_next_half_edge     = HalfEdgeIndex (),
00123                            const HalfEdgeIndex& idx_prev_half_edge     = HalfEdgeIndex (),
00124                            const FaceIndex&     idx_face               = FaceIndex     ())
00125           : idx_terminating_vertex_ (idx_terminating_vertex),
00126             idx_next_half_edge_     (idx_next_half_edge),
00127             idx_prev_half_edge_     (idx_prev_half_edge),
00128             idx_face_               (idx_face)
00129         {
00130         }
00131 
00133         VertexIndex idx_terminating_vertex_;
00134 
00136         HalfEdgeIndex idx_next_half_edge_;
00137 
00139         HalfEdgeIndex idx_prev_half_edge_;
00140 
00142         FaceIndex idx_face_;
00143 
00144         template <class DerivedT, class MeshTraitsT, class MeshTagT>
00145         friend class pcl::geometry::MeshBase;
00146 
00147         template <class MeshT>
00148         friend class pcl::geometry::MeshIO;
00149     };
00150   } // End namespace geometry
00151 } // End namespace pcl
00152 
00154 // Face
00156 
00157 namespace pcl
00158 {
00159   namespace geometry
00160   {
00165     class Face
00166     {
00167       private:
00168 
00169         typedef pcl::geometry::HalfEdgeIndex HalfEdgeIndex;
00170 
00174         explicit Face (const HalfEdgeIndex& idx_inner_half_edge = HalfEdgeIndex ())
00175           : idx_inner_half_edge_ (idx_inner_half_edge)
00176         {}
00177 
00179         HalfEdgeIndex idx_inner_half_edge_;
00180 
00181         template <class DerivedT, class MeshTraitsT, class MeshTagT>
00182         friend class pcl::geometry::MeshBase;
00183 
00184         template <class MeshT>
00185         friend class pcl::geometry::MeshIO;
00186     };
00187   } // End namespace geometry
00188 } // End namespace pcl
00189 
00190 #endif // PCL_GEOMETRY_MESH_ELEMENTS_H


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:25:32