VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtNavigationLightController.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
14 
16 
17 #include <vlutil/vlTime.h>
18 
19 namespace makVrv
20 {
21  class DtArticulatedModelAgent;
22 
30  {
31  public:
32 
35 
38  {
39  NavigationLightExhibitConditionAlways = 1,
40  NavigationLightExhibitConditionDay = 2,
41  NavigationLightExhibitConditionFog = 3,
42  NavigationLightExhibitConditionNight = 4
43  };
44 
47  typedef std::vector<float> SignalSequence;
48 
49  typedef std::vector<int> ColorSequence;
50 
52  virtual ~DtNavigationLightController();
53 
57  virtual void attach( DtBuoyOrBeaconFacade& buoyOrBeacon );
58 
62  virtual void update( DtTime simTime, bool daylight, bool foggy );
63 
65 
66 
67  virtual void setColors( const ColorSequence& sequence );
68  virtual const ColorSequence& colors() const;
70 
71  //@(
75  virtual void setSignalSequence( const SignalSequence& sequence );
76  virtual const SignalSequence& signalSequence() const;
78 
79  //@(
81  virtual void setExhibitCondition( NavigationLightExhibitCondition condition );
82  virtual NavigationLightExhibitCondition exhibitCondition() const;
84 
86 
87 
88  virtual void setOnOffState( bool state );
89  virtual bool onOffState() const;
91 
93 
94 
95 
96  virtual void setTimer( DtTime nextStateTime );
97  virtual DtTime timer() const;
99 
101 
102 
103 
104  virtual void setSequenceCursor( int cursor );
105  virtual int sequenceCursor() const;
107 
109 
110 
111 
112  virtual void setLightColorSwitchNumber( int switchNum );
113  virtual int lightColorSwitchNumber() const;
115 
117 
118 
119 
120  virtual void setLightSwitchNumber( int switchNum );
121  virtual int lightSwitchNumber() const;
123 
125 
126 
127 
128 
129  virtual void setEnabled( bool enabled );
130  virtual bool enabled() const;
132 
134  // If a light height is specfied (!= 0.) then that height (and the object
135  // it's attached to's height of attach point) will be used to position
136  // the object (and hence the light height)
137  virtual void setHeight( float height );
138  virtual float height() const;
140 
142  std::string myParameterValues;
143  void setParameterValues(const std::string& values )
144  {
145  myParameterValues = values;
146  }
147  std::string parameterValues() const
148  {
149  return myParameterValues;
150  }
151 
152  protected:
153 
156 
159 
162 
164  const DtNavigationLightController& operator=(
165  const DtNavigationLightController& rhs );
166 
169  void checkEnabledState( bool daylight, bool foggy );
170 
171  protected:
181  float myHeight;
182  bool myEnabled;
183  };
184 
188  : public DtVirtualBaseClass
189  {
190 
191  public:
194  static DtNavigationLightControllerCreator& instance( DtDe& de );
195 
197  static void registerInstance( DtDe& de,
198  DtNavigationLightControllerCreator* anInstance );
199 
201  virtual DtNavigationLightController* create( DtUniqueID elementId );
202  };
203 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)