Added VVStarVE and VEStarVE functions (to get stars of vertexes and edges when working with edge meshes) to edge topology.
This commit is contained in:
parent
761172501b
commit
e532ec9751
|
@ -35,11 +35,16 @@ created
|
|||
|
||||
#ifndef __VCG_EDGE_POS
|
||||
#define __VCG_EDGE_POS
|
||||
#include <vcg/simplex/edge/topology.h>
|
||||
|
||||
namespace vcg {
|
||||
namespace edge {
|
||||
|
||||
// Needed Prototypes (pos is include before topology)
|
||||
template <class EDGETYPE>
|
||||
bool IsEdgeBorder(EDGETYPE const & e, const int j );
|
||||
template <class EDGETYPE>
|
||||
bool IsEdgeManifold(EDGETYPE const & e, const int j );
|
||||
|
||||
/*
|
||||
Vertex_Edge: run over the fan of a vertex (no order is specified)
|
||||
*/
|
||||
|
|
|
@ -56,6 +56,30 @@ inline bool IsEdgeBorder(EdgeType const & e, const int j )
|
|||
return true;
|
||||
}
|
||||
|
||||
template <class EdgeType>
|
||||
void VVStarVE(typename EdgeType::VertexType* vp, std::vector<typename EdgeType::VertexType *> &starVec)
|
||||
{
|
||||
typedef typename EdgeType::VertexType* VertexPointer;
|
||||
starVec.clear();
|
||||
edge::VEIterator<EdgeType> vei(vp);
|
||||
while(!vei.End())
|
||||
{
|
||||
starVec.push_back(vei.V1());
|
||||
++vei;
|
||||
}
|
||||
}
|
||||
|
||||
template <class EdgeType>
|
||||
void VEStarVE(typename EdgeType::VertexType* vp, std::vector<EdgeType *> &starVec)
|
||||
{
|
||||
starVec.clear();
|
||||
edge::VEIterator<EdgeType> vei(vp);
|
||||
while(!vei.End())
|
||||
{
|
||||
starVec.push_back(vei.E());
|
||||
++vei;
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace edge
|
||||
} // end namespace vcg
|
||||
|
|
Loading…
Reference in New Issue