Model3DList.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "Array.h"
  3. namespace Framework
  4. {
  5. class Model3DData; //! Model3D.h
  6. class Text; //! Text.h
  7. class Model3D; //! Model3D.h
  8. namespace Standart3DTypes
  9. {
  10. extern const char* cube; //! = "f_wuerfel"; The model data of a cube
  11. //! that is 100 * 100 * 100 in size
  12. extern const char* texturModel; //! = "f_wuerfel"; The model data of a
  13. //! cube that is 100 * 100 * 100 in size
  14. }; // namespace Standart3DTypes
  15. //! Manages all loaded model data so that multiple drawings can use
  16. //! the same data
  17. class Model3DList : public virtual ReferenceCounter
  18. {
  19. private:
  20. RCArray<Model3DData>* models;
  21. RCArray<Text>* names;
  22. public:
  23. //! Constructor
  24. DLLEXPORT Model3DList();
  25. //! Destructor
  26. DLLEXPORT ~Model3DList();
  27. //! Adds a model to the list
  28. //! \param mdl The model
  29. //! \param name The name under which the model is stored in the list
  30. DLLEXPORT bool addModel(Model3DData* mdl, const char* name);
  31. //! Removes a model from the list
  32. //! \param name The name of the model
  33. DLLEXPORT void removeModel(const char* name);
  34. //! Checks whether a model is stored under a specific name
  35. //! \param name The name \return true if a model with the name exists
  36. DLLEXPORT bool hatModel(const char* name) const;
  37. //! Returns a specific model
  38. //! \param name The name of the model
  39. DLLEXPORT Model3DData* getModel(const char* name) const;
  40. //! Returns a specific model without increased reference counter
  41. //! \param name The name of the model
  42. DLLEXPORT Model3DData* zModel(const char* name) const;
  43. //! remove All models
  44. DLLEXPORT void removeAll();
  45. };
  46. } // namespace Framework