separated alltypes from usedtypes. The dummy types for simplex where char, now are derived by
their proper type (eg. the dummy type for Vertex is a simple derivation of vcg::Vertex)
This commit is contained in:
parent
3ab37342c6
commit
6b807efa9c
|
@ -0,0 +1,16 @@
|
|||
#ifndef VCG_ALL_TYPES_H
|
||||
#define VCG_ALL_TYPES_H
|
||||
|
||||
namespace vcg{
|
||||
|
||||
struct AllTypes{
|
||||
struct AVertexType {};
|
||||
struct AEdgeType {};
|
||||
struct AFaceType {};
|
||||
struct AHEdgeType {};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // USED_TYPES_H
|
|
@ -5,14 +5,26 @@
|
|||
#include <vcg/space/point3.h>
|
||||
#include <vcg/container/derivation_chain.h>
|
||||
|
||||
#include <vcg/simplex/vertex/base.h>
|
||||
#include <vcg/simplex/face/base.h>
|
||||
#include <vcg/simplex/edge/base.h>
|
||||
#include <vcg/connectors/hedge.h>
|
||||
|
||||
namespace vcg{
|
||||
|
||||
// dummy mesh
|
||||
|
||||
struct _Vertex;
|
||||
struct _Edge ;
|
||||
struct _Face ;
|
||||
struct _HEdge ;
|
||||
|
||||
struct DummyTypes{
|
||||
typedef char VertexType; // simplex types
|
||||
typedef char EdgeType;
|
||||
typedef char FaceType;
|
||||
typedef char TetraType;
|
||||
typedef char HEdgeType; // connector types
|
||||
typedef _Vertex VertexType; // simplex types
|
||||
typedef _Edge EdgeType;
|
||||
typedef _Face FaceType;
|
||||
typedef char TetraType;
|
||||
typedef _HEdge HEdgeType; // connector types
|
||||
|
||||
typedef vcg::Point3<bool> CoordType;
|
||||
typedef char ScalarType;
|
||||
|
@ -28,12 +40,6 @@ struct DummyTypes{
|
|||
void ImportLocal(const LeftV & /*left*/ ) {}
|
||||
};
|
||||
|
||||
struct AllTypes{
|
||||
struct AVertexType {};
|
||||
struct AEdgeType {};
|
||||
struct AFaceType {};
|
||||
struct AHEdgeType {};
|
||||
};
|
||||
|
||||
template <template <typename> class A = DefaultDeriver, template <typename> class B = DefaultDeriver,
|
||||
template <typename> class C = DefaultDeriver, template <typename> class D = DefaultDeriver,
|
||||
|
@ -54,6 +60,19 @@ template <class A>
|
|||
template <class T> struct AsHEdgeType: public T{typedef A HEdgeType; typedef HEdgeType * HEdgePointer ;};
|
||||
};
|
||||
|
||||
|
||||
struct _UsedTypes: public UsedTypes<
|
||||
Use<_Vertex>::AsVertexType,
|
||||
Use<_Edge >::AsEdgeType,
|
||||
Use<_Face >::AsFaceType,
|
||||
Use<_HEdge >::AsHEdgeType
|
||||
>{};
|
||||
|
||||
struct _Vertex: public Vertex<_UsedTypes>{};
|
||||
struct _Edge : public Edge<_UsedTypes>{};
|
||||
struct _Face : public Face<_UsedTypes>{};
|
||||
struct _HEdge : public HEdge<_UsedTypes>{};
|
||||
|
||||
};
|
||||
|
||||
#endif // USED_TYPES_H
|
||||
|
|
Loading…
Reference in New Issue