Kamera2D.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include "Zeichnung.h"
  3. #include "Mat3.h"
  4. #include "Welt2D.h"
  5. namespace Framework
  6. {
  7. class Welt2D;
  8. class Object2D;
  9. class Kamera2D : public ZeichnungHintergrund
  10. {
  11. protected:
  12. Welt2D *welt;
  13. bool tickWelt;
  14. Vertex wPos;
  15. float rotation;
  16. float zoom;
  17. Mat3< float > matrix;
  18. int ref;
  19. public:
  20. __declspec( dllexport ) Kamera2D();
  21. __declspec( dllexport ) virtual ~Kamera2D();
  22. __declspec( dllexport ) void lookAtWorldPos( Vertex pos );
  23. __declspec( dllexport ) void lookAtWorldPos( int x, int y );
  24. __declspec( dllexport ) void lookAtWorldArea( int width, int height );
  25. __declspec( dllexport ) void setDrehung( float rotation );
  26. __declspec( dllexport ) void setZoom( float zoom );
  27. __declspec( dllexport ) void setWelt( Welt2D *welt, bool tick );
  28. __declspec( dllexport ) bool tick( double time );
  29. __declspec( dllexport ) void render( Bild &zRObj );
  30. __declspec( dllexport ) Vertex getWorldCoordinates( Punkt screenPos );
  31. __declspec( dllexport ) Vertex getWorldDirection( Vertex dir );
  32. __declspec( dllexport ) Vertex getWorldPosition();
  33. __declspec( dllexport ) float getRotation();
  34. __declspec( dllexport ) float getZoom();
  35. __declspec( dllexport ) const Mat3< float > &getMatrix();
  36. __declspec( dllexport ) Kamera2D *getThis();
  37. __declspec( dllexport ) Kamera2D *release();
  38. };
  39. class TestKamera2D : public Kamera2D
  40. {
  41. public:
  42. __declspec( dllexport ) bool tick( double time );
  43. };
  44. }