]> git.mxchange.org Git - simgear.git/blob - simgear/scene/sky/clouds3d/SkyController.hpp
Clouds3D crashes because there is no Light
[simgear.git] / simgear / scene / sky / clouds3d / SkyController.hpp
1 //------------------------------------------------------------------------------
2 // File : SkyController.hpp
3 //------------------------------------------------------------------------------
4 // SkyWorks : Copyright 2002 Mark J. Harris and
5 //                                              The University of North Carolina at Chapel Hill
6 //------------------------------------------------------------------------------
7 // Permission to use, copy, modify, distribute and sell this software and its 
8 // documentation for any purpose is hereby granted without fee, provided that 
9 // the above copyright notice appear in all copies and that both that copyright 
10 // notice and this permission notice appear in supporting documentation. 
11 // Binaries may be compiled with this software without any royalties or 
12 // restrictions. 
13 //
14 // The author(s) and The University of North Carolina at Chapel Hill make no 
15 // representations about the suitability of this software for any purpose. 
16 // It is provided "as is" without express or 
17 // implied warranty.
18 /**
19  * @file SkyController.hpp
20  * 
21  * Abstract base class for game object controllers.
22  */
23 #ifndef __SKYCONTROLLER_HPP__
24 #define __SKYCONTROLLER_HPP__
25
26 #include "SkyUtil.hpp"
27
28
29 //------------------------------------------------------------------------------
30 /**
31  * @class SkyController
32  * @brief A class that defines an interface for translating general control input into game object control.
33  * 
34  * This class abstracts game object control from specific control input, such 
35  * as via user interface devices or via artificial intelligence.  Subclasses of
36  * this class implement the method GetControlState() so that objects controlled
37  * by an instance of a SkyController can query the control state that determines 
38  * their actions.  The object need not know whether it is controlled by a human 
39  * or the computer since either controller provides it the same interface.
40  *
41  * @see SkyControlled
42  */
43 template <typename ControlStateType>
44 class SkyController
45 {
46 public:
47   //! Constructor.
48   SkyController() {}
49   //! Destructor.
50   virtual ~SkyController() {}
51   
52   //! Fills out the control state structure passed in with the current state of controls.
53   virtual SKYRESULT GetControlState(ControlStateType &controlState) = 0;
54 };
55
56 #endif //__SKYCONTROLLER_HPP__