GlobeEngine
FrameData.h
Go to the documentation of this file.
1 #ifndef EQ_SOLAR_FRAMEDATA_H
2 #define EQ_SOLAR_FRAMEDATA_H
3 
4 #include "eqSolar.h"
5 
6 namespace eqSolar
7 {
16 class FrameData : public co::Serializable
17 {
18 public:
19  FrameData();
20 
21  virtual ~FrameData() {}
22 
24  void toggleStatistics();
25  void toggleHelp();
26  bool useStatistics() const { return _statistics; }
27  bool showHelp() const { return _help; }
28 
29  bool isPickMade() const { return pickMade;}
30  int getPickX() const { return pickX; }
31  int getPickY() const { return pickY; }
32  int getSelectedId() const { return selectedId; }
33  bool getChangeArcBallCenter() const { return changeArcBallCenter;}
34  bool getToggleAnimation() const { return toggleAnimation; }
35  bool getToggleCoordinateAxes() const { return toggleCoordinateAxes; }
36  bool getToggleHabitableZone() const { return toggleHabitableZone; }
37  bool getToggleOrbits() const { return toggleOrbits; }
38  bool getToggleScaled() const { return toggleScaled; }
39  bool getToggleUnitCircles() const { return toggleUnitCircles; }
40  vmml::Matrix4d getViewMatrix() const { return viewMatrix; }
41 
42  void setPickMade(bool _value);
43  void pick(int x, int y);
44  void setSelectedId(int _id);
45  void setChangeArcBallCenter(bool _value);
46 
47  void setToggleAnimation(bool value);
48  void setToggleCoordinateAxes(bool value);
49  void setToggleHabitableZone(bool value);
50  void setToggleOrbits(bool value);
51  void setToggleScaled(bool value);
52  void setToggleUnitCircles(bool value);
53  void setViewMatrix (vmml::Matrix4d matrix);
54 
55 
56 
57 protected:
59  virtual void serialize( co::DataOStream& os,
60  const uint64_t dirtyBits );
62  virtual void deserialize( co::DataIStream& is,
63  const uint64_t dirtyBits );
64 
65  virtual ChangeType getChangeType() const { return DELTA; }
66 
68  enum DirtyBits
69  {
70  DIRTY_CAMERA = co::Serializable::DIRTY_CUSTOM << 0,
71  DIRTY_FLAGS = co::Serializable::DIRTY_CUSTOM << 1,
72  DIRTY_PICK = co::Serializable::DIRTY_CUSTOM << 2,
73  DIRTY_OVERLAY = co::Serializable::DIRTY_CUSTOM << 3
74  };
75 
76 private:
77  bool _statistics;
78  bool _help;
79 
80  bool pickMade;
81  int pickX;
82  int pickY;
83  int selectedId;
84  bool changeArcBallCenter;
85 
86  bool toggleAnimation;
87  bool toggleCoordinateAxes;
88  bool toggleHabitableZone;
89  bool toggleOrbits;
90  bool toggleScaled;
91  bool toggleUnitCircles;
92  vmml::Matrix4d viewMatrix;
93 };
94 }
95 
96 
97 #endif // EQ_SOLAR_FRAMEDATA_H
bool getToggleOrbits() const
Definition: FrameData.h:37
void setToggleCoordinateAxes(bool value)
Definition: FrameData.cpp:103
Definition: FrameData.h:16
Definition: Channel.h:9
void setToggleAnimation(bool value)
Definition: FrameData.cpp:99
vmml::Matrix4d getViewMatrix() const
Definition: FrameData.h:40
bool getToggleCoordinateAxes() const
Definition: FrameData.h:35
void setToggleUnitCircles(bool value)
Definition: FrameData.cpp:120
virtual void serialize(co::DataOStream &os, const uint64_t dirtyBits)
Definition: FrameData.cpp:22
void setToggleScaled(bool value)
Definition: FrameData.cpp:116
DirtyBits
Definition: FrameData.h:68
bool getToggleHabitableZone() const
Definition: FrameData.h:36
void setPickMade(bool _value)
Definition: FrameData.cpp:81
bool useStatistics() const
Definition: FrameData.h:26
void setChangeArcBallCenter(bool _value)
Definition: FrameData.cpp:94
bool getChangeArcBallCenter() const
Definition: FrameData.h:33
int getSelectedId() const
Definition: FrameData.h:32
FrameData()
Definition: FrameData.cpp:6
void setToggleOrbits(bool value)
Definition: FrameData.cpp:112
bool getToggleAnimation() const
Definition: FrameData.h:34
void setSelectedId(int _id)
Definition: FrameData.cpp:86
virtual ChangeType getChangeType() const
Definition: FrameData.h:65
virtual void deserialize(co::DataIStream &is, const uint64_t dirtyBits)
Definition: FrameData.cpp:47
int getPickX() const
Definition: FrameData.h:30
virtual ~FrameData()
Definition: FrameData.h:21
Definition: FrameData.h:70
void pick(int x, int y)
Definition: FrameData.cpp:73
void setViewMatrix(vmml::Matrix4d matrix)
Definition: FrameData.cpp:125
bool showHelp() const
Definition: FrameData.h:27
Definition: FrameData.h:71
void setToggleHabitableZone(bool value)
Definition: FrameData.cpp:108
void toggleHelp()
Definition: FrameData.cpp:137
bool isPickMade() const
Definition: FrameData.h:29
void toggleStatistics()
Definition: FrameData.cpp:131
Definition: FrameData.h:72
int getPickY() const
Definition: FrameData.h:31
bool getToggleUnitCircles() const
Definition: FrameData.h:39
Definition: FrameData.h:73
bool getToggleScaled() const
Definition: FrameData.h:38