x
Yes
No
Do you want to visit DriveHQ English website?
Inicio
Características
Precios
Prueba gratuita
Software cliente
Acerca de nosotros
Servidor de archivos
|
Solución de copias de seguridad
|
Servidor FTP
|
Servidor de correo electrónico
|
Alojamiento web
|
Software cliente
Servidor de archivos
Solución de copia de seguridad
Servidor FTP
Servidor de correo electrónico
Alojamiento web
Software cliente
GameFactoryDemo.h - Hosted on DriveHQ Cloud IT Platform
Arriba
Subir
Descargar
Compartir
Publicar
Nueva carpeta
Nuevo archivo
Copiar
Cortar
Eliminar
Pegar
Clasificación
Actualizar
Ruta de la carpeta: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\GameFactoryDemo.h
Girar
Efecto
Propiedad
Historial
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2006 Torus Knot Software Ltd 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: SkeletalAnimation.h Description: Specialisation of OGRE's framework application to show the skeletal animation feature, including spline animation. ----------------------------------------------------------------------------- */ #pragma once #include "ExampleApplication.h" #include "precompiled.h" #include "DebugLine.h" #include "Smoke.h" using namespace GameFactory; #define NUM_JAIQUAS 1 class SkeletalApplication; // Event handler to animate //class SkeletalAnimationFrameListener : public ExampleFrameListener //{ // //public: // //}; class SkeletalApplication : public ExampleApplication, public FrameListener, public WindowEventListener { private: DebugLine* mLineDrawer; static SkeletalApplication* theSoleInstance; Vector3 mouse3dPos; protected: bool processUnbufferedKeyInput(const FrameEvent& evt); bool processUnbufferedMouseInput(const FrameEvent& evt); public: Smoke* smoke; inline RenderWindow* GetWindow(){return mWindow;}; bool frameStarted(const FrameEvent& evt); bool frameEnded(const FrameEvent& evt); //ExampleFrameListener methods protected: void updateStats(void); public: std::string mDebugText; // Constructor takes a RenderWindow because it uses that to determine input context void Initialize(bool bufferedKeys = false, bool bufferedMouse = false, bool bufferedJoy = false ); //Adjust mouse clipping area virtual void windowResized(RenderWindow* rw); //Unattach OIS before window shutdown (very important under Linux) virtual void windowClosed(RenderWindow* rw); //ExampleFrameListener(){}; //~ExampleFrameListener(){}; void Destroy(); void moveCamera(); void showDebugOverlay(bool show); //bool frameEnded(const FrameEvent& evt) //{ // updateStats(); // return true; //} protected: //Camera* mCamera; Vector3 mTranslateVector; //RenderWindow* mWindow; bool mStatsOn; unsigned int mNumScreenShots; float mMoveScale; Degree mRotScale; // just to stop toggles flipping too fast Real mTimeUntilNextToggle ; Radian mRotX, mRotY; TextureFilterOptions mFiltering; int mAniso; int mSceneDetailIndex ; Real mMoveSpeed; Degree mRotateSpeed; Overlay* mDebugOverlay; //OIS Input devices OIS::InputManager* mInputManager; OIS::Mouse* mMouse; OIS::Keyboard* mKeyboard; OIS::JoyStick* mJoy; //ExampleApplication methods public: SkeletalApplication() {theSoleInstance = this;} inline static SkeletalApplication* GetSingleton() {return theSoleInstance;}; bool RayCast(Vector3 from, Vector3 to, Vector3* hitPos, Vector3* hitNorm, bool pickSoldier = false, bool shoot=false); inline bool RayCastTwoWay(Vector3 from, Vector3 to){return RayCast(from,to, NULL, NULL) || RayCast(to,from,NULL,NULL);}; void CreateCube(const Vector3& pos, Real size, const Vector3& initialVelocity = Vector3(0,0,0)); virtual ~SkeletalApplication(){ Destroy(); } protected: //std::string mDebugText; // Just override the mandatory create scene method void createScene(void); // Create new frame listener void createFrameListener(void) { //mFrameListener= new SkeletalAnimationFrameListener(this, mWindow, mCamera, mDebugText); Initialize(); mRoot->addFrameListener(this); } };
GameFactoryDemo.h
Dirección de la página
Dirección del archivo
Anterior
20/45
Siguiente
Descargar
( 3 KB )
Comments
Total ratings:
0
Average rating:
No clasificado
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.