x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
GameFactoryDemo.h - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\GameFactoryDemo.h
旋转
特效
属性
历史版本
/* ----------------------------------------------------------------------------- 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
网页地址
文件地址
上一页
20/45
下一页
下载
( 3 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.