Merge remote-tracking branch 'origin/GamePhysics' into GameLogic
This commit is contained in:
commit
8f627f8a71
|
@ -112,6 +112,7 @@
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<ModuleDefinitionFile>
|
<ModuleDefinitionFile>
|
||||||
</ModuleDefinitionFile>
|
</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>$(SolutionDir)Physics/lib/debug/BulletCollision_Debugx64.lib;$(SolutionDir)Physics/lib/debug/BulletDynamics_Debugx64.lib;$(SolutionDir)Physics/lib/debug/LinearMath_Debugx64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
@ -130,6 +131,7 @@
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<ModuleDefinitionFile>
|
<ModuleDefinitionFile>
|
||||||
</ModuleDefinitionFile>
|
</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>$(SolutionDir)Physics/lib/release/BulletCollision.lib;$(SolutionDir)Physics/lib/release/BulletDynamics.lib;$(SolutionDir)Physics/lib/release/LinearMath.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
@ -148,6 +150,7 @@
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<ModuleDefinitionFile>
|
<ModuleDefinitionFile>
|
||||||
</ModuleDefinitionFile>
|
</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>$(SolutionDir)Physics/lib/release/BulletCollisionx64.lib;$(SolutionDir)Physics/lib/release/BulletDynamicsx64.lib;$(SolutionDir)Physics/lib/release/LinearMathx64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -106,36 +106,36 @@ void SimpleRigidBody::SetLinearVelocity(Float3 velocity)
|
||||||
void SimpleRigidBody::SetPosition(::Oyster::Math::Float3 position)
|
void SimpleRigidBody::SetPosition(::Oyster::Math::Float3 position)
|
||||||
{
|
{
|
||||||
btTransform trans;
|
btTransform trans;
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setOrigin(btVector3(position.x, position.y, position.z));
|
trans.setOrigin(btVector3(position.x, position.y, position.z));
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
this->state.centerPos = position;
|
this->state.centerPos = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetRotation(Float4 quaternion)
|
void SimpleRigidBody::SetRotation(Float4 quaternion)
|
||||||
{
|
{
|
||||||
btTransform trans;
|
btTransform trans;
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setRotation(btQuaternion(quaternion.x, quaternion.y, quaternion.z, quaternion.w));
|
trans.setRotation(btQuaternion(quaternion.x, quaternion.y, quaternion.z, quaternion.w));
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
this->state.quaternion = Quaternion(quaternion.xyz, quaternion.w);
|
this->state.quaternion = Quaternion(quaternion.xyz, quaternion.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetRotation(::Oyster::Math::Quaternion quaternion)
|
void SimpleRigidBody::SetRotation(::Oyster::Math::Quaternion quaternion)
|
||||||
{
|
{
|
||||||
btTransform trans;
|
btTransform trans;
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setRotation(btQuaternion(quaternion.imaginary.x, quaternion.imaginary.y, quaternion.imaginary.z, quaternion.real));
|
trans.setRotation(btQuaternion(quaternion.imaginary.x, quaternion.imaginary.y, quaternion.imaginary.z, quaternion.real));
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
this->state.quaternion = quaternion;
|
this->state.quaternion = quaternion;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleRigidBody::SetRotation(Float3 eulerAngles)
|
void SimpleRigidBody::SetRotation(Float3 eulerAngles)
|
||||||
{
|
{
|
||||||
btTransform trans;
|
btTransform trans;
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setRotation(btQuaternion(eulerAngles.x, eulerAngles.y, eulerAngles.z));
|
trans.setRotation(btQuaternion(eulerAngles.x, eulerAngles.y, eulerAngles.z));
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
this->state.quaternion = Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w());
|
this->state.quaternion = Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue