object3d.cpp 531 B

123456789101112131415161718192021222324252627282930
  1. #include <WallpaperEngine/object3d.h>
  2. #include <WallpaperEngine/image.h>
  3. namespace WallpaperEngine
  4. {
  5. object3d::object3d (object3d::Type type, WallpaperEngine::object* parent)
  6. {
  7. this->m_type = type;
  8. }
  9. template <class T> T* object3d::as()
  10. {
  11. return (T*) this;
  12. }
  13. template <class T> bool object3d::is()
  14. {
  15. return false;
  16. }
  17. template <> bool object3d::is<image>()
  18. {
  19. return this->m_type == Type::Type_Material;
  20. }
  21. void object3d::render ()
  22. {
  23. }
  24. }