From 7028cbe09c688437910a25623098762bf0fa592d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 28 Mar 2016 22:28:34 +1000 Subject: Move Irrlicht to src/others. --- .../examples/04.Movement/tutorial.html | 188 +++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html (limited to 'src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html') diff --git a/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html b/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html new file mode 100644 index 0000000..28b207d --- /dev/null +++ b/src/others/irrlicht-1.8.1/examples/04.Movement/tutorial.html @@ -0,0 +1,188 @@ + +
+
+ Lets start! |
+ |||||||||||
+
+ As always, I include the header files, use the irr namespace, and tell + the linker to link with the .lib file. +
In this tutorial, one of our goals is to move a scene node using some
+ keys on the keyboard. We store a pointer to the scene node we want to
+ move with the keys here.
To get events like mouse and keyboard input, or GUI events like "the + OK button has been clicked", we need an object wich is derived + from the IEventReceiver object. There is only one method to override: + OnEvent. This method will be called by the engine when an event happened. + We will use this input to move the scene node with the keys W and S. +
If the key 'W' or 'S' was left up, we get the position of the scene + node, and modify the Y coordinate a little bit. So if you press 'W', + the node moves up, and if you press 'S' it moves down. +
The event receiver for moving a scene node is ready. So lets just create + an Irrlicht Device and the scene node we want to move. We also create + some other additional scene nodes, to show that there are also some different + possibilities to move and animate scene nodes. +
Create the node for moving it with the 'W' and 'S' key. We create a + sphere node, which is a built in geometric primitive scene node. + We place the node at (0,0,30) and assign a texture to it to let it look + a little bit more interesting. +
Now we create another node, moving using a scene node animator. Scene
+ node animators modify scene nodes and can be attached to any scene node
+ like
The last scene node we add to show possibilities of scene node animators + is a md2 model, which uses a 'fly straight' animator to run between to + points. +
To make to model look right we set the frames between which
+ the animation should loop, rotate the model around 180 degrees, and adjust
+ the animation speed and the texture.
To be able to look at and move around in this scene, we create a first + person shooter style camera and make the mouse cursor invisible. +
We have done everything, so lets draw it. We also write the current frames + per second and the name of the driver to the caption of the window. +
That's it. Compile and play around with the program. +
|
+
+ + -- cgit v1.1