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