triangle_mesh.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2009-2012, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#pragma once
#include <utility>
#include <pcl/pcl_macros.h>
#include <pcl/geometry/mesh_base.h>
namespace pcl
{
namespace geometry
{
/** \brief Tag describing the type of the mesh. */
struct TriangleMeshTag {};
/** \brief Half-edge mesh that can only store triangles.
* \tparam MeshTraitsT Please have a look at pcl::geometry::DefaultMeshTraits.
* \author Martin Saelzle
* \ingroup geometry
*/
template <class MeshTraitsT>
class TriangleMesh : public pcl::geometry::MeshBase <TriangleMesh <MeshTraitsT>, MeshTraitsT, TriangleMeshTag>
{
public:
using Base = pcl::geometry::MeshBase <TriangleMesh <MeshTraitsT>, MeshTraitsT, TriangleMeshTag>;
using Self = TriangleMesh<MeshTraitsT>;
using Ptr = shared_ptr<Self>;
using ConstPtr = shared_ptr<const Self>;
using VertexData = typename Base::VertexData;
using HalfEdgeData = typename Base::HalfEdgeData;
using EdgeData = typename Base::EdgeData;
using FaceData = typename Base::FaceData;
using IsManifold = typename Base::IsManifold;
using MeshTag = typename Base::MeshTag;
using HasVertexData = typename Base::HasVertexData;
using HasHalfEdgeData = typename Base::HasHalfEdgeData;
using HasEdgeData = typename Base::HasEdgeData;
using HasFaceData = typename Base::HasFaceData;
using VertexDataCloud = typename Base::VertexDataCloud;
using HalfEdgeDataCloud = typename Base::HalfEdgeDataCloud;
using EdgeDataCloud = typename Base::EdgeDataCloud;
using FaceDataCloud = typename Base::FaceDataCloud;
// Indices
using VertexIndex = typename Base::VertexIndex;
using HalfEdgeIndex = typename Base::HalfEdgeIndex;
using EdgeIndex = typename Base::EdgeIndex;
using FaceIndex = typename Base::FaceIndex;
using FaceIndexPair = std::pair <FaceIndex, FaceIndex>;
using VertexIndices = typename Base::VertexIndices;
using HalfEdgeIndices = typename Base::HalfEdgeIndices;
using EdgeIndices = typename Base::EdgeIndices;
using FaceIndices = typename Base::FaceIndices;
// Circulators
using VertexAroundVertexCirculator = typename Base::VertexAroundVertexCirculator;
using OutgoingHalfEdgeAroundVertexCirculator = typename Base::OutgoingHalfEdgeAroundVertexCirculator;
using IncomingHalfEdgeAroundVertexCirculator = typename Base::IncomingHalfEdgeAroundVertexCirculator;
using FaceAroundVertexCirculator = typename Base::FaceAroundVertexCirculator;
using VertexAroundFaceCirculator = typename Base::VertexAroundFaceCirculator;
using InnerHalfEdgeAroundFaceCirculator = typename Base::InnerHalfEdgeAroundFaceCirculator;
using OuterHalfEdgeAroundFaceCirculator = typename Base::OuterHalfEdgeAroundFaceCirculator;
using FaceAroundFaceCirculator = typename Base::FaceAroundFaceCirculator;
/** \brief Constructor. */
TriangleMesh ()
: Base (),
add_triangle_ (3),
inner_he_atp_ (4),
is_new_atp_ (4)
{
}
/** \brief The base method of addFace is hidden because of the overloads in this class. */
using Base::addFace;
/** \brief Add a triangle to the mesh. Data is only added if it is associated with the elements. The last vertex is connected with the first one.
* \param[in] idx_v_0 Index to the first vertex.
* \param[in] idx_v_1 Index to the second vertex.
* \param[in] idx_v_2 Index to the third vertex.
* \param[in] face_data Data that is set for the face.
* \param[in] half_edge_data Data that is set for all added half-edges.
* \param[in] edge_data Data that is set for all added edges.
* \return Index to the new face. Failure is signaled by returning an invalid face index.
* \warning The vertices must be valid and unique (each vertex may be contained only once). Not complying with this requirement results in undefined behavior!
*/
inline FaceIndex
addFace (const VertexIndex& idx_v_0,
const VertexIndex& idx_v_1,
const VertexIndex& idx_v_2,
const FaceData& face_data = FaceData (),
const EdgeData& edge_data = EdgeData (),
const HalfEdgeData& half_edge_data = HalfEdgeData ())
{
add_triangle_ [0] = idx_v_0;
add_triangle_ [1] = idx_v_1;
add_triangle_ [2] = idx_v_2;
return (this->addFaceImplBase (add_triangle_, face_data, edge_data, half_edge_data));
}
/** \brief Add two triangles for the four given input vertices. When using a manifold triangle mesh it is not possible to connect two bounded regions without going through a non-manifold intermediate step. This method first tries to add the triangles individually and if this fails connects the whole configuration at once (if possible).
* \param[in] vertices Indices to the vertices of the new face. (The size must be equal to four).
* \param[in] face_data Data that is set for the face.
* \param[in] half_edge_data Data that is set for all added half-edges.
* \param[in] edge_data Data that is set for all added edges.
* \return Pair of face indices. The first index is valid if one triangle was added. Both indices are valid if two triangles were added.
* \warning The vertices must be valid and unique (each vertex may be contained only once). Not complying with this requirement results in undefined behavior!
*/
FaceIndexPair
addTrianglePair (const VertexIndices& vertices,
const FaceData& face_data = FaceData (),
const EdgeData& edge_data = EdgeData (),
const HalfEdgeData& half_edge_data = HalfEdgeData ())
{
if (vertices.size () != 4)
{
return (std::make_pair (FaceIndex (), FaceIndex ()));
}
return (this->addTrianglePair (vertices [0], vertices [1], vertices [2], vertices [3], face_data, edge_data, half_edge_data));
}
/** \brief Add two triangles for the four given input vertices. When using a manifold triangle mesh it is not possible to connect two bounded regions without going through a non-manifold intermediate step. This method first tries to add the triangles individually and if this fails connects the whole configuration at once (if possible).
* \param[in] idx_v_0 Index to the first vertex.
* \param[in] idx_v_1 Index to the second vertex.
* \param[in] idx_v_2 Index to the third vertex.
* \param[in] idx_v_3 Index to the fourth vertex.
* \param[in] face_data Data that is set for the face.
* \param[in] half_edge_data Data that is set for all added half-edges.
* \param[in] edge_data Data that is set for all added edges.
* \return Pair of face indices. The first index is valid if one triangle was added. Both indices are valid if two triangles were added.
* \warning The vertices must be valid and unique (each vertex may be contained only once). Not complying with this requirement results in undefined behavior!
*/
inline FaceIndexPair
addTrianglePair (const VertexIndex& idx_v_0,
const VertexIndex& idx_v_1,
const VertexIndex& idx_v_2,
const VertexIndex& idx_v_3,
const FaceData& face_data = FaceData (),
const EdgeData& edge_data = EdgeData (),
const HalfEdgeData& half_edge_data = HalfEdgeData ())
{
// Try to add two faces
// 3 - 2
// | / |
// 0 - 1
FaceIndex idx_face_0 = this->addFace (idx_v_0, idx_v_1, idx_v_2, face_data);
FaceIndex idx_face_1 = this->addFace (idx_v_0, idx_v_2, idx_v_3, face_data);
if (idx_face_0.isValid ())
{
return (std::make_pair (idx_face_0, idx_face_1));
}
if (idx_face_1.isValid ())
{
idx_face_0 = this->addFace (idx_v_0, idx_v_1, idx_v_2, face_data); // might be possible to add now
return (std::make_pair (idx_face_1, idx_face_0));
}
// Try to add two faces
// 3 - 2
// | \ |
// 0 - 1
idx_face_0 = this->addFace (idx_v_1, idx_v_2, idx_v_3, face_data);
idx_face_1 = this->addFace (idx_v_0, idx_v_1, idx_v_3, face_data);
if (idx_face_0.isValid ())
{
return (std::make_pair (idx_face_0, idx_face_1));
}
if (idx_face_1.isValid ())
{
idx_face_0 = this->addFace (idx_v_1, idx_v_2, idx_v_3, face_data); // might be possible to add now
return (std::make_pair (idx_face_1, idx_face_0));
}
if (!IsManifold::value)
{
return (std::make_pair (FaceIndex (), FaceIndex ()));
}
// Check manifoldness
if (!Base::checkTopology1 (idx_v_0,idx_v_1, inner_he_atp_ [0], is_new_atp_ [0], IsManifold ()) ||
!Base::checkTopology1 (idx_v_1,idx_v_2, inner_he_atp_ [1], is_new_atp_ [1], IsManifold ()) ||
!Base::checkTopology1 (idx_v_2,idx_v_3, inner_he_atp_ [2], is_new_atp_ [2], IsManifold ()) ||
!Base::checkTopology1 (idx_v_3,idx_v_0, inner_he_atp_ [3], is_new_atp_ [3], IsManifold ()))
{
return (std::make_pair (FaceIndex (), FaceIndex ()));
}
// Connect the triangle pair
if (!is_new_atp_ [0] && is_new_atp_ [1] && !is_new_atp_ [2] && is_new_atp_ [3])
{
return (this->connectTrianglePair (inner_he_atp_ [0], inner_he_atp_ [2], idx_v_0, idx_v_1, idx_v_2, idx_v_3, face_data, edge_data, half_edge_data));
}
if (is_new_atp_ [0] && !is_new_atp_ [1] && is_new_atp_ [2] && !is_new_atp_ [3])
{
return (this->connectTrianglePair (inner_he_atp_ [1], inner_he_atp_ [3], idx_v_1, idx_v_2, idx_v_3, idx_v_0, face_data, edge_data, half_edge_data));
}
return (std::make_pair (FaceIndex (), FaceIndex ()));
}
private:
// NOTE: Can't use the typedef of Base as a friend.
friend class pcl::geometry::MeshBase <TriangleMesh <MeshTraitsT>, MeshTraitsT, pcl::geometry::TriangleMeshTag>;
/** \brief addFace for the triangular mesh. */
inline FaceIndex
addFaceImpl (const VertexIndices& vertices,
const FaceData& face_data,
const EdgeData& edge_data,
const HalfEdgeData& half_edge_data)
{
if (vertices.size () == 3)
return (this->addFaceImplBase (vertices, face_data, edge_data, half_edge_data));
return (FaceIndex ());
}
/** \brief Connect the triangles a-b-c and a-c-d. The edges a-b and c-d must be old and the edges b-c and d-a must be new. */
// d - c
// | / |
// a - b
FaceIndexPair
connectTrianglePair (const HalfEdgeIndex& idx_he_ab,
const HalfEdgeIndex& idx_he_cd,
const VertexIndex& idx_v_a,
const VertexIndex& idx_v_b,
const VertexIndex& idx_v_c,
const VertexIndex& idx_v_d,
const FaceData& face_data,
const EdgeData& edge_data,
const HalfEdgeData& he_data)
{
// Add new half-edges
const HalfEdgeIndex idx_he_bc = Base::addEdge (idx_v_b, idx_v_c, he_data, edge_data);
const HalfEdgeIndex idx_he_da = Base::addEdge (idx_v_d, idx_v_a, he_data, edge_data);
const HalfEdgeIndex idx_he_ca = Base::addEdge (idx_v_c, idx_v_a, he_data, edge_data);
const HalfEdgeIndex idx_he_cb = Base::getOppositeHalfEdgeIndex (idx_he_bc);
const HalfEdgeIndex idx_he_ad = Base::getOppositeHalfEdgeIndex (idx_he_da);
const HalfEdgeIndex idx_he_ac = Base::getOppositeHalfEdgeIndex (idx_he_ca);
// Get the existing half-edges
const HalfEdgeIndex idx_he_ab_prev = Base::getPrevHalfEdgeIndex (idx_he_ab); // No reference!
const HalfEdgeIndex idx_he_ab_next = Base::getNextHalfEdgeIndex (idx_he_ab); // No reference!
const HalfEdgeIndex idx_he_cd_prev = Base::getPrevHalfEdgeIndex (idx_he_cd); // No reference!
const HalfEdgeIndex idx_he_cd_next = Base::getNextHalfEdgeIndex (idx_he_cd); // No reference!
// Connect the outer half-edges
Base::connectPrevNext (idx_he_ab_prev, idx_he_ad );
Base::connectPrevNext (idx_he_ad , idx_he_cd_next);
Base::connectPrevNext (idx_he_cd_prev, idx_he_cb );
Base::connectPrevNext (idx_he_cb , idx_he_ab_next);
// Connect the inner half-edges
Base::connectPrevNext (idx_he_ab, idx_he_bc);
Base::connectPrevNext (idx_he_bc, idx_he_ca);
Base::connectPrevNext (idx_he_ca, idx_he_ab);
Base::connectPrevNext (idx_he_ac, idx_he_cd);
Base::connectPrevNext (idx_he_cd, idx_he_da);
Base::connectPrevNext (idx_he_da, idx_he_ac);
// Connect the vertices to the boundary half-edges
Base::setOutgoingHalfEdgeIndex (idx_v_a, idx_he_ad );
Base::setOutgoingHalfEdgeIndex (idx_v_b, idx_he_ab_next);
Base::setOutgoingHalfEdgeIndex (idx_v_c, idx_he_cb );
Base::setOutgoingHalfEdgeIndex (idx_v_d, idx_he_cd_next);
// Add and connect the faces
HalfEdgeIndices inner_he_abc; inner_he_abc.reserve (3);
inner_he_abc.push_back (idx_he_ab);
inner_he_abc.push_back (idx_he_bc);
inner_he_abc.push_back (idx_he_ca);
HalfEdgeIndices inner_he_acd; inner_he_acd.reserve (3);
inner_he_acd.push_back (idx_he_ac);
inner_he_acd.push_back (idx_he_cd);
inner_he_acd.push_back (idx_he_da);
const FaceIndex idx_f_abc = Base::connectFace (inner_he_abc, face_data);
const FaceIndex idx_f_acd = Base::connectFace (inner_he_acd, face_data);
return (std::make_pair (idx_f_abc, idx_f_acd));
}
////////////////////////////////////////////////////////////////////////
// Members
////////////////////////////////////////////////////////////////////////
/** \brief Storage for adding a triangle. */
VertexIndices add_triangle_;
/** \brief Storage for addTrianglePair. */
HalfEdgeIndices inner_he_atp_;
/** \brief Storage for addTrianglePair. */
std::vector <bool> is_new_atp_;
public:
PCL_MAKE_ALIGNED_OPERATOR_NEW
};
} // End namespace geom
} // End namespace pcl
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceIndex
pcl::geometry::FaceIndex FaceIndex
Definition: mesh_base.h:136
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::IncomingHalfEdgeAroundVertexCirculator
pcl::geometry::IncomingHalfEdgeAroundVertexCirculator< const Self > IncomingHalfEdgeAroundVertexCirculator
Definition: mesh_base.h:146
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::getPrevHalfEdgeIndex
HalfEdgeIndex getPrevHalfEdgeIndex(const HalfEdgeIndex &idx_half_edge) const
Get the previous half-edge index to a given half-edge.
Definition: mesh_base.h:380
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::getOppositeHalfEdgeIndex
HalfEdgeIndex getOppositeHalfEdgeIndex(const HalfEdgeIndex &idx_half_edge) const
Get the opposite half-edge index to a given half-edge.
Definition: mesh_base.h:363
pcl::geometry::TriangleMesh::VertexIndices
typename Base::VertexIndices VertexIndices
Definition: triangle_mesh.h:95
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexIndex
pcl::geometry::VertexIndex VertexIndex
Definition: mesh_base.h:133
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceAroundFaceCirculator
pcl::geometry::FaceAroundFaceCirculator< const Self > FaceAroundFaceCirculator
Definition: mesh_base.h:151
pcl::geometry::TriangleMesh::OuterHalfEdgeAroundFaceCirculator
typename Base::OuterHalfEdgeAroundFaceCirculator OuterHalfEdgeAroundFaceCirculator
Definition: triangle_mesh.h:107
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::EdgeIndices
std::vector< EdgeIndex > EdgeIndices
Definition: mesh_base.h:140
pcl::geometry::TriangleMesh::FaceIndexPair
std::pair< FaceIndex, FaceIndex > FaceIndexPair
Definition: triangle_mesh.h:93
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::OuterHalfEdgeAroundFaceCirculator
pcl::geometry::OuterHalfEdgeAroundFaceCirculator< const Self > OuterHalfEdgeAroundFaceCirculator
Definition: mesh_base.h:150
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexDataCloud
pcl::PointCloud< VertexData > VertexDataCloud
Definition: mesh_base.h:127
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::getNextHalfEdgeIndex
HalfEdgeIndex getNextHalfEdgeIndex(const HalfEdgeIndex &idx_half_edge) const
Get the next half-edge index to a given half-edge.
Definition: mesh_base.h:372
pcl::geometry::TriangleMesh::MeshTag
typename Base::MeshTag MeshTag
Definition: triangle_mesh.h:76
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexData
typename MeshTraitsT::VertexData VertexData
Definition: mesh_base.h:110
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::connectPrevNext
void connectPrevNext(const HalfEdgeIndex &idx_he_ab, const HalfEdgeIndex &idx_he_bc)
Connect the next and prev indices of the two half-edges with each other.
Definition: mesh_base.h:1360
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::IsManifold
typename MeshTraitsT::IsManifold IsManifold
Definition: mesh_base.h:114
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexAroundFaceCirculator
pcl::geometry::VertexAroundFaceCirculator< const Self > VertexAroundFaceCirculator
Definition: mesh_base.h:148
pcl::geometry::TriangleMesh::InnerHalfEdgeAroundFaceCirculator
typename Base::InnerHalfEdgeAroundFaceCirculator InnerHalfEdgeAroundFaceCirculator
Definition: triangle_mesh.h:106
pcl::geometry::TriangleMesh::HalfEdgeDataCloud
typename Base::HalfEdgeDataCloud HalfEdgeDataCloud
Definition: triangle_mesh.h:84
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::MeshTag
TriangleMeshTag MeshTag
Definition: mesh_base.h:119
pcl::geometry::TriangleMesh::EdgeData
typename Base::EdgeData EdgeData
Definition: triangle_mesh.h:73
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceData
typename MeshTraitsT::FaceData FaceData
Definition: mesh_base.h:113
pcl::geometry::TriangleMesh::HasVertexData
typename Base::HasVertexData HasVertexData
Definition: triangle_mesh.h:78
pcl::geometry::TriangleMesh::OutgoingHalfEdgeAroundVertexCirculator
typename Base::OutgoingHalfEdgeAroundVertexCirculator OutgoingHalfEdgeAroundVertexCirculator
Definition: triangle_mesh.h:102
pcl::geometry::TriangleMesh::VertexAroundFaceCirculator
typename Base::VertexAroundFaceCirculator VertexAroundFaceCirculator
Definition: triangle_mesh.h:105
pcl::geometry::TriangleMesh::FaceAroundVertexCirculator
typename Base::FaceAroundVertexCirculator FaceAroundVertexCirculator
Definition: triangle_mesh.h:104
pcl::geometry::HalfEdgeIndex
Index used to access elements in the half-edge mesh.
Definition: mesh_indices.h:200
pcl::geometry::VertexIndex
Index used to access elements in the half-edge mesh.
Definition: mesh_indices.h:61
pcl::geometry::TriangleMesh::IncomingHalfEdgeAroundVertexCirculator
typename Base::IncomingHalfEdgeAroundVertexCirculator IncomingHalfEdgeAroundVertexCirculator
Definition: triangle_mesh.h:103
pcl::geometry::TriangleMesh::HalfEdgeData
typename Base::HalfEdgeData HalfEdgeData
Definition: triangle_mesh.h:72
pcl::geometry::TriangleMesh::HalfEdgeIndex
typename Base::HalfEdgeIndex HalfEdgeIndex
Definition: triangle_mesh.h:90
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::setOutgoingHalfEdgeIndex
void setOutgoingHalfEdgeIndex(const VertexIndex &idx_vertex, const HalfEdgeIndex &idx_outgoing_half_edge)
Set the outgoing half-edge index to a given vertex.
Definition: mesh_base.h:1801
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HalfEdgeData
typename MeshTraitsT::HalfEdgeData HalfEdgeData
Definition: mesh_base.h:111
pcl::geometry::TriangleMesh::EdgeDataCloud
typename Base::EdgeDataCloud EdgeDataCloud
Definition: triangle_mesh.h:85
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HalfEdgeIndices
std::vector< HalfEdgeIndex > HalfEdgeIndices
Definition: mesh_base.h:139
pcl::geometry::TriangleMesh::VertexDataCloud
typename Base::VertexDataCloud VertexDataCloud
Definition: triangle_mesh.h:83
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::addEdge
HalfEdgeIndex addEdge(const VertexIndex &idx_v_a, const VertexIndex &idx_v_b, const HalfEdgeData &he_data, const EdgeData &edge_data)
Add an edge between the two given vertices and connect them with the vertices.
Definition: mesh_base.h:1182
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::addFaceImplBase
FaceIndex addFaceImplBase(const VertexIndices &vertices, const FaceData &face_data, const EdgeData &edge_data, const HalfEdgeData &half_edge_data)
General implementation of addFace.
Definition: mesh_base.h:1108
pcl::geometry::TriangleMesh::addFace
FaceIndex addFace(const VertexIndex &idx_v_0, const VertexIndex &idx_v_1, const VertexIndex &idx_v_2, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
Add a triangle to the mesh.
Definition: triangle_mesh.h:133
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::connectFace
FaceIndex connectFace(const HalfEdgeIndices &inner_he, const FaceData &face_data)
Add a face to the mesh and connect it to the half-edges.
Definition: mesh_base.h:1342
pcl::geometry::TriangleMesh::FaceAroundFaceCirculator
typename Base::FaceAroundFaceCirculator FaceAroundFaceCirculator
Definition: triangle_mesh.h:108
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::EdgeIndex
pcl::geometry::EdgeIndex EdgeIndex
Definition: mesh_base.h:135
pcl::geometry::TriangleMesh::HasFaceData
typename Base::HasFaceData HasFaceData
Definition: triangle_mesh.h:81
pcl::geometry::TriangleMeshTag
Tag describing the type of the mesh.
Definition: triangle_mesh.h:53
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexAroundVertexCirculator
pcl::geometry::VertexAroundVertexCirculator< const Self > VertexAroundVertexCirculator
Definition: mesh_base.h:144
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceDataCloud
pcl::PointCloud< FaceData > FaceDataCloud
Definition: mesh_base.h:130
PCL_MAKE_ALIGNED_OPERATOR_NEW
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition: pcl_macros.h:371
pcl::geometry::TriangleMesh::FaceDataCloud
typename Base::FaceDataCloud FaceDataCloud
Definition: triangle_mesh.h:86
pcl::geometry::TriangleMesh::Ptr
shared_ptr< Self > Ptr
Definition: triangle_mesh.h:68
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HasFaceData
std::integral_constant< bool, !std::is_same< FaceData, pcl::geometry::NoData >::value > HasFaceData
Definition: mesh_base.h:125
pcl::geometry::TriangleMesh
Half-edge mesh that can only store triangles.
Definition: triangle_mesh.h:61
pcl::geometry::TriangleMesh::VertexData
typename Base::VertexData VertexData
Definition: triangle_mesh.h:71
pcl::geometry::TriangleMesh::EdgeIndices
typename Base::EdgeIndices EdgeIndices
Definition: triangle_mesh.h:97
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceAroundVertexCirculator
pcl::geometry::FaceAroundVertexCirculator< const Self > FaceAroundVertexCirculator
Definition: mesh_base.h:147
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HalfEdgeDataCloud
pcl::PointCloud< HalfEdgeData > HalfEdgeDataCloud
Definition: mesh_base.h:128
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::EdgeData
typename MeshTraitsT::EdgeData EdgeData
Definition: mesh_base.h:112
pcl::geometry::TriangleMesh::FaceData
typename Base::FaceData FaceData
Definition: triangle_mesh.h:74
pcl::geometry::TriangleMesh::VertexAroundVertexCirculator
typename Base::VertexAroundVertexCirculator VertexAroundVertexCirculator
Definition: triangle_mesh.h:101
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HasVertexData
std::integral_constant< bool, !std::is_same< VertexData, pcl::geometry::NoData >::value > HasVertexData
Definition: mesh_base.h:122
pcl::geometry::TriangleMesh::HasEdgeData
typename Base::HasEdgeData HasEdgeData
Definition: triangle_mesh.h:80
pcl::geometry::FaceIndex
Index used to access elements in the half-edge mesh.
Definition: mesh_indices.h:478
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::EdgeDataCloud
pcl::PointCloud< EdgeData > EdgeDataCloud
Definition: mesh_base.h:129
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::OutgoingHalfEdgeAroundVertexCirculator
pcl::geometry::OutgoingHalfEdgeAroundVertexCirculator< const Self > OutgoingHalfEdgeAroundVertexCirculator
Definition: mesh_base.h:145
pcl::geometry::TriangleMesh::FaceIndices
typename Base::FaceIndices FaceIndices
Definition: triangle_mesh.h:98
pcl::geometry::TriangleMesh::TriangleMesh
TriangleMesh()
Constructor.
Definition: triangle_mesh.h:111
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HasHalfEdgeData
std::integral_constant< bool, !std::is_same< HalfEdgeData, pcl::geometry::NoData >::value > HasHalfEdgeData
Definition: mesh_base.h:123
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::FaceIndices
std::vector< FaceIndex > FaceIndices
Definition: mesh_base.h:141
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HasEdgeData
std::integral_constant< bool, !std::is_same< EdgeData, pcl::geometry::NoData >::value > HasEdgeData
Definition: mesh_base.h:124
pcl::geometry::TriangleMesh::addTrianglePair
FaceIndexPair addTrianglePair(const VertexIndices &vertices, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
Add two triangles for the four given input vertices.
Definition: triangle_mesh.h:156
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::addFace
FaceIndex addFace(const VertexIndices &vertices, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
Add a face to the mesh.
Definition: mesh_base.h:187
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::checkTopology1
bool checkTopology1(const VertexIndex &idx_v_a, const VertexIndex &idx_v_b, HalfEdgeIndex &idx_he_ab, std::vector< bool >::reference is_new_ab, std::true_type) const
Check if the edge between the two vertices can be added.
Definition: mesh_base.h:1209
pcl::geometry::TriangleMesh::EdgeIndex
typename Base::EdgeIndex EdgeIndex
Definition: triangle_mesh.h:91
pcl::geometry::TriangleMesh::ConstPtr
shared_ptr< const Self > ConstPtr
Definition: triangle_mesh.h:69
pcl::geometry::TriangleMesh::VertexIndex
typename Base::VertexIndex VertexIndex
Definition: triangle_mesh.h:89
pcl::geometry::TriangleMesh::IsManifold
typename Base::IsManifold IsManifold
Definition: triangle_mesh.h:75
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::HalfEdgeIndex
pcl::geometry::HalfEdgeIndex HalfEdgeIndex
Definition: mesh_base.h:134
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::InnerHalfEdgeAroundFaceCirculator
pcl::geometry::InnerHalfEdgeAroundFaceCirculator< const Self > InnerHalfEdgeAroundFaceCirculator
Definition: mesh_base.h:149
pcl::geometry::TriangleMesh::FaceIndex
typename Base::FaceIndex FaceIndex
Definition: triangle_mesh.h:92
pcl::geometry::TriangleMesh::HalfEdgeIndices
typename Base::HalfEdgeIndices HalfEdgeIndices
Definition: triangle_mesh.h:96
pcl::geometry::TriangleMesh::HasHalfEdgeData
typename Base::HasHalfEdgeData HasHalfEdgeData
Definition: triangle_mesh.h:79
pcl::shared_ptr
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: pcl_macros.h:90
pcl::geometry::TriangleMesh::addTrianglePair
FaceIndexPair addTrianglePair(const VertexIndex &idx_v_0, const VertexIndex &idx_v_1, const VertexIndex &idx_v_2, const VertexIndex &idx_v_3, const FaceData &face_data=FaceData(), const EdgeData &edge_data=EdgeData(), const HalfEdgeData &half_edge_data=HalfEdgeData())
Add two triangles for the four given input vertices.
Definition: triangle_mesh.h:180
pcl::geometry::MeshBase< TriangleMesh< MeshTraitsT >, MeshTraitsT, TriangleMeshTag >::VertexIndices
std::vector< VertexIndex > VertexIndices
Definition: mesh_base.h:138
pcl::geometry::MeshBase
Base class for the half-edge mesh.
Definition: mesh_base.h:99