1 #ifndef R2C2_3D_CATALOGUE_H_
2 #define R2C2_3D_CATALOGUE_H_
4 #include <msp/datafile/collection.h>
5 #include <msp/fs/path.h>
6 #include <msp/gl/material.h>
7 #include <msp/gl/mesh.h>
8 #include "libr2c2/catalogue.h"
15 class Catalogue3D: public Msp::DataFile::Collection
19 std::map<const ObjectType *, ObjectType3D *> objects;
20 Msp::GL::Mesh endpoint_mesh;
23 Catalogue3D(Catalogue &);
26 const Catalogue &get_catalogue() const { return catalogue; }
28 void object_added(const ObjectType &);
30 const ObjectType3D &get_3d(const ObjectType &) const;
33 const typename TypeMap3D<T>::Type3D &get_3d(const T &ot) const
34 { return dynamic_cast<const typename TypeMap3D<T>::Type3D &>(get_3d(static_cast<const ObjectType &>(ot))); }
37 void build_endpoint_mesh();
39 const Msp::GL::Mesh &get_endpoint_mesh() const { return endpoint_mesh; }
42 Msp::FS::Path locate_file(const std::string &);
45 T *create(const std::string &);
48 T *create2(const std::string &);