mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
|
||||
#include <btBulletDynamicsCommon.h>
|
||||
#include <BulletDynamics/Character/btKinematicCharacterController.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <BulletCollision/CollisionDispatch/btGhostObject.h>
|
||||
|
||||
GTEST_TEST(BulletDynamics, KinematicCharacterController)
|
||||
{
|
||||
btPairCachingGhostObject* ghostObject = new btPairCachingGhostObject();
|
||||
btBoxShape* convexShape = new btBoxShape(btVector3(1, 1, 1));
|
||||
|
||||
//For now only a simple test that it initializes correctly.
|
||||
btKinematicCharacterController* tested = new btKinematicCharacterController(ghostObject, convexShape, 1);
|
||||
EXPECT_TRUE(tested);
|
||||
|
||||
EXPECT_FLOAT_EQ(-9.8 * 3.0, tested->getGravity().x());
|
||||
EXPECT_FLOAT_EQ(0, tested->getGravity().y());
|
||||
EXPECT_FLOAT_EQ(0, tested->getGravity().z());
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue