Added optional cpmponent

This commit is contained in:
Paolo Cignoni 2004-03-31 13:15:28 +00:00
parent 48bf28971c
commit d5f924cd26
2 changed files with 12 additions and 21 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.3 2004/03/31 12:28:37 ganovelli
*** empty log message ***
Revision 1.2 2004/03/29 14:26:38 cignoni Revision 1.2 2004/03/29 14:26:38 cignoni
Error in color Error in color
@ -35,9 +38,6 @@ First working version!
#ifndef __VCG_VERTEX_PLUS_COMPONENT #ifndef __VCG_VERTEX_PLUS_COMPONENT
#define __VCG_VERTEX_PLUS_COMPONENT #define __VCG_VERTEX_PLUS_COMPONENT
#include <vcg/traced_vector.h>
namespace vcg { namespace vcg {
namespace vert { namespace vert {
/* /*
@ -68,17 +68,6 @@ private:
template <class T> class Coord3f: public Coord<vcg::Point3f, T> {}; template <class T> class Coord3f: public Coord<vcg::Point3f, T> {};
template <class T> class Coord3d: public Coord<vcg::Point3d, T> {}; template <class T> class Coord3d: public Coord<vcg::Point3d, T> {};
template <class A, class T> class CoordOpt: public T {
public:
typedef A CoordType;
typedef typename CoordType::ScalarType ScalarType;
CoordType &P() { return CAT< TVector<VertType>,CoordType>::Get((VertType*)this); }
CoordType &UberP() { return CAT< TVector<VertType>,CoordType>::Get((VertType*)this); }
};
template <class T> class Coord3fOpt: public CoordOpt<vcg::Point3f, T> {};
template <class T> class Coord3dOpt: public CoordOpt<vcg::Point3d, T> {};
/*-------------------------- NORMAL ----------------------------------------*/ /*-------------------------- NORMAL ----------------------------------------*/
template <class T> class EmptyNormal: public T { template <class T> class EmptyNormal: public T {
@ -190,13 +179,12 @@ public:
template <class T> class VFAdj: public T { template <class T> class VFAdj: public T {
public: public:
//typedef A ColorType; typename T::FacePointer &Fp() {return _fp; }
typename T::FacePointer &Fp() {return fp; } int &Zp() {return _zp; }
typename T::FacePointer &Zp() {return Zp; }
static bool HasVFAdjacency() { return true; } static bool HasVFAdjacency() { return true; }
private: private:
typename T::FacePointer fp ; typename T::FacePointer _fp ;
int zp ; int _zp ;
}; };
} // end namespace vert } // end namespace vert

View File

@ -24,10 +24,13 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.1 2004/03/31 12:46:53 cignoni
First working version!
****************************************************************************/ ****************************************************************************/
#ifndef __VCG_VERTEX_PLUS_COMPONENT #ifndef __VCG_VERTEX_PLUS_COMPONENT_OPT
#define __VCG_VERTEX_PLUS_COMPONENT #define __VCG_VERTEX_PLUS_COMPONENT_OPT
#include <vcg/component.h> #include <vcg/component.h>
#include <vcg/traced_vector.h> #include <vcg/traced_vector.h>