added type traits to support the mod below:
[ Changes in definition of TriMesh: PART II ] Note: No changes to existing code need be the done, this mod should be fully backward compatible Old way to define a TriMesh ============== struct MyMesh: public vcg::tri::TriMesh< vector<MyVertex> , vector <MyFace> >{}; new ways to define a TriMesh ============== struct MyMesh: public vcg::tri::TriMesh< CONT1 >{}; struct MyMesh: public vcg::tri::TriMesh< CONT1 , CONT2>{}; struct MyMesh: public vcg::tri::TriMesh< CONT1 , CONT2, CONT3>{}; where CONT[i] can be vector< [MyVertex | MyEdge | MyFace ] > (the order is unimportant)
This commit is contained in:
parent
1428a1cc3c
commit
9fc476b130
|
@ -72,6 +72,7 @@ First working version!
|
|||
#include <vcg/space/texcoord2.h>
|
||||
#include <vcg/space/color4.h>
|
||||
#include <vcg/simplex/vertex/component.h>
|
||||
#include <vcg/complex/used_types.h>
|
||||
#include <vcg/container/derivation_chain.h>
|
||||
|
||||
namespace vcg {
|
||||
|
@ -141,6 +142,7 @@ class VertexArityMax: public Arity12<vertex::EmptyCore<UserTypes>, A, B, C, D, E
|
|||
public:
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
DELETED = 0x0001, // This bit indicate that the vertex is deleted from the mesh
|
||||
|
@ -260,7 +262,8 @@ template <class UserTypes,
|
|||
template <typename> class G = DefaultDeriver, template <typename> class H = DefaultDeriver,
|
||||
template <typename> class I = DefaultDeriver, template <typename> class J = DefaultDeriver,
|
||||
template <typename> class K = DefaultDeriver, template <typename> class L = DefaultDeriver>
|
||||
class Vertex: public VertexArityMax<UserTypes, A, B, C, D, E, F, G, H, I, J, K, L> {};
|
||||
class Vertex: public VertexArityMax<UserTypes, A, B, C, D, E, F, G, H, I, J, K, L> {
|
||||
public: typedef AllTypes::AVertexType IAm; typedef UserTypes TypesPool;};
|
||||
|
||||
}// end namespace
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue