CmMesh.cpp 805 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "CmMesh.h"
  2. #include "CmMeshRTTI.h"
  3. namespace CamelotEngine
  4. {
  5. Mesh::Mesh()
  6. {
  7. }
  8. Mesh::~Mesh()
  9. {
  10. }
  11. void Mesh::prepare(MeshDataPtr meshData)
  12. {
  13. mMeshData = meshData;
  14. }
  15. void Mesh::load()
  16. {
  17. if(mMeshData == nullptr)
  18. {
  19. CM_EXCEPT(InternalErrorException, "Cannot load mesh. Mesh data hasn't been set.");
  20. }
  21. throw std::exception("The method or operation is not implemented.");
  22. }
  23. /************************************************************************/
  24. /* SERIALIZATION */
  25. /************************************************************************/
  26. RTTITypeBase* Mesh::getRTTIStatic()
  27. {
  28. return MeshRTTI::instance();
  29. }
  30. RTTITypeBase* Mesh::getRTTI() const
  31. {
  32. return Mesh::getRTTIStatic();
  33. }
  34. }