object3d.cpp 534 B

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