Kamera2D.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include "Mat3.h"
  3. #include "Welt2D.h"
  4. #include "Zeichnung.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. Text* name;
  19. public:
  20. __declspec(dllexport) Kamera2D();
  21. __declspec(dllexport) virtual ~Kamera2D();
  22. __declspec(dllexport) void setName(const char* name);
  23. __declspec(dllexport) void setName(Text* name);
  24. __declspec(dllexport) void lookAtWorldPos(Vertex pos);
  25. __declspec(dllexport) void lookAtWorldPos(float x, float y);
  26. __declspec(dllexport) void lookAtWorldArea(float width, float height);
  27. __declspec(dllexport) void setDrehung(float rotation);
  28. __declspec(dllexport) void setZoom(float zoom);
  29. __declspec(dllexport) void setWelt(Welt2D* welt, bool tick);
  30. __declspec(dllexport) bool tick(double time);
  31. __declspec(dllexport) void render(Bild& zRObj);
  32. __declspec(dllexport) Vertex getWorldCoordinates(Punkt screenPos);
  33. __declspec(dllexport) Vertex getWorldDirection(Vertex dir);
  34. __declspec(dllexport) Vertex getWorldPosition();
  35. __declspec(dllexport) float getRotation();
  36. __declspec(dllexport) float getZoom();
  37. __declspec(dllexport) const Mat3<float>& getMatrix();
  38. __declspec(dllexport) Text* getName();
  39. __declspec(dllexport) Text* zName();
  40. };
  41. class TestKamera2D : public Kamera2D
  42. {
  43. public:
  44. __declspec(dllexport) bool tick(double time);
  45. };
  46. } // namespace Framework