diff --git a/Code/GameLogic/Camera.cpp b/Code/GameLogic/Camera.cpp index 6ebaa05e..e9d9ebca 100644 --- a/Code/GameLogic/Camera.cpp +++ b/Code/GameLogic/Camera.cpp @@ -131,7 +131,6 @@ void Camera::Pitch(float angle) Oyster::Math::Float4x4 R; - //D3DXMatrixRotationAxis(&R, &-mRight, radians); Oyster::Math3D::RotationMatrix(radians,-mRight,R); this->mUp = CrossMatrix(this->mUp, R); this->mLook = CrossMatrix(this->mLook, R); @@ -144,7 +143,6 @@ void Camera::Yaw(float angle) Oyster::Math::Float4x4 R; Oyster::Math::Float3 up(0,1,0); - //D3DXMatrixRotationAxis(&R, &-up, radians); Oyster::Math3D::RotationMatrix(radians,-up,R); this->mRight = CrossMatrix(this->mRight, R); @@ -163,41 +161,24 @@ void Camera::UpdateViewMatrix() float y = -m_position.Dot(mUp); float z = -m_position.Dot(mLook); - //this->mView(0, 0) = this->mRight.x; mView.m11 = mRight.x; - //this->mView(1, 0) = this->mRight.y; mView.m21 = mRight.y; - //this->mView(2, 0) = this->mRight.z; mView.m31 = mRight.z; - //this->mView(3, 0) = x; mView.m41 = x; - //this->mView(0, 1) = this->mUp.x; mView.m12 = mUp.x; - //this->mView(1, 1) = this->mUp.y; mView.m22 = mUp.y; - //this->mView(2, 1) = this->mUp.z; mView.m32 = mUp.z; - //this->mView(3, 1) = y; mView.m42 = y; - //this->mView(0, 2) = this->mLook.x; mView.m13 = mLook.x; - //this->mView(1, 2) = this->mLook.y; mView.m23 = mLook.y; - //this->mView(2, 2) = this->mLook.z; mView.m33 = mLook.z; - //this->mView(3, 2) = z; mView.m43 = z; - //this->mView(0, 3) = 0.0f; mView.m14 = 0.0f; - //this->mView(1, 3) = 0.0f; mView.m24 = 0.0f; - - //this->mView(2, 3) = 0.0f; mView.m34 = 0.0f; - //this->mView(3, 3) = 1.0f; mView.m44 = 1.0f; mView.Transpose(); diff --git a/Code/GameLogic/CollisionManager.cpp b/Code/GameLogic/CollisionManager.cpp index 253056cc..f7868b79 100644 --- a/Code/GameLogic/CollisionManager.cpp +++ b/Code/GameLogic/CollisionManager.cpp @@ -8,38 +8,6 @@ namespace GameLogic namespace CollisionManager { - - - - void ColisionEvent(Oyster::Physics::ICustomBody &obj1, Oyster::Physics::ICustomBody &obj2) - { - - - //Object *realObj1 = refManager.GetMap(obj1); - //Object *realObj2 = refManager.GetMap(obj2); - // - //switch(realObj1->GetType()) - //{ - //case Object::OBJECT_TYPE_PLAYER: - - // if (realObj2->GetType() == Object::OBJECT_TYPE_BOX ) - // { - //CollisionManager::PlayerVBox(*((Player*)realObj1),*((DynamicObject*)realObj2)); - // } - - // break; - //case Object::OBJECT_TYPE_BOX: - - // if (realObj2->GetType() == Object::OBJECT_TYPE_PLAYER) - // { - // CollisionManager::PlayerVBox(*((Player*)realObj2),*((DynamicObject*)realObj1)); - // } - - // break; - //} - - } - void PlayerCollision(Oyster::Physics::ICustomBody &rigidBodyPlayer,Oyster::Physics::ICustomBody &obj) { Player *player = ((Player*)GameLogic::RefManager::getInstance()->GetMap(rigidBodyPlayer)); diff --git a/Code/GameLogic/CollisionManager.h b/Code/GameLogic/CollisionManager.h index 878d6f25..a650f595 100644 --- a/Code/GameLogic/CollisionManager.h +++ b/Code/GameLogic/CollisionManager.h @@ -12,11 +12,11 @@ namespace GameLogic namespace CollisionManager { + //these are the main collision functions void PlayerCollision(Oyster::Physics::ICustomBody &rigidBodyPlayer,Oyster::Physics::ICustomBody &obj); void BoxCollision(Oyster::Physics::ICustomBody &rigidBodyBox, Oyster::Physics::ICustomBody &obj); - - + //these are the specific collision case functions void PlayerVBox(Player &player, DynamicObject &box); void BoxVBox(DynamicObject &box1, DynamicObject &box2);