DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
#pragma once #include "btBulletDynamicsCommon.h" #include "BulletColladaConverter\ColladaConverter.h" #include "dom\domphysics_model.h" #include "dom\domelements.h" #include "dom\domcollada.h" #include "GameScreen.h" //#include "Game3DObject.h" #include "Character.h" #include "Map.h" using namespace DarkBattle; namespace DarkBattle{ #define EFFECT_NUMPARAMS 16 extern const char* EffectParamNames[EFFECT_NUMPARAMS]; #define EPASS_RenderAmbient 0 #define EPASS_RenderShadowMesh 1 #define EPASS_RenderLight 2 #define RAY_STATIC_FILTER 2 #define RAY_DYNAMIC_FILTER 1 class Character; class Map; class GameLevel: public GameScreen{//tolua_export private: static GameLevel* theGameLevel; HRESULT hr; #define FRAME_RATE 30.0f //adjust this value to balanced between speed and accuracy of the simulation #define MAX_PROXIES 3000 //maximum number of physical object in the simulation #define GRAVITY_VALUE -98.0f Map* map; MyIterator
thinkingIter; //init anything related to bullet btDefaultCollisionConfiguration* m_collisionConfiguration; btCollisionDispatcher* m_dispatcher; btBroadphaseInterface* m_overlappingPairCache; btConstraintSolver* m_solver; btDynamicsWorld* m_dynamicsWorld; //keep the collision shapes, for deletion/cleanup btAlignedObjectArray
m_collisionShapes; char* levelName;///the file name of the current level bool hasShadow; //mean that the shadow is enable D3DXHANDLE techniqueRenderScene; // render scene with lighting only, z disable Vec3 mouseHitPos,mouseHitNorm; bool mouseIsHit; bool haveTimeLeft(); void renderDebugLines(); ///this function used to process all collision events static bool myContactCallback(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1){ return true; } void initBullet(); void framemoveBullet(float elapseTime); void destroyBullet(); class MyConverter : public ColladaConverter { private: btRigidBody* findRigidBodyBySID(const char* sid); public: MyConverter(btDynamicsWorld* dynaWorld): ColladaConverter(dynaWorld){}; ~MyConverter(void){}; bool load(IDirect3DDevice9* pd3dDevice, const char* fileName, bool hasShadow); }; void initPathFinding(); float mapSizeX, mapSizeY; inline static double GetCurrentTime(){return DXUTGetGlobalTimer()->GetTime();}; double previousTime; public: static enum EffectParamConst{MatWorld,MatView,MatProjection,MatWorldView,MatWorldViewProjection, BumpTexture,BaseTexture,LightShadowPos,LightShadowRange,LightShadowColor,LightFallOff, LightShadowDirView,LightIsSpotLight,LightShadowRadius,DebugMode,LightDirectionalDir}; //effect parameters management static D3DXHANDLE* effectParams; inline static D3DXHANDLE GetEffectParamConst(EffectParamConst id){ return effectParams[id]; } inline static GameLevel* GetInstance(){assert(theGameLevel!=NULL);return theGameLevel;}//tolua_export Character* controllableCharacter; ID3DXEffect* pEffect; //use to load effect file GameLevel(IDirect3DDevice9* pd3dDevice); ~GameLevel(void); void LoadContent(IDirect3DDevice9* pd3dDevice,const char* fileName); void OnResetDevice(IDirect3DDevice9* pd3dDevice); void renderPhysicsWorld(); void RemoveRigidBody(btRigidBody* pBody){m_dynamicsWorld->removeRigidBody(pBody);}; void AddRigidBody(btRigidBody* pBody){m_dynamicsWorld->addRigidBody(pBody);}; //TODO:need to clean these stuffs D3DLIGHT9 light; D3DXVECTOR3 eye; D3DXVECTOR3 at; D3DXVECTOR3 up; D3DXMATRIX view; D3DXMATRIX projection; D3DXMATRIX viewProjection; D3DXMATRIX world; D3DXMATRIX worldView; D3DXMATRIX worldViewProjection; float angle;//camera angle //bool isRenderingShadowMesh; UINT currentPass; void OnRender(IDirect3DDevice9* pd3dDevice); void OnFrameMove(float elapsedTime); void OnLostDevice(); inline bool IsMouseHit() {return mouseIsHit;}//tolua_export inline Vec3 GetMouseHitPos(){return mouseHitPos;};//tolua_export inline Vec3 GetMouseHitNorm(){return mouseHitNorm;};//tolua_export static void DrawDebugLine(Vec3 fromP, Vec3 toP, Vec3 color);//tolua_export static void DrawDebugLine(Vec3 fromP, Vec3 toP);//tolua_export static void DrawDebugLineDelta(Vec3 fromP, Vec3 delta);//tolua_export static void DrawDebugLineDelta(Vec3 fromP, Vec3 delta,Vec3 color);//tolua_export static bool RayCast(Vec3 fromP, Vec3 toP, Vec3* pHitPos, Vec3* pNormalVec);//tolua_export static bool RayCastTwoWay(Vec3 pos1, Vec3 pos2);//tolua_export inline Map* GetMap(){return map;};//tolua_export void SetMapSizeX(float size);//tolua_export void SetMapSizeY(float size);;//tolua_export };//tolua_export }
GameLevel.h
Page URL
File URL
Prev
41/65
Next
Download
( 4 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.