Every mesh should be initialized using a shared_ptr, as some datastructures (namely certain Attribute Handles) . This means that we need
- a static member function called
create that constructs a std::shared_ptr<Mesh> (or for derive classes whatever dreived type).
- all constructors should be made private and friended with
make_shared
- make the this can be checked by checking
assert(bool(shared_from_this()));
Every mesh should be initialized using a shared_ptr, as some datastructures (namely certain Attribute Handles) . This means that we need
createthat constructs astd::shared_ptr<Mesh>(or for derive classes whatever dreived type).make_sharedassert(bool(shared_from_this()));