Go to the documentation of this file.
18 #include <boost/range/iterator_range.hpp>
31 namespace DataStructures {
50 typedef boost::shared_ptr< Self >
ptr;
64 typedef std::array< CoordinateType, 2 >
133 boost::iterator_range< VertexContainerType::const_iterator >
143 boost::iterator_range< VertexContainerType::iterator >
GetVertices()
171 boost::iterator_range< EdgeContainerType::const_iterator >
GetEdges()
const
180 boost::iterator_range< EdgeContainerType::iterator >
GetEdges()
189 boost::iterator_range< FaceContainerType::const_iterator >
GetFaces()
const
198 boost::iterator_range< FaceContainerType::iterator >
GetFaces()
216 return static_cast< unsigned int >(
m_Edges.
size());
224 return static_cast< unsigned int >(
m_Faces.
size());
254 template<
typename T >
257 std::size_t idx = cell->GetIndex();
258 if (idx != (std::numeric_limits<std::size_t>::max)())
261 std::size_t cLastId = 0;
262 if (container[idx]->GetIndex() == idx)
263 cLastId = container.
remove(idx);
266 std::cerr <<
"EraseIsolatedCell: Warning: cell index does not match container index. A linear search is thus done." << std::endl;
267 auto it = container.
begin(), it_e = container.
end();
268 for (std::size_t cpt=0; it != it_e; ++it,++cpt)
270 if ((*it)->GetIndex() == idx)
272 cLastId = container.
remove(cpt);
281 cell->SetIndex((std::numeric_limits<std::size_t>::max)());
350 template<
typename CellType >
360 template<
typename CellType >
369 template<
typename CellType,
typename T >
382 template<
typename CellType,
typename T >
396 template<
typename CellType >
409 template<
typename CellType >
422 template<
typename CellType >
435 template<
typename CellType >
450 template<
typename CellType,
typename T >
451 void SetProperty(
const std::string &mapName, std::size_t cellId, T value)
464 template<
typename CellType,
typename T >
478 template<
typename CellType,
typename T >
479 const T &
GetProperty(
const std::string &mapName, std::size_t cellId)
const
493 template<
typename KeyType,
typename ValueType >
505 template<
typename KeyType,
typename ValueType >
534 PropertyMapContainer *
535 AIFMesh::GetPropertyMapContainer< AIFVertex::ptr >(
void);
537 PropertyMapContainer *
538 AIFMesh::GetPropertyMapContainer< AIFEdge::ptr >(
void);
540 PropertyMapContainer *
541 AIFMesh::GetPropertyMapContainer< AIFFace::ptr >(
void);
unsigned int GetNumberOfEdges() const
AssocPropertyMap< KeyType, ValueType > * addAssocPropertyMap(const std::string &name)
boost::shared_ptr< self > ptr
double NormalCoordinateType
AssocPropertyMap< KeyType, ValueType > * GetAssocPropertyMap(const std::string &mapName)
PropertyMapContainer m_FacePropertyMaps
T & getProperty(const std::string &name, std::size_t idx)
boost::iterator_range< EdgeContainerType::const_iterator > GetEdges() const
void EraseIsolatedEdge(EdgeContainerType::iterator edge_iter)
void removePropertyMap(const std::string &name)
This class represents a vertex used by AIFMesh objects. An AIFVertex natively saves relations with it...
VertexContainerType::iterator vertices_begin()
void SetProperty(const std::string &mapName, std::size_t cellId, T value)
const T & GetProperty(const std::string &mapName, std::size_t cellId) const
const_iterator cend(void) const
bool isAPropertyMapStartingWithPrefix(const std::string &prefix) const
PropertyMap< T > * getPropertyMap(const std::string &name) const
std::vector< std::string > GetPropertyMapNamesStartingWithPrefix(const std::string &prefix) const
boost::shared_ptr< Self > ptr
std::vector< std::string > GetPropertyMapNamesStartingWithPrefix(const std::string &mapPrefixName) const
boost::iterator_range< FaceContainerType::const_iterator > GetFaces() const
const_iterator cbegin(void) const
AIFCellContainer< edge_type::ptr > EdgeContainerType
void InsertIsolatedFace(face_type::ptr face)
This class represents a face used by AIFMesh objects. An AIFFace natively saves relations with its in...
boost::shared_ptr< self > ptr
boost::iterator_range< VertexContainerType::iterator > GetVertices()
void setProperty(const std::string &name, std::size_t idx, const T &value)
void removeProperties(std::size_t idx, std::size_t cLastIdx)
VertexContainerType::iterator vertices_end()
AIFCellContainer< vertex_type::ptr > VertexContainerType
const PropertyMapContainer * GetPropertyMapContainer(void) const
AIFVector< CoordinateType, 3 > Vector
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the edge corresponding to h and opposite(h).
boost::shared_ptr< const Self > ptr_cmesh
void RemovePropertyMap(const std::string &mapName)
std::vector< vertex_type::ptr >::iterator iterator
unsigned int GetNumberOfVertices() const
void EraseIsolatedFace(face_type::ptr face)
AIFPoint< CoordinateType, 3 > Point
Interfaces for plugins These interfaces will be used for different plugins.
void InsertIsolatedEdge(edge_type::ptr edge)
void InsertIsolatedVertex(vertex_type::ptr vertex)
PropertyMapContainer m_EdgePropertyMaps
AssocPropertyMap< KeyType, ValueType > * getAssocPropertyMap(const std::string &name)
bool isAssocPropertyMap(const std::string &mapName)
bool isAPropertyMapStartingWithPrefix(const std::string &mapPrefixName) const
AssocPropertyMap< KeyType, ValueType > * AddAssocPropertyMap(const std::string &mapName)
std::size_t remove(std::size_t i)
boost::shared_ptr< Self > ptr_mesh
AIFVertex::CoordinateType CoordinateType
boost::iterator_range< VertexContainerType::const_iterator > GetVertices() const
boost::shared_ptr< self > ptr
Self & operator=(const Self &)
unsigned int GetNumberOfFaces() const
PropertyMapContainer * AIFMesh::GetPropertyMapContainer< AIFVertex::ptr >(void)
AIFCellContainer< face_type::ptr > FaceContainerType
void RemoveAssocPropertyMap(const std::string &mapName)
VertexContainerType m_Vertices
PropertyMapContainer * AIFMesh::GetPropertyMapContainer< AIFFace::ptr >(void)
void EraseIsolatedVertex(vertex_type::ptr vertex)
std::array< CoordinateType, 2 > PointUV
bool isPropertyMap(const std::string &name) const
bool isPropertyMap(const std::string &mapName) const
PropertyMapContainer m_VertexPropertyMaps
PropertyMapContainer * AIFMesh::GetPropertyMapContainer< AIFEdge::ptr >(void)
FaceContainerType m_Faces
PropertyMap< T > * addPropertyMap(const std::string &name)
EdgeContainerType m_Edges
void EraseIsolatedCell(AIFCellContainer< T > &container, const T &cell)
This class represents an AIF structure. AIF structure can deal with both manifold and non-manifold su...
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::face_descriptor face(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the face incident to halfedge h.
void erase(const iterator iter)
This class represents an edge used by AIFMesh objects. An AIFEdge natively saves relations with its i...
PropertyMap< T > * AddPropertyMap(const std::string &mapName)
T & GetProperty(const std::string &mapName, std::size_t cellId)
boost::iterator_range< EdgeContainerType::iterator > GetEdges()
PropertyMapContainer * GetPropertyMapContainer(void)
void EraseIsolatedEdge(edge_type::ptr edge)
AIFVector< NormalCoordinateType, 3 > Normal
PropertyMap< T > * GetPropertyMap(const std::string &mapName)
AIFFace::NormalCoordinateType NormalCoordinateType
boost::iterator_range< FaceContainerType::iterator > GetFaces()
std::size_t size(void) const
PropertyMapContainer m_AssocPropertyMaps