<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://horde3d.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pekuja</id>
		<title>Horde3D Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://horde3d.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pekuja"/>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Special:Contributions/Pekuja"/>
		<updated>2026-09-28T17:07:27Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.3</generator>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Setup_Horde_with_SDL&amp;diff=672</id>
		<title>Tutorial - Setup Horde with SDL</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Setup_Horde_with_SDL&amp;diff=672"/>
				<updated>2010-06-28T14:33:33Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Fixed a few mistakes with the previous update.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|  border=&amp;quot;0&amp;quot; &lt;br /&gt;
| {{ContentBlock|width=800|color=white&lt;br /&gt;
|content='''Here is a small example on how to use Horde with sdl.''' &lt;br /&gt;
Its a simple window that closes when the x is clicked&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Simple SDL Frame|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3DUtils.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDL.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
H3DNode model = 0, cam = 0;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char* args[]){&lt;br /&gt;
    //Creates are bool value for the while loop.&lt;br /&gt;
    bool running = true;&lt;br /&gt;
  &lt;br /&gt;
    //Inits sdl with only the video extention.&lt;br /&gt;
    if (SDL_Init(SDL_INIT_VIDEO) != 0) {&lt;br /&gt;
        std::cerr &amp;lt;&amp;lt; &amp;quot;SDL_Init failed: &amp;quot; &amp;lt;&amp;lt; SDL_GetError() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //Sets are window Caption&lt;br /&gt;
    SDL_WM_SetCaption(&amp;quot;Simple SDL Frame&amp;quot;,NULL);&lt;br /&gt;
&lt;br /&gt;
    //Sets the sdl video mode width and height as well has creates are opengl context.&lt;br /&gt;
    if (!SDL_SetVideoMode(800,600,32,SDL_OPENGL)) {&lt;br /&gt;
        std::cerr &amp;lt;&amp;lt; &amp;quot;SDL_SetVideoMode failed: &amp;quot; &amp;lt;&amp;lt; SDL_GetError() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //Creates Our Event Reciver&lt;br /&gt;
    SDL_Event event;&lt;br /&gt;
    &lt;br /&gt;
    //Inits Horde3D&lt;br /&gt;
    h3dInit();&lt;br /&gt;
    &lt;br /&gt;
    //Sizes the Horde3D View&lt;br /&gt;
    h3dSetupViewport( 0, 0, 800, 600, true );&lt;br /&gt;
&lt;br /&gt;
    // Add pipeline resource&lt;br /&gt;
    H3DRes pipeRes = h3dAddResource( H3DResTypes::Pipeline, &amp;quot;standard.pipeline.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add model resource&lt;br /&gt;
    H3DRes modelRes = h3dAddResource( H3DResTypes::SceneGraph, &amp;quot;character.scene.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add animation resource&lt;br /&gt;
    H3DRes animRes = h3dAddResource( H3DResTypes::Animation, &amp;quot;walk.anim.xml&amp;quot;, 0 );&lt;br /&gt;
    // Load added resources&lt;br /&gt;
    h3dutLoadResourcesFromDisk( &amp;quot;&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    // Add model to scene&lt;br /&gt;
    model = h3dAddNodes( H3DRootNode, modelRes );&lt;br /&gt;
    // Apply animation&lt;br /&gt;
    h3dSetupModelAnimStage( model, 0, animRes, 0, &amp;quot;&amp;quot;, false );&lt;br /&gt;
    &lt;br /&gt;
    // Add light source&lt;br /&gt;
    H3DNode light = h3dAddLightNode( H3DRootNode, &amp;quot;Light1&amp;quot;, 0, &amp;quot;LIGHTING&amp;quot;, &amp;quot;SHADOWMAP&amp;quot; );&lt;br /&gt;
    // Set light position and radius&lt;br /&gt;
    h3dSetNodeTransform( light, 0, 20, 0, 0, 0, 0, 1, 1, 1 );&lt;br /&gt;
&lt;br /&gt;
    //Sets the lightnodes radius&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::RadiusF, 0, 50 );&lt;br /&gt;
    //Sets the lightnodes Field of view&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::FovF, 0, 90 );&lt;br /&gt;
    //Sets the lightnodes ShadowMapCOunt&lt;br /&gt;
    h3dSetNodeParamI( light, H3DLight::ShadowMapCountI, 3 );&lt;br /&gt;
    //Sets the lightnodes ShadowSplitLambda&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::ShadowSplitLambdaF, 0, 0.9f );&lt;br /&gt;
    //Sets the lightnodes ShadowMapBias&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::ShadowMapBiasF, 0, 0.001f );&lt;br /&gt;
    //Sets the lightnodes red value&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::ColorF3, 0, 0.9f );&lt;br /&gt;
    //Sets the lightnodes green value&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::ColorF3, 1, 0.7f );&lt;br /&gt;
    //Sets the lightnodes blue value&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::ColorF3, 2, 0.75f );    &lt;br /&gt;
	&lt;br /&gt;
    // Add camera&lt;br /&gt;
    cam = h3dAddCameraNode( H3DRootNode, &amp;quot;Camera&amp;quot;, pipeRes );&lt;br /&gt;
&lt;br /&gt;
    // Our While loop&lt;br /&gt;
    while(running == true){&lt;br /&gt;
      static float t = 0;&lt;br /&gt;
    &lt;br /&gt;
      // Increase animation time&lt;br /&gt;
      t = t + 10.0f * (1 / 60);&lt;br /&gt;
      //Checks if there is a event that needs processing&lt;br /&gt;
      if(SDL_PollEvent(&amp;amp;event)){&lt;br /&gt;
         //Checks to see if the event is a SDL_QUIT*x on the window is clicked*&lt;br /&gt;
         if(event.type == SDL_QUIT){&lt;br /&gt;
            //Sets the while loop to false and ends program&lt;br /&gt;
            running = false;&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      // Play animation&lt;br /&gt;
      h3dSetModelAnimParams( model, 0, t, 1.0f );&lt;br /&gt;
    &lt;br /&gt;
      // Set new model position&lt;br /&gt;
      h3dSetNodeTransform( model, t * 10, 0, 0,     // Translation&lt;br /&gt;
                                           0, 0, 0,     // Rotation&lt;br /&gt;
                                           1, 1, 1 );   // Scale									   &lt;br /&gt;
      // Render scene &lt;br /&gt;
      h3dRender( cam );&lt;br /&gt;
      &lt;br /&gt;
      //Swaps the sdl opengl buffers&lt;br /&gt;
      SDL_GL_SwapBuffers();&lt;br /&gt;
    }&lt;br /&gt;
    //Releases the Horde3D Engine&lt;br /&gt;
    h3dRelease();&lt;br /&gt;
    //Releases SDL and quits the program&lt;br /&gt;
    SDL_Quit();  &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
--[[User:Wild13|Rj]] 05:28, 1 August 2008 (CEST)&lt;br /&gt;
}}&lt;br /&gt;
|  valign=&amp;quot;top&amp;quot; | {{Extension_Summary|&lt;br /&gt;
name = Horde With SDL|&lt;br /&gt;
screenshot = H3DPlaceHolder.png|&lt;br /&gt;
description = This tutorial introduces the use of Horde3D with SDL|&lt;br /&gt;
version = 1.0|&lt;br /&gt;
horde3dversion = 1.0 beta|&lt;br /&gt;
released = 2008-07-31|&lt;br /&gt;
author = Raynaldo Rivera|&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
[[category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Setup_Horde_with_SDL&amp;diff=671</id>
		<title>Tutorial - Setup Horde with SDL</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Setup_Horde_with_SDL&amp;diff=671"/>
				<updated>2010-06-28T14:27:54Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Updated the code to work with Beta4 and SVN trunk.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|  border=&amp;quot;0&amp;quot; &lt;br /&gt;
| {{ContentBlock|width=800|color=white&lt;br /&gt;
|content='''Here is a small example on how to use Horde with sdl.''' &lt;br /&gt;
Its a simple window that closes when the x is clicked&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Simple SDL Frame|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3DUtils.h&amp;gt;&lt;br /&gt;
#include &amp;lt;SDL.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
H3DNode model = 0, cam = 0;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char* args[]){&lt;br /&gt;
    //Creates are bool value for the while loop.&lt;br /&gt;
    bool running = true;&lt;br /&gt;
  &lt;br /&gt;
    //Inits sdl with only the video extention.&lt;br /&gt;
    if (SDL_Init(SDL_INIT_VIDEO) != 0) {&lt;br /&gt;
        std::cerr &amp;lt;&amp;lt; &amp;quot;SDL_Init failed: &amp;quot; &amp;lt;&amp;lt; SDL_GetError() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //Sets are window Caption&lt;br /&gt;
    SDL_WM_SetCaption(&amp;quot;Simple SDL Frame&amp;quot;,NULL);&lt;br /&gt;
&lt;br /&gt;
    //Sets the sdl video mode width and height as well has creates are opengl context.&lt;br /&gt;
    if (!SDL_SetVideoMode(800,600,32,SDL_OPENGL)) {&lt;br /&gt;
        std::cerr &amp;lt;&amp;lt; &amp;quot;SDL_SetVideoMode failed: &amp;quot; &amp;lt;&amp;lt; SDL_GetError() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    //Creates Our Event Reciver&lt;br /&gt;
    SDL_Event event;&lt;br /&gt;
    &lt;br /&gt;
    //Inits Horde3D&lt;br /&gt;
    h3dInit();&lt;br /&gt;
    &lt;br /&gt;
    //Sizes the Horde3D View&lt;br /&gt;
    h3dResize( 0, 0, 800, 600 );&lt;br /&gt;
&lt;br /&gt;
    // Add pipeline resource&lt;br /&gt;
    H3DRes pipeRes = h3dAddResource( H3DResTypes::Pipeline, &amp;quot;standard.pipeline.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add model resource&lt;br /&gt;
    H3DRes modelRes = h3dAddResource( H3DResTypes::SceneGraph, &amp;quot;character.scene.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add animation resource&lt;br /&gt;
    H3DRes animRes = h3dAddResource( H3DResTypes::Animation, &amp;quot;walk.anim.xml&amp;quot;, 0 );&lt;br /&gt;
    // Load added resources&lt;br /&gt;
    h3dutLoadResourcesFromDisk( &amp;quot;&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    // Add model to scene&lt;br /&gt;
    model = h3dAddNodes( H3DRootNode, modelRes );&lt;br /&gt;
    // Apply animation&lt;br /&gt;
    h3dSetupModelAnimStage( model, 0, animRes, &amp;quot;&amp;quot;, false );&lt;br /&gt;
    &lt;br /&gt;
    // Add light source&lt;br /&gt;
    H3DNode light = h3dAddLightNode( H3DRootNode, &amp;quot;Light1&amp;quot;, 0, &amp;quot;LIGHTING&amp;quot;, &amp;quot;SHADOWMAP&amp;quot; );&lt;br /&gt;
    // Set light position and radius&lt;br /&gt;
    h3dSetNodeTransform( light, 0, 20, 0, 0, 0, 0, 1, 1, 1 );&lt;br /&gt;
&lt;br /&gt;
    //Sets the lightnodes radius&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::RadiusF, 0, 50 );&lt;br /&gt;
    //Sets the lightnodes Field of view&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::FovF, 0, 90 );&lt;br /&gt;
    //Sets the lightnodes ShadowMapCOunt&lt;br /&gt;
    h3dSetNodeParami( light, H3DLight::ShadowMapCountI, 0, 3 );&lt;br /&gt;
    //Sets the lightnodes ShadowSplitLambda&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::ShadowSplitLambdaF, 0, 0.9f );&lt;br /&gt;
    //Sets the lightnodes ShadowMapBias&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::ShadowMapBiasF, 0, 0.001f );&lt;br /&gt;
    //Sets the lightnodes red value&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::ColorF3, 0, 0.9f );&lt;br /&gt;
    //Sets the lightnodes green value&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::ColorF3, 1, 0.7f );&lt;br /&gt;
    //Sets the lightnodes blue value&lt;br /&gt;
    h3dSetNodeParamf( light, H3DLight::ColorF3, 2, 0.75f );    &lt;br /&gt;
	&lt;br /&gt;
    // Add camera&lt;br /&gt;
    cam = h3dAddCameraNode( RootNode, &amp;quot;Camera&amp;quot;, pipeRes );&lt;br /&gt;
&lt;br /&gt;
    // Our While loop&lt;br /&gt;
    while(running == true){&lt;br /&gt;
      static float t = 0;&lt;br /&gt;
    &lt;br /&gt;
      // Increase animation time&lt;br /&gt;
      t = t + 10.0f * (1 / 60);&lt;br /&gt;
      //Checks if there is a event that needs processing&lt;br /&gt;
      if(SDL_PollEvent(&amp;amp;event)){&lt;br /&gt;
         //Checks to see if the event is a SDL_QUIT*x on the window is clicked*&lt;br /&gt;
         if(event.type == SDL_QUIT){&lt;br /&gt;
            //Sets the while loop to false and ends program&lt;br /&gt;
            running = false;&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      // Play animation&lt;br /&gt;
      h3dSetModelAnimParams( model, 0, t, 1.0f );&lt;br /&gt;
    &lt;br /&gt;
      // Set new model position&lt;br /&gt;
      h3dSetNodeTransform( model, t * 10, 0, 0,     // Translation&lt;br /&gt;
                                           0, 0, 0,     // Rotation&lt;br /&gt;
                                           1, 1, 1 );   // Scale									   &lt;br /&gt;
      // Render scene &lt;br /&gt;
      h3dRender( cam );&lt;br /&gt;
      &lt;br /&gt;
      //Swaps the sdl opengl buffers&lt;br /&gt;
      SDL_GL_SwapBuffers();&lt;br /&gt;
    }&lt;br /&gt;
    //Releases the Horde3D Engine&lt;br /&gt;
    h3dRelease();&lt;br /&gt;
    //Releases SDL and quits the program&lt;br /&gt;
    SDL_Quit();  &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
--[[User:Wild13|Rj]] 05:28, 1 August 2008 (CEST)&lt;br /&gt;
}}&lt;br /&gt;
|  valign=&amp;quot;top&amp;quot; | {{Extension_Summary|&lt;br /&gt;
name = Horde With SDL|&lt;br /&gt;
screenshot = H3DPlaceHolder.png|&lt;br /&gt;
description = This tutorial introduces the use of Horde3D with SDL|&lt;br /&gt;
version = 1.0|&lt;br /&gt;
horde3dversion = 1.0 beta|&lt;br /&gt;
released = 2008-07-31|&lt;br /&gt;
author = Raynaldo Rivera|&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
[[category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Simple_HUD&amp;diff=670</id>
		<title>Tutorial - Simple HUD</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Simple_HUD&amp;diff=670"/>
				<updated>2010-06-28T14:21:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Updated the references to function names in the tutorial text.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ __NOEDITSECTION__{{ContentBlock|color=white|content={{!!}}&lt;br /&gt;
AS OF January 9th, 2009 THIS ARTICLE IS A WORK IN PROGRESS.&lt;br /&gt;
&lt;br /&gt;
=Tutorial Objectives=&lt;br /&gt;
* Explanation of overlay procedures and layout format&lt;br /&gt;
* Create basic utility classes for working with overlays&lt;br /&gt;
** Vec2f&lt;br /&gt;
** BasicRect&lt;br /&gt;
* Create a simple HUD Manager&lt;br /&gt;
* Create a root HUDObject class, from which the following derive&lt;br /&gt;
** HUDPanel&lt;br /&gt;
** HUDGauge&lt;br /&gt;
** HUDLabel&lt;br /&gt;
&lt;br /&gt;
==Tutorial Notation==&lt;br /&gt;
Information of that is purely of technical or artistic concern will be presented in subsections addressed to the relevant party.  Feel free to skip those that do not pertain to you.&lt;br /&gt;
&lt;br /&gt;
=Part I: Horde3D Overlays=&lt;br /&gt;
Overlays are special objects which are drawn ontop of a rendered scene. Quoting the Horde3D API reference on the function &amp;quot;h3dShowOverlay()&amp;quot;:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;An overlay is a 2D image that can be used to render 2D GUI elements.  [...] Overlays can have different layers which describe the order in which they are drawn. Overlays with smaller layer numbers are drawn before overlays with higher layer numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The function used to display an overlay is: ''void h3dShowOverlay( float  x_ll, float  y_ll, float  u_ll, float  v_ll, float  x_lr, float  y_lr, float  u_lr, float  v_lr, float  x_ur, float  y_ur, float  u_ur, float  v_ur, float  x_ul, float  y_ul, float  u_ul, float  v_ul, int  layer, H3DRes materialRes )''  That's a pretty monstrous function, which is why we're going to create some basic structures to do the hard work.&lt;br /&gt;
&lt;br /&gt;
[INSERT SCREEN COORDINATE SYSTEM PICTURE HERE]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;IMPORTANT INFORMATION.&amp;lt;/B&amp;gt;  Horde3D begins its screen space coordinate system at the bottom left corner.  Hence the bottom left corner is coordinate (0,0), the bottom right is (1,0), the top left is (0,1), and the top right is (1,1).  ALWAYS REMEMBER THIS.&lt;br /&gt;
&lt;br /&gt;
=Utility Classes=&lt;br /&gt;
&amp;lt;Source lang=cpp&amp;gt;&lt;br /&gt;
//2-Dimensional point struct, later we'll add interpolation&lt;br /&gt;
struct Vec2f&lt;br /&gt;
{&lt;br /&gt;
	float x, y;&lt;br /&gt;
	Vec2f(float vx, float vy)&lt;br /&gt;
	{&lt;br /&gt;
		set(vx,vy);&lt;br /&gt;
	};&lt;br /&gt;
	void set(float vx, float vy)&lt;br /&gt;
	{&lt;br /&gt;
		x = vx; y = vy;&lt;br /&gt;
	};&lt;br /&gt;
	Vec2f()&lt;br /&gt;
	{&lt;br /&gt;
		x = y = 0;&lt;br /&gt;
	};&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
//Basic Rectangle structure, later it'll receive a clipping function&lt;br /&gt;
struct basicRect&lt;br /&gt;
{&lt;br /&gt;
	Vec2f upperLeft, upperRight, lowerLeft, lowerRight;&lt;br /&gt;
	basicRect(){};&lt;br /&gt;
	basicRect(Vec2f ul, Vec2f ur, Vec2f ll, Vec2f lr)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft = ul;&lt;br /&gt;
		upperRight = ur;&lt;br /&gt;
		lowerLeft = ll;&lt;br /&gt;
		lowerRight = lr;&lt;br /&gt;
	};&lt;br /&gt;
	basicRect(Vec2f ll, Vec2f ur)&lt;br /&gt;
	{&lt;br /&gt;
		setSimpleExtents(ll,ur);&lt;br /&gt;
	};&lt;br /&gt;
	void setSimpleExtents(Vec2f ll, Vec2f ur)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft.set(ll.x, ur.y);&lt;br /&gt;
		upperRight = ur;&lt;br /&gt;
		lowerLeft = ll;&lt;br /&gt;
		lowerRight.set(ur.x, ll.y);&lt;br /&gt;
	};&lt;br /&gt;
	void moveX(float val)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft.x += val;&lt;br /&gt;
		lowerLeft.x += val;&lt;br /&gt;
		upperRight.x += val;&lt;br /&gt;
		upperLeft.x += val;&lt;br /&gt;
	};&lt;br /&gt;
	void moveY(float val)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft.y += val;&lt;br /&gt;
		lowerLeft.y += val;&lt;br /&gt;
		upperRight.y += val;&lt;br /&gt;
		upperLeft.y += val;&lt;br /&gt;
	};&lt;br /&gt;
	void move(float x, float y)&lt;br /&gt;
	{&lt;br /&gt;
		moveX(x); moveY(y);&lt;br /&gt;
	};&lt;br /&gt;
	void flipHorizontal()&lt;br /&gt;
	{&lt;br /&gt;
		Vec2f tX, tY;&lt;br /&gt;
		tX = upperLeft;&lt;br /&gt;
		tY = lowerLeft;&lt;br /&gt;
		upperLeft = upperRight;&lt;br /&gt;
		lowerLeft = lowerRight;&lt;br /&gt;
		upperRight = tX;&lt;br /&gt;
		lowerRight = tY;&lt;br /&gt;
	};&lt;br /&gt;
	void flipVertical()&lt;br /&gt;
	{&lt;br /&gt;
		Vec2f tX, tY;&lt;br /&gt;
		tX = upperLeft;&lt;br /&gt;
		tY = upperRight;&lt;br /&gt;
		upperLeft = lowerLeft;&lt;br /&gt;
		upperRight = lowerRight;&lt;br /&gt;
		lowerLeft = tX;&lt;br /&gt;
		lowerRight = tY;&lt;br /&gt;
	};&lt;br /&gt;
	void setEdges(float top, float right, float bottom, float left)&lt;br /&gt;
	{&lt;br /&gt;
		setTop(top);&lt;br /&gt;
		setBottom(bottom);&lt;br /&gt;
		setRight(right);&lt;br /&gt;
		setLeft(left);&lt;br /&gt;
	};&lt;br /&gt;
	void setTop(float val)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft.y = val;&lt;br /&gt;
		upperRight.y = val;&lt;br /&gt;
	};&lt;br /&gt;
	void setBottom(float val)&lt;br /&gt;
	{&lt;br /&gt;
		lowerLeft.y = val;&lt;br /&gt;
		lowerRight.y = val;&lt;br /&gt;
	};&lt;br /&gt;
	void setLeft(float val)&lt;br /&gt;
	{&lt;br /&gt;
		upperLeft.x = val;&lt;br /&gt;
		lowerLeft.x = val;&lt;br /&gt;
	};&lt;br /&gt;
	void setRight(float val)&lt;br /&gt;
	{&lt;br /&gt;
		upperRight.x = val;&lt;br /&gt;
		lowerRight.x = val;&lt;br /&gt;
	};&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/Source&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Picking&amp;diff=669</id>
		<title>Tutorial - Picking</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Picking&amp;diff=669"/>
				<updated>2010-06-28T14:19:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Updated the code to work with Beta4 and SVN trunk.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|  border=&amp;quot;0&amp;quot; &lt;br /&gt;
| {{ContentBlock|width=800|color=white&lt;br /&gt;
|content={{!!}}&lt;br /&gt;
== Picking the mesh under the mouse cursor ==&lt;br /&gt;
&lt;br /&gt;
Picking an object within the scene is a common problem. &lt;br /&gt;
Supposing you want to select the object using a mouse the following sample will show you how you get the NodeHandle for the object under the mouse cursor.&lt;br /&gt;
&lt;br /&gt;
Based on the '''knight example''' in the Horde3D SDK we will first remove the mouseMoveListener. To enable the mouse cursor again we have to remove the &amp;lt;br /&amp;gt;&lt;br /&gt;
''glfwDisable( GLFW_MOUSE_CURSOR );'' and ''glfwEnable( GLFW_MOUSE_CURSOR );'' statements, too.&lt;br /&gt;
&lt;br /&gt;
Then we define a mouseButtonListener in the '''main.cpp''':&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Normalize mouse button for Horde3DUtils::pickNode.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
void GLFWCALL mouseButtonListener( int button, int action )&lt;br /&gt;
{&lt;br /&gt;
   // If left mouse button has been pressed...&lt;br /&gt;
   if( button == GLFW_MOUSE_BUTTON_LEFT &amp;amp;&amp;amp; action == GLFW_PRESS)&lt;br /&gt;
   {&lt;br /&gt;
       int x, y;&lt;br /&gt;
       int width, height;&lt;br /&gt;
       // get mouse position&lt;br /&gt;
       glfwGetMousePos(&amp;amp;x, &amp;amp;y);&lt;br /&gt;
       // get window size for normalization&lt;br /&gt;
       glfwGetWindowSize(&amp;amp;width, &amp;amp;height);&lt;br /&gt;
       // pick the node under the normalized mouse position&lt;br /&gt;
       app-&amp;gt;pick( x / float( width ), (height - y) / float( height ) );&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
To activate that listener we have to add the following code to the '''setupWindow''' method:&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|description=Activate mouse button listener|code=&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
glfwSetMouseButtonCallback( mouseButtonListener );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the use of [http://www.horde3d.org/docs/_utils.html#pickNode Horde3DUtils::pickNode] we have to normalize the window coordinates received by ''glfwGetMousePos''. That's why we need to call ''glfwGetWindowSize'' additionally. Another conversion has to be made, since GLFW has it's origin in the upper left corner while Horde3D requires the origin to be in the lower left corner. &lt;br /&gt;
&lt;br /&gt;
Then in the '''app.cpp''' we implement a call to the h3dutPickNode utility function.&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Get the NodeHandle under the mouse cursor.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
void Application::pick( float dX, float dY )&lt;br /&gt;
{&lt;br /&gt;
   H3DNode node = h3dutPickNode(_cam, dX, dY);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
|  valign=&amp;quot;top&amp;quot; | {{Extension_Summary|&lt;br /&gt;
name = Picking Tutorial|&lt;br /&gt;
screenshot = H3DPlaceHolder.png|&lt;br /&gt;
description = This tutorial present how to pick an object in a 3D scene.|&lt;br /&gt;
version = 1.0|&lt;br /&gt;
horde3dversion = 1.0 beta|&lt;br /&gt;
released = 2008-04-15|&lt;br /&gt;
author = Volker Wiendl|&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
[[category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Hello_World&amp;diff=668</id>
		<title>Tutorial - Hello World</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Hello_World&amp;diff=668"/>
				<updated>2010-06-28T14:14:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Updated the references to function names in the tutorial text.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|  border=&amp;quot;0&amp;quot; &lt;br /&gt;
| {{ContentBlock|width=800|color=white&lt;br /&gt;
|content='''In this section we will create a simple application that loads a character and animates it using a walk cycle. You will see how straightforward it is to use the Horde3D API.''' &lt;br /&gt;
&lt;br /&gt;
As a first step you have to create an application that opens a window which can be used for rendering. This is a pretty standard task and if you are a novice and have problems with that on your platform use Google to find one of the numerous good tutorials on the net or have a look at the samples that come with the Horde3D SDK. The next step is to initialize an OpenGL context for our rendering window. You can do this manually or use the Horde3D Utility Library to make your life easier. After that is done we can finally get to the engine related part.&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Simple Setup of the Horde3D renderer.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3D.h&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3DUtils.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
H3DNode model = 0, cam = 0;&lt;br /&gt;
&lt;br /&gt;
void initGame( int winWidth, int winHeight )&lt;br /&gt;
{&lt;br /&gt;
    // Initialize engine&lt;br /&gt;
    h3dInit();&lt;br /&gt;
    h3dSetupViewport( 0, 0, winWidth, winHeight, true );&lt;br /&gt;
    &lt;br /&gt;
    // Add pipeline resource&lt;br /&gt;
    H3DRes pipeRes = h3dAddResource( H3DResTypes::Pipeline, &amp;quot;standard.pipeline.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add model resource&lt;br /&gt;
    H3DRes modelRes = h3dAddResource( H3DResTypes::SceneGraph, &amp;quot;character.scene.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add animation resource&lt;br /&gt;
    H3DRes animRes = h3dAddResource( H3DResTypes::Animation, &amp;quot;walk.anim.xml&amp;quot;, 0 );&lt;br /&gt;
    // Load added resources&lt;br /&gt;
    h3dutLoadResourcesFromDisk( &amp;quot;&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    // Add model to scene&lt;br /&gt;
    model = h3dAddNodes( H3DRootNode, modelRes );&lt;br /&gt;
    // Apply animation&lt;br /&gt;
    h3dSetupModelAnimStage( model, 0, animRes, 0, &amp;quot;&amp;quot;, false );&lt;br /&gt;
    &lt;br /&gt;
    // Add light source&lt;br /&gt;
    H3DNode light = h3dAddLightNode( H3DRootNode, &amp;quot;Light1&amp;quot;, 0, &amp;quot;LIGHTING&amp;quot;, &amp;quot;SHADOWMAP&amp;quot; );&lt;br /&gt;
    // Set light position and radius&lt;br /&gt;
    h3dSetNodeTransform( light, 0, 20, 0, 0, 0, 0, 1, 1, 1 );&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::RadiusF, 0, 50.0f );&lt;br /&gt;
	&lt;br /&gt;
    // Add camera&lt;br /&gt;
    H3DNode cam = h3dAddCameraNode( H3DRootNode, &amp;quot;Camera&amp;quot;, pipeRes );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first line of the code above declares two global handles to Horde scene graph nodes. All objects in Horde are accessible via handles, a concept similar to pointers. The first thing we need to do in our initGame function to use Horde3D is initializing the engine. This happens with the function h3dInit. After that we tell the engine the size of our rendering window so that it can adjust the viewport.&lt;br /&gt;
&lt;br /&gt;
The next step is to load the required resources. In Horde resources are data files that are loaded once and can be referenced by several objects for rendering. The function h3dAddResource takes the resource type we want to add and the name of the resource (usually the filename) as parameters and returns a handle to the created resource object. In our case we want a model which is represented as a scene graph file in Horde and additionally an animation. Now the resources are created but we still need to load them. Horde supports loading from any sources including encrypted archives or a network but in this case we just want to load our resources from the local hard disk which is done with the utility function h3dutLoadResourcesFromDisk. Besides our model and animation we also load a pipeline resource. A pipeline defines how the the scene is rendered and can be used to realize post-processing effects or high dynamic range rendering. For the beginning you can just use the files that come with the SDK samples.&lt;br /&gt;
&lt;br /&gt;
After we have loaded the required resources we can finally build up the scene graph. The scene graph represents the objects in our virtual world in a hierarchical tree structure. First we add the model that we have loaded before. We use the function h3dAddNodes for doing this which takes a scene graph resource and a parent node. The parent is the scene object to which the new node is attached, in our case just the root node which is the base of the virtual world. Similar to h3dAddResource this function also returns a handle to the created scene graph subtree. After that we assign the loaded animation to our model node with the function h3dSetupModelAnimStage. Horde allows you to apply several different animations to a model and makes it possible to blend and mix them but for the beginning one should be enough. Now that adding the model is finished we still need a light source. It would be possible to load another scene graph file which contains the light source but we want to add it manually by using the h3dAddLightNode function. This function requires several parameters specifying the shaders used for rendering. More information on this can be found in other sections of the manual. The next step is to set the position and orientation which is done with h3dSetNodeTransform. After that we specify the light radius which defines the zone of influence using h3dSetNodeParamF. Finally we still need a camera which represents the viewer. It is added with the function h3dAddCameraNode and takes our loaded pipeline resource as parameter.&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Game Loop and Destructor|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
void gameLoop( float fps )&lt;br /&gt;
{&lt;br /&gt;
    static float t = 0;&lt;br /&gt;
    &lt;br /&gt;
    // Increase animation time&lt;br /&gt;
    t = t + 10.0f * (1 / fps);&lt;br /&gt;
    &lt;br /&gt;
    // Play animation&lt;br /&gt;
    h3dSetModelAnimParams( model, 0, t, 1.0f );&lt;br /&gt;
    &lt;br /&gt;
    // Set new model position&lt;br /&gt;
    h3dSetNodeTransform( model, t * 10, 0, 0,  // Translation&lt;br /&gt;
                         0, 0, 0,              // Rotation&lt;br /&gt;
                         1, 1, 1 );            // Scale&lt;br /&gt;
										   &lt;br /&gt;
    // Render scene&lt;br /&gt;
    h3dRender( cam );&lt;br /&gt;
    &lt;br /&gt;
    // Finish rendering of frame&lt;br /&gt;
    h3dFinalizeFrame();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void releaseGame()&lt;br /&gt;
{&lt;br /&gt;
    // Release engine&lt;br /&gt;
    h3dRelease();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The next function in our sample is the game loop which is called once every frame. Here we will animate our character model. For doing this we define a time counter which is increased in every frame. To make the animation speed independent from the framerate, we scale the time step by the inverse of the current frames per second value. After that we tell the engine to update the model animation using the h3dSetModelAnimParams function. We could also specify a blend weight for combining animations here but since we have only one animation we don't need that. Now we can displace our character a bit so that it moves through the scene. This is achieved by updating the model node transformation. Finally we need to tell the engine to render the scene and recalculate the model animation. This happens with the function h3dRender that expects the camera from which the scene is viewed.&lt;br /&gt;
&lt;br /&gt;
The last function releaseGame is called when the application is closed. All we have to do here is freeing the engine with the h3dRelease function.&lt;br /&gt;
&lt;br /&gt;
That's it so far with the basic tutorial. You can have a look at the Usage Guide now to learn more details.&lt;br /&gt;
}}&lt;br /&gt;
|  valign=&amp;quot;top&amp;quot; | {{Extension_Summary|&lt;br /&gt;
name = Hello World Tutorial|&lt;br /&gt;
screenshot = H3DPlaceHolder.png|&lt;br /&gt;
description = This tutorial introduces the basic steps necessary to setup horde3d|&lt;br /&gt;
version = 1.0|&lt;br /&gt;
horde3dversion = 1.0 beta|&lt;br /&gt;
released = 2008-03-30|&lt;br /&gt;
author = Nicolas Schulz|&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
[[category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	<entry>
		<id>http://horde3d.org/wiki/index.php?title=Tutorial_-_Hello_World&amp;diff=667</id>
		<title>Tutorial - Hello World</title>
		<link rel="alternate" type="text/html" href="http://horde3d.org/wiki/index.php?title=Tutorial_-_Hello_World&amp;diff=667"/>
				<updated>2010-06-28T14:11:29Z</updated>
		
		<summary type="html">&lt;p&gt;Pekuja: Updated the code to work with Beta4 and SVN trunk.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|  border=&amp;quot;0&amp;quot; &lt;br /&gt;
| {{ContentBlock|width=800|color=white&lt;br /&gt;
|content='''In this section we will create a simple application that loads a character and animates it using a walk cycle. You will see how straightforward it is to use the Horde3D API.''' &lt;br /&gt;
&lt;br /&gt;
As a first step you have to create an application that opens a window which can be used for rendering. This is a pretty standard task and if you are a novice and have problems with that on your platform use Google to find one of the numerous good tutorials on the net or have a look at the samples that come with the Horde3D SDK. The next step is to initialize an OpenGL context for our rendering window. You can do this manually or use the Horde3D Utility Library to make your life easier. After that is done we can finally get to the engine related part.&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Simple Setup of the Horde3D renderer.|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3D.h&amp;gt;&lt;br /&gt;
#include &amp;lt;Horde3DUtils.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
H3DNode model = 0, cam = 0;&lt;br /&gt;
&lt;br /&gt;
void initGame( int winWidth, int winHeight )&lt;br /&gt;
{&lt;br /&gt;
    // Initialize engine&lt;br /&gt;
    h3dInit();&lt;br /&gt;
    h3dSetupViewport( 0, 0, winWidth, winHeight, true );&lt;br /&gt;
    &lt;br /&gt;
    // Add pipeline resource&lt;br /&gt;
    H3DRes pipeRes = h3dAddResource( H3DResTypes::Pipeline, &amp;quot;standard.pipeline.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add model resource&lt;br /&gt;
    H3DRes modelRes = h3dAddResource( H3DResTypes::SceneGraph, &amp;quot;character.scene.xml&amp;quot;, 0 );&lt;br /&gt;
    // Add animation resource&lt;br /&gt;
    H3DRes animRes = h3dAddResource( H3DResTypes::Animation, &amp;quot;walk.anim.xml&amp;quot;, 0 );&lt;br /&gt;
    // Load added resources&lt;br /&gt;
    h3dutLoadResourcesFromDisk( &amp;quot;&amp;quot; );&lt;br /&gt;
    &lt;br /&gt;
    // Add model to scene&lt;br /&gt;
    model = h3dAddNodes( H3DRootNode, modelRes );&lt;br /&gt;
    // Apply animation&lt;br /&gt;
    h3dSetupModelAnimStage( model, 0, animRes, 0, &amp;quot;&amp;quot;, false );&lt;br /&gt;
    &lt;br /&gt;
    // Add light source&lt;br /&gt;
    H3DNode light = h3dAddLightNode( H3DRootNode, &amp;quot;Light1&amp;quot;, 0, &amp;quot;LIGHTING&amp;quot;, &amp;quot;SHADOWMAP&amp;quot; );&lt;br /&gt;
    // Set light position and radius&lt;br /&gt;
    h3dSetNodeTransform( light, 0, 20, 0, 0, 0, 0, 1, 1, 1 );&lt;br /&gt;
    h3dSetNodeParamF( light, H3DLight::RadiusF, 0, 50.0f );&lt;br /&gt;
	&lt;br /&gt;
    // Add camera&lt;br /&gt;
    H3DNode cam = h3dAddCameraNode( H3DRootNode, &amp;quot;Camera&amp;quot;, pipeRes );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The first line of the code above declares two global handles to Horde scene graph nodes. All objects in Horde are accessible via handles, a concept similar to pointers. The first thing we need to do in our initGame function to use Horde3D is initializing the engine. This happens with the function init. After that we tell the engine the size of our rendering window so that it can adjust the viewport.&lt;br /&gt;
&lt;br /&gt;
The next step is to load the required resources. In Horde resources are data files that are loaded once and can be referenced by several objects for rendering. The function addResource takes the resource type we want to add and the name of the resource (usually the filename) as parameters and returns a handle to the created resource object. In our case we want a model which is represented as a scene graph file in Horde and additionally an animation. Now the resources are created but we still need to load them. Horde supports loading from any sources including encrypted archives or a network but in this case we just want to load our resources from the local hard disk which is done with the utility function loadResourcesFromDisk. Besides our model and animation we also load a pipeline resource. A pipeline defines how the the scene is rendered and can be used to realize post-processing effects or high dynamic range rendering. For the beginning you can just use the files that come with the SDK samples.&lt;br /&gt;
&lt;br /&gt;
After we have loaded the required resources we can finally build up the scene graph. The scene graph represents the objects in our virtual world in a hierarchical tree structure. First we add the model that we have loaded before. We use the function addNodes for doing this which takes a scene graph resource and a parent node. The parent is the scene object to which the new node is attached, in our case just the root node which is the base of the virtual world. Similar to addResource this function also returns a handle to the created scene graph subtree. After that we assign the loaded animation to our model node with the function setupModelAnimStage. Horde allows you to apply several different animations to a model and makes it possible to blend and mix them but for the beginning one should be enough. Now that adding the model is finished we still need a light source. It would be possible to load another scene graph file which contains the light source but we want to add it manually by using the addLightNode function. This function requires several parameters specifying the shaders used for rendering. More information on this can be found in other sections of the manual. The next step is to set the position and orientation which is done with setNodeTransform. After that we specify the light radius which defines the zone of influence using setLightParam. Finally we still need a camera which represents the viewer. It is added with the function addCameraNode and takes our loaded pipeline resource as parameter.&lt;br /&gt;
&lt;br /&gt;
{{CppSourceCode|&lt;br /&gt;
description= Game Loop and Destructor|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
void gameLoop( float fps )&lt;br /&gt;
{&lt;br /&gt;
    static float t = 0;&lt;br /&gt;
    &lt;br /&gt;
    // Increase animation time&lt;br /&gt;
    t = t + 10.0f * (1 / fps);&lt;br /&gt;
    &lt;br /&gt;
    // Play animation&lt;br /&gt;
    h3dSetModelAnimParams( model, 0, t, 1.0f );&lt;br /&gt;
    &lt;br /&gt;
    // Set new model position&lt;br /&gt;
    h3dSetNodeTransform( model, t * 10, 0, 0,  // Translation&lt;br /&gt;
                         0, 0, 0,              // Rotation&lt;br /&gt;
                         1, 1, 1 );            // Scale&lt;br /&gt;
										   &lt;br /&gt;
    // Render scene&lt;br /&gt;
    h3dRender( cam );&lt;br /&gt;
    &lt;br /&gt;
    // Finish rendering of frame&lt;br /&gt;
    h3dFinalizeFrame();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void releaseGame()&lt;br /&gt;
{&lt;br /&gt;
    // Release engine&lt;br /&gt;
    h3dRelease();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The next function in our sample is the game loop which is called once every frame. Here we will animate our character model. For doing this we define a time counter which is increased in every frame. To make the animation speed independent from the framerate, we scale the time step by the inverse of the current frames per second value. After that we tell the engine to update the model animation using the setModelAnimParams function. We could also specify a blend weight for combining animations here but since we have only one animation we don't need that. Now we can displace our character a bit so that it moves through the scene. This is achieved by updating the model node transformation. Finally we need to tell the engine to render the scene and recalculate the model animation. This happens with the function render that expects the camera from which the scene is viewed.&lt;br /&gt;
&lt;br /&gt;
The last function releaseGame is called when the application is closed. All we have to do here is freeing the engine with the release function.&lt;br /&gt;
&lt;br /&gt;
That's it so far with the basic tutorial. You can have a look at the Usage Guide now to learn more details.&lt;br /&gt;
}}&lt;br /&gt;
|  valign=&amp;quot;top&amp;quot; | {{Extension_Summary|&lt;br /&gt;
name = Hello World Tutorial|&lt;br /&gt;
screenshot = H3DPlaceHolder.png|&lt;br /&gt;
description = This tutorial introduces the basic steps necessary to setup horde3d|&lt;br /&gt;
version = 1.0|&lt;br /&gt;
horde3dversion = 1.0 beta|&lt;br /&gt;
released = 2008-03-30|&lt;br /&gt;
author = Nicolas Schulz|&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
[[category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pekuja</name></author>	</entry>

	</feed>