diff --git a/vcg/simplex/faceplus/base.h b/vcg/simplex/faceplus/base.h new file mode 100644 index 00000000..277fe93d --- /dev/null +++ b/vcg/simplex/faceplus/base.h @@ -0,0 +1,162 @@ +#ifndef RECURSE_H +#define RECURSE_H + +#include + + +class Empty{}; + +/*------------------------------------------------------------------*/ +template class EmptyCoord: public T { +public: + typedef vcg::Point3f CoordType; + CoordType &P() { static CoordType coord(0, 0, 0); return coord; } +}; +template class Coord: public T { +public: + typedef A CoordType; + CoordType &P() { return coord; } +private: + CoordType coord; +}; +template class Coord3f: public Coord {}; +template class Coord3d: public Coord {}; + +/*------------------------------------------------------------------*/ + +template class EmptyNormal: public T { +public: + typedef vcg::Point3s NormalType; + NormalType &N() { static NormalType normal(0, 0, 0); return normal; } +}; +template class NormalX: public T { +public: + typedef A NormalType; + NormalType &N() { return norm; } +private: + NormalType norm; +}; +template class Normal3s: public NormalX {}; +template class Normal3f: public NormalX {}; +template class Normal3d: public NormalX {}; + +/*------------------------------------------------------------------*/ + +template class EmptyColor: public T { +public: + typedef vcg::Point3s ColorType; + ColorType &C() { static ColorType color(0, 0, 0); return color; } +}; +template class Color: public T { +public: + typedef A ColorType; + ColorType &C() { return color; } +private: + ColorType color; +}; +template class Color3c: public Color, T> {}; + + +/*------------------------------------------------------------------*/ + + +template class EmptyVFAdj: public T { +public: + //typedef vcg::Point3s ColorType; + typename T::FacePointer &Fp() { static typename T::FacePointer fp=0; return fp; } + int &Zp(){static int z=0; return z;}; +}; + +template class VFAdj: public T { +public: + //typedef A ColorType; + typename T::FacePointer &Fp() {return fp; } + typename T::FacePointer &Zp() {return Zp; } +private: + typename T::FacePointer fp ; + int zp ; +}; + + +/*------------------------------------------------------------------*/ +template +class FVEmpty{ +public: +typedef BVT *VertPointer; +typedef BFT *FacePointer; +}; + +template +class Vertex: public EmptyVFAdj > > > >{ +public: +}; + + + + +template class A> class Vertex1: public A > {}; + +template class A, + template class B> class Vertex2: public B > {}; + +template class A, + template class B, + template class C > class Vertex3: public C > {}; + +template class A, + template class B, + template class C, + template class D > class Vertex4: public D > {}; + + +template < typename T> +class Default : public T {}; + +template class A, + template class B = Default, + template class C = Default, + template class D = Default> class VertexK: public Default > {}; + + +template < typename T=int> +class DefaultQ : public T {}; + +template class A, + template class B = DefaultQ, + template class C = DefaultQ, + template class D = DefaultQ > class VertexQ: public Vertex4 {}; + +template class A + > class VertexQ: public Vertex1 {}; + +template class A, + template class B + > class VertexQ: public Vertex2 {}; + +template class A, + template class B, + template class C + > class VertexQ: public Vertex3 {}; + +//template class A, +// template class B = Default, +// template class C = Default, +// template class D = Default > class VertexZ: public Default > {}; + +/* un vertice si definisce cosi': + +Vertex2 myvertex; + +*/ + +#endif