a48
2.0.2
|
This is an example of how to use the Traits paradigm using the a48 halfedge datastructure classes.
#include <mesh.hh> template< class Traits > class MyVertex : public a48::VertexT< Traits > { public: int id; float pos[3]; }; class MyTraits { public: typedef MyVertex< MyTraits > vertex_type; typedef a48::HalfedgeT< MyTraits > halfedge_type; typedef a48::FaceT< MyTraits > face_type; }; typedef a48::MeshT< MyTraits > MyMesh; // With std++0x the default argument of the template class Traits // may be used