2 #pragma warning( disable : 4482 )
8 #include "SoundInterface.hpp"
24 static enum States { Normal, Won, Lost, Init };
27 bool Scene::init(
void);
28 void Scene::update(
float timeDiff);
35 void Scene::updateBorderParts(
float timeDiff);
36 void Scene::updateCamera(
float timeDiff,
bool firstUpdate);
37 void Scene::updateLight(
float timeDiff);
38 void Scene::updateLightning(
float timeDiff);
39 void Scene::updateSkyBox(
float timeDiff);
40 void Scene::updateInfoPanel();
48 void Scene::updateSectors(
float timeDiff,
bool firstUpdate);
49 void Scene::updateBadFactor(
float timeDiff);
50 void Scene::updateSound(
float timeDiff);
52 void Scene::draw(
void);
58 void Scene::handleShoot(
int button);
59 bool Scene::checkFrustumCulling(GameObject *gameObject);
60 void Scene::resize(
int x,
int y);
61 void Scene::toggleMipMapping(
void);
62 void Scene::toggleTrilinear(
void);
63 void Scene::toggleWireFrame(
void);
64 void Scene::toggleTransparency(
void);
65 void Scene::toggleFrustumCulling(
void);
66 void Scene::toggleNightMode(
void);
67 void Scene::togglePause(glm::vec3 *cameraPosition = NULL);
68 void Scene::generateRandom();
69 void Scene::setUniforms(
const Model *model,
const GameObject *gameobject,
const Sector *sector = NULL);
70 void Scene::drawModel(
const Model * model,
const string mode =
"normal",
bool specialoffset =
false,
int specialoffsetposition = -1);
71 void Scene::playSingleSoundDistance(
float maxLength, glm::vec3 positionObject, SoundInterface::Sounds soundType,
bool debugOutput =
false);
73 int mScreenWidth, mScreenHeight;
74 Model *mModelTree, *mModelMoai, *mModelGround, *mModelGroundBorder, *mModelInfoPanel, *mModelSkybox, *mModelPeopleGood, *mModelPeopleBad, *mModelLight, *mModelHolyGrenade, *mModelHolyGrenadeBorder, *mModelLightning, *mModelStoneWall, *mModelOverlay;
76 GameObject *mLight, *mLightning, *mSkybox, **mGroundParts, **mGroundBorderParts, *mInfoPanel;
77 GameObject *mMousePointer;
78 glm::mat4 *mProjectionMatrix, *mProjectionMatrixTexProj, *mProjectionMatrixOrtho;
79 Shader *mShaderBlinnphong, *mShaderSkybox, *mShaderFbo, *mShaderOverlay;
80 float mBadFactor, mLightningAlive, mSpeedFactor, mTimeDiffWonOrLostWait;
81 int mBadSwapping, mCountDrawnObjects, mCountCulledObjects;
82 bool mNightMode, mPaused, mMipMapping, mTrilinear, mWireFrame, mTransparency, mFrustumCulling;
84 SoundInterface *mSoundInterface;
85 glm::ivec2 *mMousePosition;
87 static std::map<int, GameObject*> sGameObjects;
90 bool mLightningVaoOnlyUpdate;
91 GLuint mFboId, mFboImgId;
92 Shader *mShaderActive;
93 void Scene::setShaderActive(Shader *shader);
94 glm::ivec2 *mCursorLastPos;
95 double mCursorFactor, mDistance;
96 GameObject* mSelectedObject;
97 glm::ivec2 mPickBufferFrom, mPickBufferSize;
void updateObjectPicking(float timeDiff)
Reads the Pickbuffer (or at least a part of it) from the GPU memory and calculates the nearest object...
Definition: Scene.cpp:793
void updateCursorPosition()
This method updates the position of our own visual mouse cursor according to the speed which is depen...
Definition: Scene.cpp:767
void drawObjectIDs()
Draws the pickable objects into a FBO with objectIds as pixel values.
Definition: Scene.cpp:1219
This Class Contains most of the Game Logic and Draw Calls.
Definition: Scene.hpp:21