Code Search for Developers
 
 
  

PruebaOgreWizard.h from Project OGRE Lia Game (POGLI Game) at Krugle


Show PruebaOgreWizard.h syntax highlighted

/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2005 The OGRE Team
Also see acknowledgements in Readme.html

You may use this sample code for anything you like, it is not covered by the
LGPL like the rest of the engine.
-----------------------------------------------------------------------------
*/

/*
-----------------------------------------------------------------------------
Filename:    PruebaOgreWizard.h
Description: A place for me to try out stuff with OGRE.
-----------------------------------------------------------------------------
*/
#ifndef __PruebaOgreWizard_h_
#define __PruebaOgreWizard_h_


#include "ExampleApplication.h"





class PruebaOgreWizardFrameListener : public ExampleFrameListener
{
private:
   SceneManager* mSceneMgr;
public:
      PruebaOgreWizardFrameListener(SceneManager *sceneMgr, RenderWindow* win, Camera* cam)
         : ExampleFrameListener(win, cam),
         mSceneMgr(sceneMgr)
	{
	}

	bool frameStarted(const FrameEvent& evt)
	{
				bool ret = ExampleFrameListener::frameStarted(evt);
		

      return ret;

	}

};



class PruebaOgreWizardApp : public ExampleApplication
{
	public:
		PruebaOgreWizardApp()
      {}

	~PruebaOgreWizardApp()
	{
	}

protected:

	virtual void createCamera(void)
	{
      // Create the camera
      mCamera = mSceneMgr->createCamera("PlayerCam");

      // Position it at 500 in Z direction
      mCamera->setPosition(Vector3(0,0,80));
      // Look back along -Z
      mCamera->lookAt(Vector3(0,0,-300));
      mCamera->setNearClipDistance(5);
	}




	// Just override the mandatory create scene method
	virtual void createScene(void)
	{

      Entity* ogreHead = mSceneMgr->createEntity("Head", "ogrehead.mesh");

      SceneNode* headNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
      headNode->attachObject(ogreHead);

      // Set ambient light
      mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5));

      // Create a light
      Light* l = mSceneMgr->createLight("MainLight");
      l->setPosition(20,80,50);
	}

   // Create new frame listener
	void createFrameListener(void)
	{
      mFrameListener= new PruebaOgreWizardFrameListener(mSceneMgr, mWindow, mCamera);
		mRoot->addFrameListener(mFrameListener);
	}
};

#endif // #ifndef __PruebaOgreWizard_h_



See more files for this project here

Project OGRE Lia Game (POGLI Game)

Video juego desarrollado en OGRE, multiplataforma (a nivel de codigo fuente). Proyecto desarrollado como tesis para la facultad de ingenieria, UNAM, Mexico

Project homepage: http://sourceforge.net/projects/tesis-h4l9k-jp
Programming language(s): C++
License: other

  PruebaOgreWizard.h