summaryrefslogtreecommitdiffhomepage
path: root/Stars45/CameraDirector.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-01 21:23:39 +0200
committerAki <please@ignore.pl>2022-04-01 21:23:39 +0200
commit3c487c5cd69c53d6fea948643c0a76df03516605 (patch)
tree72730c7b8b26a5ef8fc9a987ec4c16129efd5aac /Stars45/CameraDirector.h
parent8f353abd0bfe18baddd8a8250ab7c4f2d1c83a6e (diff)
downloadstarshatter-3c487c5cd69c53d6fea948643c0a76df03516605.zip
starshatter-3c487c5cd69c53d6fea948643c0a76df03516605.tar.gz
starshatter-3c487c5cd69c53d6fea948643c0a76df03516605.tar.bz2
Moved Stars45 to StarsEx
Diffstat (limited to 'Stars45/CameraDirector.h')
-rw-r--r--Stars45/CameraDirector.h155
1 files changed, 0 insertions, 155 deletions
diff --git a/Stars45/CameraDirector.h b/Stars45/CameraDirector.h
deleted file mode 100644
index 6cd59da..0000000
--- a/Stars45/CameraDirector.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Starshatter: The Open Source Project
- Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors
- Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
- Copyright (c) 1997-2006, Destroyer Studios LLC.
-
- AUTHOR: John DiCamillo
-
-
- OVERVIEW
- ========
- Camera Director singleton manages the main view camera based on the current ship
-*/
-
-#ifndef CameraDirector_h
-#define CameraDirector_h
-
-#include "Types.h"
-#include "Camera.h"
-#include "SimObject.h"
-#include "List.h"
-
-// +--------------------------------------------------------------------+
-
-class HUDView;
-class Orbital;
-class Ship;
-class Sim;
-
-// +--------------------------------------------------------------------+
-
-class CameraDirector : public SimObserver
-{
-public:
- static const char* TYPENAME() { return "CameraDirector"; }
-
- enum CAM_MODE {
- MODE_NONE,
-
- MODE_COCKPIT,
- MODE_CHASE,
- MODE_TARGET,
- MODE_THREAT,
- MODE_ORBIT,
- MODE_VIRTUAL,
- MODE_TRANSLATE,
- MODE_ZOOM,
- MODE_DOCKING,
- MODE_DROP,
-
- MODE_LAST
- };
-
- // CONSTRUCTORS:
- CameraDirector();
- virtual ~CameraDirector();
-
- int operator == (const CameraDirector& that) const { return this == &that; }
-
- static CameraDirector* GetInstance();
-
- // CAMERA:
- static int GetCameraMode();
- static void SetCameraMode(int m, double trans_time=1);
- static const char* GetModeName();
-
- static double GetRangeLimit();
- static void SetRangeLimit(double r);
- static void SetRangeLimits(double min, double max);
-
- virtual void Reset();
- virtual void SetMode(int m, double trans_time=1);
- virtual int GetMode() const { return requested_mode > MODE_NONE ? requested_mode : mode; }
- virtual Camera* GetCamera() { return &camera; }
- virtual Ship* GetShip() { return ship; }
- virtual void SetShip(Ship* s);
-
- virtual void VirtualHead(double az, double el);
- virtual void VirtualHeadOffset(double x, double y, double z);
- virtual void VirtualAzimuth(double delta);
- virtual void VirtualElevation(double delta);
- virtual void ExternalAzimuth(double delta);
- virtual void ExternalElevation(double delta);
- virtual void ExternalRange(double delta);
- virtual void SetOrbitPoint(double az, double el, double range);
- virtual void SetOrbitRates(double az_rate, double el_rate, double r_rate);
-
- static bool IsViewCentered();
-
- virtual void CycleViewObject();
-
- virtual Orbital* GetViewOrbital() const { return external_body; }
- virtual Ship* GetViewObject() const { return external_ship; }
-
- virtual void SetViewOrbital(Orbital* orb);
- virtual void SetViewObject(Ship* obj, bool quick=false);
- virtual void SetViewObjectGroup(ListIter<Ship> group, bool quick=false);
- virtual void ClearGroup();
-
- // BEHAVIORS:
- virtual void ExecFrame(double s);
- virtual void Transition(double s);
-
- // SimObserver:
- virtual bool Update(SimObject* obj);
- virtual const char* GetObserverName() const;
-
-protected:
- virtual void Cockpit(double s);
- virtual void Chase(double s);
- virtual void Target(double s);
- virtual void Threat(double s);
- virtual void Virtual(double s);
- virtual void Orbit(double s);
- virtual void Docking(double s);
- virtual void Drop(double s);
-
- int mode;
- int requested_mode;
- int old_mode;
- Camera camera;
-
- Ship* ship;
-
- SimRegion* region;
- Orbital* external_body;
- Ship* external_ship;
- List<Ship> external_group;
- Point external_point;
-
- Point base_loc;
-
- double virt_az;
- double virt_el;
- double virt_x;
- double virt_y;
- double virt_z;
- double azimuth;
- double elevation;
- double az_rate;
- double el_rate;
- double range_rate;
- double range;
- double range_min;
- double range_max;
- double base_range;
- double transition;
-
- Sim* sim;
- HUDView* hud;
-
- static CameraDirector* instance;
-};
-
-#endif // CameraDirector_h
-