2008-12-19 11:32:32 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* VCGLib o o *
|
|
|
|
* Visual and Computer Graphics Library o o *
|
|
|
|
* _ O _ *
|
|
|
|
* Copyright(C) 2004 \/)\/ *
|
|
|
|
* Visual Computing Lab /\/| *
|
|
|
|
* ISTI - Italian National Research Council | *
|
|
|
|
* \ *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
2011-06-14 16:52:38 +02:00
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
2008-12-19 11:32:32 +01:00
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
|
|
|
* for more details. *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2012-10-25 23:29:10 +02:00
|
|
|
#ifndef __VCG_MESH
|
|
|
|
#error "This file should not be included alone. It is automatically included by complex.h"
|
|
|
|
#endif
|
2008-12-19 11:32:32 +01:00
|
|
|
#ifndef __VCG_EDGE_PLUS_COMPONENT
|
|
|
|
#define __VCG_EDGE_PLUS_COMPONENT
|
|
|
|
|
|
|
|
namespace vcg {
|
|
|
|
namespace edge {
|
2012-11-07 02:24:45 +01:00
|
|
|
|
|
|
|
/** \addtogroup EdgeComponentGroup
|
|
|
|
@{
|
|
|
|
*/
|
|
|
|
|
2008-12-19 11:32:32 +01:00
|
|
|
/*
|
|
|
|
Some naming Rules
|
|
|
|
All the Components that can be added to a vertex should be defined in the namespace edge:
|
|
|
|
|
|
|
|
*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*------------------------- EMPTY CORE COMPONENTS -----------------------------------------*/
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2012-11-07 02:24:45 +01:00
|
|
|
template <class T> class EmptyCore: public T
|
|
|
|
{
|
2008-12-19 11:32:32 +01:00
|
|
|
public:
|
2011-06-14 16:52:38 +02:00
|
|
|
inline typename T::VertexType * & V( const int j ) { (void)j; assert(0); static typename T::VertexType *vp=0; return vp; }
|
|
|
|
inline typename T::VertexType * const & V( const int j ) const { (void)j; assert(0); static typename T::VertexType *vp=0; return vp; }
|
|
|
|
inline typename T::VertexType * cV( const int j ) const { (void)j; assert(0); static typename T::VertexType *vp=0; return vp; }
|
|
|
|
inline typename T::CoordType & P( const int j ) { (void)j; assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
|
|
|
inline const typename T::CoordType & P( const int j ) const { (void)j; assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
|
|
|
inline const typename T::CoordType & cP( const int j ) const { (void)j; assert(0); static typename T::CoordType coord(0, 0, 0); return coord; }
|
|
|
|
static bool HasEVAdjacency() { return false; }
|
|
|
|
static bool HasVertexRef() { return false; }
|
2012-11-07 02:24:45 +01:00
|
|
|
|
|
|
|
typedef vcg::Color4b ColorType;
|
|
|
|
ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
|
|
|
|
ColorType cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; }
|
|
|
|
static bool HasColor() { return false; }
|
|
|
|
|
|
|
|
typedef float QualityType;
|
|
|
|
QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
|
|
|
|
QualityType cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; }
|
|
|
|
static bool HasQuality() { return false; }
|
|
|
|
|
|
|
|
typedef int MarkType;
|
|
|
|
inline void InitIMark() { }
|
|
|
|
inline int cIMark() const { assert(0); static int tmp=-1; return tmp;}
|
|
|
|
inline int &IMark() { assert(0); static int tmp=-1; return tmp;}
|
|
|
|
static bool HasMark() { return false; }
|
|
|
|
|
|
|
|
typedef int FlagType;
|
|
|
|
int &Flags() { static int dummyflags(0); assert(0); return dummyflags; }
|
|
|
|
int Flags() const { return 0; }
|
|
|
|
static bool HasFlags() { return false; }
|
|
|
|
|
|
|
|
typename T::EdgePointer &VEp(const int & ) { static typename T::EdgePointer ep=0; assert(0); return ep; }
|
|
|
|
typename T::EdgePointer cVEp(const int & ) const { static typename T::EdgePointer ep=0; assert(0); return ep; }
|
|
|
|
int &VEi(const int &){static int z=0; assert(0); return z;}
|
|
|
|
int cVEi(const int &) const {static int z=0; assert(0); return z;}
|
|
|
|
static bool HasVEAdjacency() { return false; }
|
|
|
|
|
|
|
|
typename T::EdgePointer &EEp(const int & ) { static typename T::EdgePointer ep=0; assert(0); return ep; }
|
|
|
|
typename T::EdgePointer cEEp(const int & ) const { static typename T::EdgePointer ep=0; assert(0); return ep; }
|
|
|
|
int &EEi(const int &){static int z=0; assert(0); return z;}
|
|
|
|
int cEEi(const int &) const {static int z=0; assert(0); return z;}
|
|
|
|
static bool HasEEAdjacency() { return false; }
|
|
|
|
|
|
|
|
typename T::HEdgePointer &EHp( ) { static typename T::HEdgePointer hp=0; assert(0); return hp; }
|
|
|
|
typename T::HEdgePointer cEHp( ) const { static typename T::HEdgePointer hp=0; assert(0); return hp; }
|
|
|
|
static bool HasEHAdjacency() { return false; }
|
|
|
|
|
|
|
|
typename T::FacePointer &EFp() { static typename T::FacePointer fp=0; assert(0); return fp; }
|
|
|
|
typename T::FacePointer cEFp() const { static typename T::FacePointer fp=0; assert(0); return fp; }
|
|
|
|
int &EFi() {static int z=0; return z;}
|
|
|
|
int &cEFi() const {static int z=0; return z;}
|
|
|
|
static bool HasEFAdjacency() { return false; }
|
|
|
|
|
|
|
|
template <class LeftF>
|
|
|
|
void ImportData(const LeftF & leftF) {T::ImportData(leftF);}
|
|
|
|
static void Name(std::vector<std::string> & name){T::Name(name);}
|
|
|
|
};
|
|
|
|
|
|
|
|
/*-------------------------- VertexRef ----------------------------------------*/
|
|
|
|
/*! \brief The references to the two vertexes of a edge
|
|
|
|
*
|
|
|
|
* Stored as pointers to the VertexType
|
|
|
|
*/
|
|
|
|
|
2008-12-19 11:32:32 +01:00
|
|
|
template <class T> class VertexRef: public T {
|
|
|
|
public:
|
|
|
|
VertexRef(){
|
|
|
|
v[0]=0;
|
|
|
|
v[1]=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<2); return v[j]; }
|
|
|
|
inline typename T::VertexType * const & V( const int j ) const { assert(j>=0 && j<2); return v[j]; }
|
2011-06-14 16:52:38 +02:00
|
|
|
inline typename T::VertexType * cV( const int j ) const { assert(j>=0 && j<2); return v[j]; }
|
2008-12-19 11:32:32 +01:00
|
|
|
|
|
|
|
// Shortcut per accedere ai punti delle facce
|
|
|
|
inline typename T::CoordType & P( const int j ) { assert(j>=0 && j<2); return v[j]->P(); }
|
|
|
|
inline const typename T::CoordType &cP( const int j ) const { assert(j>=0 && j<2); return v[j]->cP(); }
|
|
|
|
|
|
|
|
/** Return the pointer to the ((j+1)%3)-th vertex of the face.
|
|
|
|
@param j Index of the face vertex.
|
|
|
|
*/
|
|
|
|
inline typename T::VertexType * & V0( const int j ) { return V(j);}
|
|
|
|
inline typename T::VertexType * & V1( const int j ) { return V((j+1)%2);}
|
|
|
|
inline const typename T::VertexType * const & V0( const int j ) const { return V(j);}
|
|
|
|
inline const typename T::VertexType * const & V1( const int j ) const { return V((j+1)%2);}
|
|
|
|
inline const typename T::VertexType * const & cV0( const int j ) const { return cV(j);}
|
|
|
|
inline const typename T::VertexType * const & cV1( const int j ) const { return cV((j+1)%2);}
|
2011-06-14 16:52:38 +02:00
|
|
|
|
2008-12-19 11:32:32 +01:00
|
|
|
/// Shortcut per accedere ai punti delle facce
|
|
|
|
inline typename T::CoordType & P0( const int j ) { return V(j)->P();}
|
|
|
|
inline typename T::CoordType & P1( const int j ) { return V((j+1)%2)->P();}
|
|
|
|
inline const typename T::CoordType & P0( const int j ) const { return V(j)->P();}
|
|
|
|
inline const typename T::CoordType & P1( const int j ) const { return V((j+1)%2)->P();}
|
|
|
|
inline const typename T::CoordType & cP0( const int j ) const { return cV(j)->P();}
|
|
|
|
inline const typename T::CoordType & cP1( const int j ) const { return cV((j+1)%2)->P();}
|
|
|
|
|
|
|
|
template <class LeftF>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftF & leftF){ T::ImportData(leftF);}
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2011-05-31 10:33:41 +02:00
|
|
|
static bool HasEVAdjacency() { return true; }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasVertexRef() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("VertexRef"));T::Name(name);}
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
typename T::VertexType *v[2];
|
|
|
|
};
|
|
|
|
|
2011-05-31 10:33:41 +02:00
|
|
|
template <class T> class EVAdj : public VertexRef<T>{};
|
2008-12-19 11:32:32 +01:00
|
|
|
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*-------------------------- INCREMENTAL MARK ----------------------------------------*/
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: Per edge \b Incremental \b Mark
|
|
|
|
*
|
|
|
|
* An int that allows to efficently un-mark the whole mesh. \sa UnmarkAll
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
template <class T> class Mark: public T {
|
|
|
|
public:
|
2012-12-21 16:33:18 +01:00
|
|
|
Mark():_imark(0){}
|
|
|
|
static bool HasMark() { return true; }
|
|
|
|
static bool HasMarkOcc() { return true; }
|
|
|
|
inline void InitIMark() { _imark = 0; }
|
|
|
|
inline int & IMark() { return _imark;}
|
|
|
|
inline const int & IMark() const {return _imark;}
|
|
|
|
template < class LeftV>
|
|
|
|
void ImportData(const LeftV & left ) { IMark() = left.IMark(); T::ImportData( left); }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("Mark"));T::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2008-12-19 11:32:32 +01:00
|
|
|
int _imark;
|
|
|
|
};
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*------------------------- FLAGS -----------------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: Per edge \b Flags
|
|
|
|
*
|
|
|
|
* This component stores a 32 bit array of bit flags. These bit flags are used for keeping track of selection, deletion, visiting etc. \sa \ref flags for more details on common uses of flags.
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
template <class T> class BitFlags: public T {
|
|
|
|
public:
|
|
|
|
BitFlags(){_flags=0;}
|
|
|
|
typedef int FlagType;
|
|
|
|
int &Flags() {return _flags; }
|
2009-06-03 14:23:20 +02:00
|
|
|
int Flags() const {return _flags; }
|
2008-12-19 11:32:32 +01:00
|
|
|
template < class LeftV>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftV & left ) { Flags() = left.Flags(); T::ImportData( left); }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasFlags() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("BitFlags"));T::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
int _flags;
|
2008-12-19 11:32:32 +01:00
|
|
|
};
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*-------------------------- Color ----------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: Per edge \b Color
|
|
|
|
*
|
|
|
|
* Usually most of the library expects a color stored as 4 unsigned chars (so the component you use is a \c vertex::Color4b)
|
|
|
|
* but you can also use float for the color components.
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
template <class A, class T> class Color: public T {
|
|
|
|
public:
|
|
|
|
Color():_color(vcg::Color4b::White) {}
|
|
|
|
typedef A ColorType;
|
|
|
|
ColorType &C() { return _color; }
|
|
|
|
const ColorType &C() const { return _color; }
|
|
|
|
const ColorType &cC() const { return _color; }
|
|
|
|
template < class LeftV>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftV & left ) { C() = left.cC(); T::ImportData( left); }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasColor() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("Color"));T::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
ColorType _color;
|
2008-12-19 11:32:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
template <class TT> class Color4b: public edge::Color<vcg::Color4b, TT> {
|
|
|
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Color4b"));TT::Name(name);}
|
|
|
|
};
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*-------------------------- Quality ----------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: Per edge \b quality
|
|
|
|
*
|
|
|
|
* The Quality Component is a generic place for storing a float. The term 'quality' is a bit misleading and it is due to its original storic meaning. You should intend it as a general purpose container.
|
|
|
|
* \sa vcg::tri::UpdateColor for methods transforming quality into colors
|
|
|
|
* \sa vcg::tri::UpdateQuality for methods to manage it
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
template <class A, class TT> class Quality: public TT {
|
|
|
|
public:
|
|
|
|
typedef A QualityType;
|
|
|
|
QualityType &Q() { return _quality; }
|
|
|
|
const QualityType & cQ() const {return _quality; }
|
|
|
|
template < class LeftV>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftV & left ) { Q() = left.cQ(); TT::ImportData( left); }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasQuality() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("Quality"));TT::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
QualityType _quality;
|
2008-12-19 11:32:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
template <class TT> class Qualitys: public Quality<short, TT> {
|
|
|
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualitys"));TT::Name(name);}
|
|
|
|
};
|
|
|
|
template <class TT> class Qualityf: public Quality<float, TT> {
|
|
|
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualityf"));TT::Name(name);}
|
|
|
|
};
|
|
|
|
template <class TT> class Qualityd: public Quality<double, TT> {
|
|
|
|
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualityd"));TT::Name(name);}
|
|
|
|
};
|
|
|
|
|
2011-05-31 10:33:41 +02:00
|
|
|
/*----------------------------- VEADJ ------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: Per vertex \b Vertex-Edge adjacency relation companion component
|
|
|
|
This component implement one element of the list of edges incident on a vertex.
|
|
|
|
You must use this component only toghether with the corresponding \ref vcg::vertex::VEAdj component in the vertex type
|
2011-05-31 10:33:41 +02:00
|
|
|
|
2012-11-07 02:24:45 +01:00
|
|
|
\sa vcg::tri::UpdateTopology for functions that compute this relation
|
|
|
|
\sa iterators
|
|
|
|
*/
|
2011-05-31 10:33:41 +02:00
|
|
|
template <class T> class VEAdj: public T {
|
|
|
|
public:
|
2011-06-14 16:52:38 +02:00
|
|
|
VEAdj(){_ep[0]=0;_ep[1]=0;_zp[0]=-1;_zp[1]=-1;}
|
|
|
|
typename T::EdgePointer &VEp(const int & i) {return _ep[i]; }
|
|
|
|
typename T::EdgePointer cVEp(const int & i) const {return _ep[i]; }
|
2011-12-13 00:26:25 +01:00
|
|
|
int &VEi(const int & i){ return _zp[i];}
|
|
|
|
int cVEi(const int &i )const {return _zp[i];}
|
2011-06-14 16:52:38 +02:00
|
|
|
|
|
|
|
template < class LeftV>
|
|
|
|
void ImportData(const LeftV & left ) { T::ImportData( left); }
|
|
|
|
static bool HasVEAdjacency() { return true; }
|
|
|
|
static bool HasVEAdjacencyOcc() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("VEAdj"));T::Name(name);}
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2011-05-31 10:33:41 +02:00
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
typename T::EdgePointer _ep[2] ;
|
|
|
|
int _zp[2] ;
|
2011-05-31 10:33:41 +02:00
|
|
|
};
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*----------------------------- EEADJ ------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: \b Edge-Edge adjacency relation
|
|
|
|
This component implement store the pointer (and index) of the adjacent edges.
|
|
|
|
If the vertex is 1-manifold (as in a classical polyline)
|
|
|
|
it holds that:
|
|
|
|
\code
|
|
|
|
e->EEp(i)->EEp(e->EEi(i)) == e
|
|
|
|
\endcode
|
|
|
|
otherwise the edges are connected in a unordered chain (quite similar to how Face-Face adjacency relation is stored);
|
|
|
|
|
|
|
|
\sa vcg::tri::UpdateTopology for functions that compute this relation
|
|
|
|
\sa iterators
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
|
|
|
|
template <class T> class EEAdj: public T {
|
|
|
|
public:
|
2011-04-21 17:51:03 +02:00
|
|
|
EEAdj(){_ep[0]=0;_ep[1]=0;_zp[0]=-1;_zp[1]=-1;}
|
2008-12-19 11:32:32 +01:00
|
|
|
typename T::EdgePointer &EEp(const int & i) {return _ep[i]; }
|
2011-05-10 23:56:15 +02:00
|
|
|
typename T::EdgePointer cEEp(const int & i) const {return _ep[i]; }
|
2011-05-31 10:33:41 +02:00
|
|
|
int &EEi(const int & i){ return _zp[i];}
|
|
|
|
int cEEi(const int &i )const {return _zp[i];}
|
2010-06-16 18:24:26 +02:00
|
|
|
|
2008-12-19 11:32:32 +01:00
|
|
|
template < class LeftV>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftV & left ) { T::ImportData( left); }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasEEAdjacency() { return true; }
|
|
|
|
static bool HasEEAdjacencyOcc() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("EEAdj"));T::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
typename T::EdgePointer _ep[2] ;
|
|
|
|
int _zp[2] ;
|
2008-12-19 11:32:32 +01:00
|
|
|
};
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*----------------------------- EHADJ ------------------------------*/
|
2010-03-25 17:52:18 +01:00
|
|
|
template <class T> class EHAdj: public T {
|
|
|
|
public:
|
|
|
|
EHAdj(){_hp=0;}
|
|
|
|
typename T::HEdgePointer &EHp( ) {return _hp ; }
|
2010-06-16 18:24:26 +02:00
|
|
|
const typename T::HEdgePointer cEHp( ) const {return _hp ; }
|
2011-06-14 16:52:38 +02:00
|
|
|
|
2010-03-25 17:52:18 +01:00
|
|
|
template < class LeftV>
|
2010-06-16 18:24:26 +02:00
|
|
|
void ImportData(const LeftV & left ) { T::ImportData( left); }
|
2010-03-25 17:52:18 +01:00
|
|
|
static bool HasEHAdjacency() { return true; }
|
|
|
|
static bool HasEHAdjacencyOcc() { return true; }
|
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("EHAdj"));T::Name(name);}
|
|
|
|
|
|
|
|
private:
|
2010-04-26 17:02:04 +02:00
|
|
|
typename T::HEdgePointer _hp ;
|
2010-03-25 17:52:18 +01:00
|
|
|
};
|
|
|
|
|
2011-06-14 16:52:38 +02:00
|
|
|
/*----------------------------- EFADJ ------------------------------*/
|
2012-11-07 02:24:45 +01:00
|
|
|
/*! \brief \em Component: \b Edge-Face adjacency relation
|
|
|
|
This component implement store the pointer to a face sharing this edge.
|
2008-12-19 11:32:32 +01:00
|
|
|
|
2012-11-07 02:24:45 +01:00
|
|
|
\sa vcg::tri::UpdateTopology for functions that compute this relation
|
|
|
|
\sa iterators
|
|
|
|
*/
|
2008-12-19 11:32:32 +01:00
|
|
|
|
|
|
|
template <class T> class EFAdj: public T {
|
|
|
|
public:
|
|
|
|
EFAdj(){_fp=0;}
|
|
|
|
typename T::FacePointer &EFp() {return _fp; }
|
2012-11-07 02:24:45 +01:00
|
|
|
typename T::FacePointer cEFp() const {return _fp; }
|
|
|
|
int &EFi() {static int z=0; return z;}
|
|
|
|
int cEFi() const {return _zp; }
|
|
|
|
template < class LeftV>
|
|
|
|
void ImportData(const LeftV & left ) { T::ImportData( left); }
|
2008-12-19 11:32:32 +01:00
|
|
|
static bool HasEFAdjacency() { return true; }
|
|
|
|
static bool HasEFAdjacencyOcc() { return true; }
|
2012-11-07 02:24:45 +01:00
|
|
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("EFAdj"));T::Name(name);}
|
2008-12-19 11:32:32 +01:00
|
|
|
|
|
|
|
private:
|
2011-06-14 16:52:38 +02:00
|
|
|
typename T::FacePointer _fp ;
|
|
|
|
int _zp ;
|
2008-12-19 11:32:32 +01:00
|
|
|
};
|
|
|
|
|
2012-11-07 02:24:45 +01:00
|
|
|
/** @} */ // End Doxygen EdgeComponentGroup
|
2008-12-19 11:32:32 +01:00
|
|
|
} // end namespace edge
|
|
|
|
}// end namespace vcg
|
|
|
|
#endif
|