diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-08-18 05:02:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-09 10:27:50 +0200 |
commit | 24e37795d2db8fdc6f7809e793dadbae80211d26 (patch) | |
tree | f2fd152fb44518222e290e555f0274af18d877bd /SixenseSDK/include/sixense_utils/controller_manager | |
parent | 9a87e2cb6e588641e3cff52655013594c492e033 (diff) |
add SDKs
Diffstat (limited to 'SixenseSDK/include/sixense_utils/controller_manager')
-rwxr-xr-x | SixenseSDK/include/sixense_utils/controller_manager/controller_manager.hpp | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/SixenseSDK/include/sixense_utils/controller_manager/controller_manager.hpp b/SixenseSDK/include/sixense_utils/controller_manager/controller_manager.hpp new file mode 100755 index 0000000..f6b674d --- /dev/null +++ b/SixenseSDK/include/sixense_utils/controller_manager/controller_manager.hpp @@ -0,0 +1,91 @@ +/* + * + * SIXENSE CONFIDENTIAL + * + * Copyright (C) 2011 Sixense Entertainment Inc. + * All Rights Reserved + * + */ + +#ifndef CONTROLLER_MANAGER_HPP +#define CONTROLLER_MANAGER_HPP + +#pragma warning(push) +#pragma warning( disable:4251 ) + +#include "sixense_utils/export.hpp" +#include "sixense_utils/interfaces.hpp" +#include "sixense_utils/sixense_utils_string.hpp" + +#include <string> +#include <vector> +#include <map> + +#include <sixense.h> + +namespace sixenseUtils { + + class SIXENSE_UTILS_EXPORT ControllerManager : public IControllerManager { + + public: + ~ControllerManager(); + + void setGameType( game_type gt ); + game_type getGameType(); + + // Update the ControllerManager. Should be called each frame. + void update( sixenseAllControllerData * ); + + // Get the controller index for the given description, ie player 1's left hand is controller index 3 + int getIndex( controller_desc ); + + // Force the user to rebind the controllers to the player slots. + void rebind(); + + // Register a callback that will get called when the mode changes + void registerSetupCallback( setup_callback ); + + // Returns true if the application should show the menu system + bool isMenuVisible(); + + // Returns the filename of the recommended texture for this step + const char* getTextureFileName(); + + // Returns a string describing this step + const char* getStepString(); + + + ControllerManager::sound_type shouldPlaySound(); + + static ControllerManager *getTheControllerManager(); + + static controller_desc controllerDescFromString( sixense_utils_string str ); + + setup_step getCurrentStep(); + + protected: + ControllerManager(); + + game_type _game_type; + + // A pointer to the current step + setup_step _current_step; + + // A list of maps, one map of steps for each of the game_types. + std::vector< std::map< setup_step, class base_step*> >_steps; + + int _controller_map[LAST_CONTROLLER_DESC]; + + setup_callback _callback; + + }; + + // Singleton + SIXENSE_UTILS_EXPORT ControllerManager *getTheControllerManager(); + +} + +#pragma warning(pop) + +#endif + |