test with physics dll

This commit is contained in:
Linda Andersson 2013-11-25 11:49:40 +01:00
parent 97b599c99f
commit 0e2401ef69
5 changed files with 34 additions and 21 deletions

View File

@ -142,6 +142,14 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\GamePhysics\GamePhysics.vcxproj">
<Project>{104fa3e9-94d9-4e1d-a941-28a03bc8a095}</Project>
<Private>false</Private>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>false</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<ProjectReference Include="..\Misc\Misc.vcxproj"> <ProjectReference Include="..\Misc\Misc.vcxproj">
<Project>{2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee}</Project> <Project>{2ec4dded-8f75-4c86-a10b-e1e8eb29f3ee}</Project>
</ProjectReference> </ProjectReference>

View File

@ -38,3 +38,7 @@ void IGame::Render()
{ {
gameModule->Render(); gameModule->Render();
} }
Game* IGame::getGameModule()
{
return gameModule;
}

View File

@ -25,6 +25,7 @@ namespace GameLogic
void StartGame(); void StartGame();
void Update(); void Update();
void Render(); void Render();
Game* getGameModule();
private: private:
}; };
} }

View File

@ -46,30 +46,30 @@ Player::Player(void)
{ {
life = 10; life = 10;
UniquePointer<ICustomBody> rigidBody = API::Instance().CreateSimpleRigidBody(); //UniquePointer<ICustomBody> rigidBody = API::Instance().CreateSimpleRigidBody();
ref = API::Instance().AddObject(rigidBody); //ref = API::Instance().AddObject(rigidBody);
//ref = API::Instance().AddObject(API::Instance().CreateSimpleRigidBody()); ////ref = API::Instance().AddObject(API::Instance().CreateSimpleRigidBody());
const ICustomBody* rB; //const ICustomBody* rB;
//rB = &API::Instance().Peek(ref); ////rB = &API::Instance().Peek(ref);
//if( rB == &Error::nobody) ////if( rB == &Error::nobody)
//{ ////{
// //error //// //error
//} ////}
API::Instance().SetCenter(ref, Oyster::Math::Float3::null); //API::Instance().SetCenter(ref, Oyster::Math::Float3::null);
API::Instance().SetMass_KeepMomentum(ref, 20); //API::Instance().SetMass_KeepMomentum(ref, 20);
// get Tensor matrix (tröghetsmonent) //// get Tensor matrix (tröghetsmonent)
//API::Instance().SetMomentOfInertiaTensor_KeepMomentum(ref, tensorMatrix ) ////API::Instance().SetMomentOfInertiaTensor_KeepMomentum(ref, tensorMatrix )
//
////Oyster::Math::Float3 ve = rB->GetCenter();
//API::Instance().SetDeltaTime(0.01f);
//Oyster::Math::Float3 ve = rB->GetCenter(); ////API::Instance().ApplyForceAt(ref, rB->GetCenter(), Oyster::Math::Float3::null);
API::Instance().SetDeltaTime(0.01f); //
////API::Instance().SetAction(ColisionEvent);
//API::Instance().ApplyForceAt(ref, rB->GetCenter(), Oyster::Math::Float3::null); ////API::Instance().Update();
//API::Instance().SetAction(ColisionEvent);
//API::Instance().Update();

View File

@ -10,7 +10,7 @@
#include "Core/Core.h" #include "Core/Core.h"
#include "Render\Preparations\Preparations.h" #include "Render\Preparations\Preparations.h"
#include "IGame.h" #include "IGame.h"
#include "InputController.h" //#include "InputController.h"