[Orxonox-commit 5042] r9706 - code/branches/wiimote/src/libraries/core/input

georgr at orxonox.net georgr at orxonox.net
Mon Oct 21 14:46:28 CEST 2013


Author: georgr
Date: 2013-10-21 14:46:28 +0200 (Mon, 21 Oct 2013)
New Revision: 9706

Added:
   code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc
   code/branches/wiimote/src/libraries/core/input/Wiimote_Test.h
Modified:
   code/branches/wiimote/src/libraries/core/input/CMakeLists.txt
Log:
Does not compile yet

Modified: code/branches/wiimote/src/libraries/core/input/CMakeLists.txt
===================================================================
--- code/branches/wiimote/src/libraries/core/input/CMakeLists.txt	2013-10-21 12:41:11 UTC (rev 9705)
+++ code/branches/wiimote/src/libraries/core/input/CMakeLists.txt	2013-10-21 12:46:28 UTC (rev 9706)
@@ -12,4 +12,5 @@
   Keyboard.cc
   KeyDetector.cc
   Mouse.cc
+  Wiimote_Test.cc
 )

Added: code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc
===================================================================
--- code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc	                        (rev 0)
+++ code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc	2013-10-21 12:46:28 UTC (rev 9706)
@@ -0,0 +1,42 @@
+/*
+ * WiimoteTest.cpp
+ *
+ *  Created on: Oct 21, 2013
+ *      Author: georgr
+ */
+
+#include "/usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/core/input/Wiimote_Test.h"
+#include "core/CoreIncludes.h"
+#include "core/command/ConsoleCommand.h"
+#include "InputState.h"
+#include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/orxonox/OrxonoxPrereqs.h>
+#include "InputManager.h"
+#include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/UtilPrereqs.h>
+#include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/ScopedSingletonManager.h>
+
+
+namespace orxonox
+{
+	ManageScopedSingleton(Wiimote_Test, ScopeID::Root, false);
+
+	Wiimote_Test::Wiimote_Test()
+	{
+		RegisterObject(Wiimote_Test);
+
+	}
+
+	Wiimote_Test::~Wiimote_Test() {
+		// TODO Auto-generated destructor stub
+	}
+
+	void Wiimote_Test::tick(float dt)
+	{
+		IntVector2 abs(10,50);
+		IntVector2 rel(50, 20);
+		IntVector2 clippingSize(1680, 1050);
+		InputManager * myIM = &(InputManager::getInstance());
+		InputState * gameState = myIM->getState("game");
+		gameState->mouseMoved(abs, rel, clippingSize);
+		orxout()<<"I'm a huge faggot";
+	}
+}

Added: code/branches/wiimote/src/libraries/core/input/Wiimote_Test.h
===================================================================
--- code/branches/wiimote/src/libraries/core/input/Wiimote_Test.h	                        (rev 0)
+++ code/branches/wiimote/src/libraries/core/input/Wiimote_Test.h	2013-10-21 12:46:28 UTC (rev 9706)
@@ -0,0 +1,33 @@
+/*
+ * WiimoteTest.h
+ *
+ *  Created on: Oct 21, 2013
+ *      Author: georgr
+ */
+
+#ifndef WIIMOTETEST_H_
+#define WIIMOTETEST_H_
+
+#include <tools/interfaces/Tickable.h>
+#include "core/CoreIncludes.h"
+#include "core/command/ConsoleCommand.h"
+#include "InputState.h"
+
+namespace orxonox
+{
+	class Wiimote_Test
+	        : public WindowEventListener
+			, public Tickable
+			, public Singleton<Wiimote_Test>
+	{
+		friend class Singleton<Wiimote_Test>;
+		public:
+			void tick(float dt);
+			Wiimote_Test();
+			virtual ~Wiimote_Test();
+		private:
+			static Wiimote_Test* singletonPtr_s;
+
+	};
+}
+#endif /* WIIMOTETEST_H_ */




More information about the Orxonox-commit mailing list