<!-- Wanted to avoid copying .css to each folder, so copied default .css from doxyen in here, kicked out most stuff we don't need for examples and modified some a little bit.
Target was having a single html in each example folder which is created from the main.cpp files and needs no files besides some images below media folder.
<p>This tutorial shows how to move and animate SceneNodes. The basic concept of SceneNodeAnimators is shown as well as manual movement of nodes using the keyboard. We'll demonstrate framerate independent movement, which means moving by an amount dependent on the duration of the last run of the Irrlicht loop.</p>
<p>Example 19.MouseAndJoystick shows how to handle other input than keyboard.</p>
<p>As always, include the header files, use the irr namespace, and tell the linker to link with the .lib file. </p><divclass="fragment"><divclass="line"><spanclass="preprocessor">#ifdef _MSC_VER</span></div><divclass="line"><spanclass="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><divclass="line"><spanclass="preprocessor">#endif</span></div><divclass="line"></div><divclass="line"><spanclass="preprocessor">#include <irrlicht.h></span></div><divclass="line"><spanclass="preprocessor">#include "driverChoice.h"</span></div><divclass="line"><spanclass="preprocessor">#include "exampleHelper.h"</span></div><divclass="line"></div><divclass="line"><spanclass="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> To receive events like mouse and keyboard input, or GUI events like "button has been clicked", we need an object which is derived from the irr::IEventReceiver object. There is only one method to override: irr::IEventReceiver::OnEvent(). This method will be called by the engine once when an event happens. What we really want to know is whether a key is being held down, and so we will remember the current state of each key. </p><divclass="fragment"><divclass="line"><spanclass="keyword">class </span>MyEventReceiver : <spanclass="keyword">public</span> IEventReceiver</div><divclass="line">{</div><divclass="line"><spanclass="keyword">public</span>:</div><divclass="line"><spanclass="comment">// This is the one method that we have to implement</span></div><divclass="line"><spanclass="keyword">virtual</span><spanclass="keywordtype">bool</span> OnEvent(<spanclass="keyword">const</span> SEvent& event)</div><divclass="line"> {</div><divclass="line"><spanclass="comment">// Remember whether each key is down or up</span></div><divclass="line"><spanclass="keywordflow">if</span> (event.EventType == irr::EET_KEY_INPUT_EVENT)</div><divclass="line"> KeyIsDown[<spanclass="keyword">event</span>.KeyInput.Key] = <spanclass="keyword">event</span>.KeyInput.PressedDown;</div></div><!-- fragment --><p> Always return false by default. If you return true you tell the engine that you handled this event completely and the Irrlicht should not process it any further. So for example if you return true for all EET_KEY_INPUT_EVENT events then Irrlicht would not pass on key-events to it's GUI system. </p><divclass="fragment"><divclass="line"><spanclass="keywordflow">return</span><spanclass="keyword">false</span>;</div><divclass="line"> }</div><divclass="line"></div><divclass="line"><spanclass="comment">// This is used to check whether a key is being held down</span></div><divclass="line"><spanclass="keyword">virtual</span><spanclass="keywordtype">bool</span> IsKeyDown(EKEY_CODE keyCode)<spanclass="keyword"> const</span></div><divclass="line"><spanclass="keyword"></span>{</div><divclass="line"><spanclass="keywordflow">return</span> KeyIsDown[keyCode];</div><divclass="line"> }</div><divclass="line"></div><divclass="line"> MyEventReceiver()</div><divclass="line"> {</div><divclass="line"><spanclass="keywordflow">for</span> (u32 i=0; i<KEY_KEY_CODES_COUNT; ++i)</div><divclass="line"> KeyIsDown[i] = <spanclass="keyword">false</span>;</div><divclass="line"> }</div><divclass="line"></div><divclass="line"><spanclass="keyword">private</span>:</div><divclass="line"><spanclass="comment">// We use this array to store the current state of each key</span></div><divclass="line"><spanclass="keywordtype">bool</span> KeyIsDown[KEY_KEY_CODES_COUNT];</div><divclass="line">};</div></div><!-- fragment --><p> The event receiver for keeping the pressed keys is ready, the actual responses will be made inside the render loop, right before drawing the scene. So lets create an irr::IrrlichtDevice and the scene node we want to move. We also create some additional scene nodes to show different possibilities to move and animate scen