Changeset 1400 for GTP/trunk/App/Games/Jungle_Rumble/src
- Timestamp:
- 09/17/06 23:11:53 (18 years ago)
- Location:
- GTP/trunk/App/Games/Jungle_Rumble/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Games/Jungle_Rumble/src/Camera.cpp
r1378 r1400 4 4 #include "GameManager.h" 5 5 6 Camera::Camera(void) : Node() { 6 //Camera::Camera(void) : Node() { 7 Camera::Camera(const float ratio) : Node() { 7 8 angle = D3DX_PI/4; 8 9 nearClipping = 0.1f; 9 10 farClipping = 1000.0f; 10 ratio = 4.0f/3.0f; 11 //ratio = 4.0f/3.0f; 12 this->ratio = ratio; 11 13 updateClippingPlanes(); 12 14 this->setPosition(0, 50, -15); -
GTP/trunk/App/Games/Jungle_Rumble/src/Camera.h
r1378 r1400 8 8 public: 9 9 friend class RenderPass; 10 Camera( void);10 Camera(const float ratio); 11 11 ~Camera(void); 12 12 -
GTP/trunk/App/Games/Jungle_Rumble/src/Scene.cpp
r1396 r1400 266 266 return this->depth; 267 267 } 268 269 float Scene::viewPortRatio() 270 { 271 //return float(this->width) / this->height; 272 return float(this->manager->screenWidth)/this->manager->screenHeight; 273 } 274 268 275 269 276 Camera* Scene::getActiveCamera() … … 461 468 void Scene::doFrustumCulling() 462 469 { 463 Camera cam ;470 Camera cam(this->viewPortRatio()); 464 471 cam.setViewMatrix(*this->activeRenderPass->getViewMatrix()); 465 472 cam.setProjectionMatrix(*this->activeRenderPass->getProjectionMatrix()); … … 750 757 case NODE_CAMERA: 751 758 { 752 SPTR<Node> node(new Camera); 759 //SPTR<Node> node(new Camera); 760 SPTR<Node> node(new Camera(this->viewPortRatio())); // MG 753 761 if(!isReference) { 754 762 father.addChild(node); -
GTP/trunk/App/Games/Jungle_Rumble/src/Scene.h
r1378 r1400 72 72 float getHeight(); 73 73 float getDepth(); 74 float viewPortRatio(); // MG 74 75 virtual void clearScene(); 75 76
Note: See TracChangeset
for help on using the changeset viewer.