cadetradar.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _CadetRadar_h_
  2. #define _CadetRadar_h_
  3. //////////////////////////////////////////////////////////////////////////////
  4. //
  5. // RadarImage header
  6. //
  7. //////////////////////////////////////////////////////////////////////////////
  8. class RadarImage : public Image {
  9. protected:
  10. RadarImage(Viewport* pviewport) :
  11. Image(pviewport)
  12. {
  13. }
  14. void SetViewport(Viewport* pvalue) { SetChild(0, pvalue); }
  15. Viewport* GetViewport() { return Viewport::Cast(GetChild(0)); }
  16. Camera* GetCamera() { return GetViewport()->GetCamera(); }
  17. RectValue* GetViewRect() { return GetViewport()->GetViewRect(); }
  18. public:
  19. static TRef<RadarImage> Create(Modeler* pmodeler, Viewport* pviewport, CadetGameContext* pcontext);
  20. enum RadarLOD {
  21. radarLODNone = -1,
  22. radarLOD1,
  23. radarLOD2,
  24. radarLOD3
  25. };
  26. virtual void SetRadarLOD(RadarLOD radarLOD) = 0;
  27. virtual void SetRadarLabels(bool rl) = 0;
  28. virtual bool GetRadarLabels(void) const = 0;
  29. //
  30. // Image methods
  31. //
  32. virtual void Render(Context* pcontext) = 0;
  33. //
  34. // Value members
  35. //
  36. ZString GetFunctionName() { return "RadarImage"; }
  37. };
  38. #endif