+ need to reset rigid body using 'setCenterOfMassTransform' to reset world inertia tensor
+ fixes in compound algorithm -> recompute contact points + add debug drawing to some demos. + revert btJacobianEntry change + replace dCROSSMAT by btVector3::getSkewSymmetricMatrix
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
|
||||
#include "ForkLiftDemo.h"
|
||||
#include "GlutStuff.h"
|
||||
|
||||
#include "GLDebugDrawer.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
GLDebugDrawer gDebugDrawer;
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
@@ -9,6 +11,7 @@ int main(int argc,char** argv)
|
||||
ForkLiftDemo* pForkLiftDemo = new ForkLiftDemo;
|
||||
|
||||
pForkLiftDemo->initPhysics();
|
||||
pForkLiftDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||
|
||||
return glutmain(argc, argv,640,480,"Bullet ForkLift Demo. http://www.continuousphysics.com/Bullet/phpBB2/", pForkLiftDemo);
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ btVector3 DemoApplication::getRayTo(int x,int y)
|
||||
return rayTo;
|
||||
}
|
||||
|
||||
btScalar mousePickClamping = 3.f;
|
||||
btScalar mousePickClamping = 30.f;
|
||||
|
||||
|
||||
void DemoApplication::mouseFunc(int button, int state, int x, int y)
|
||||
@@ -1249,7 +1249,7 @@ void DemoApplication::clientResetScene()
|
||||
{
|
||||
btDefaultMotionState* myMotionState = (btDefaultMotionState*)body->getMotionState();
|
||||
myMotionState->m_graphicsWorldTrans = myMotionState->m_startWorldTrans;
|
||||
colObj->setWorldTransform( myMotionState->m_graphicsWorldTrans );
|
||||
body->setCenterOfMassTransform( myMotionState->m_graphicsWorldTrans );
|
||||
colObj->setInterpolationWorldTransform( myMotionState->m_startWorldTrans );
|
||||
colObj->activate();
|
||||
//colObj->setActivationState(WANTS_DEACTIVATION);
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library
|
||||
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#include "RagdollDemo.h"
|
||||
#include "GlutStuff.h"
|
||||
|
||||
@@ -5,13 +5,18 @@ April 04, 2008
|
||||
#include "SliderConstraintDemo.h"
|
||||
#include "GlutStuff.h"
|
||||
|
||||
#include "GLDebugDrawer.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
|
||||
GLDebugDrawer gDebugDrawer;
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
|
||||
SliderConstraintDemo* sliderConstraintDemo = new SliderConstraintDemo();
|
||||
|
||||
sliderConstraintDemo->initPhysics();
|
||||
|
||||
sliderConstraintDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||
|
||||
|
||||
return glutmain(argc, argv,640,480,"Slider Constraint Demo. http://www.continuousphysics.com/Bullet/phpBB2/", sliderConstraintDemo);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
#include "VehicleDemo.h"
|
||||
#include "GlutStuff.h"
|
||||
|
||||
#include "GLDebugDrawer.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
GLDebugDrawer gDebugDrawer;
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
@@ -9,6 +11,7 @@ int main(int argc,char** argv)
|
||||
VehicleDemo* vehicleDemo = new VehicleDemo;
|
||||
|
||||
vehicleDemo->initPhysics();
|
||||
vehicleDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||
|
||||
return glutmain(argc, argv,640,480,"Bullet Vehicle Demo. http://www.continuousphysics.com/Bullet/phpBB2/", vehicleDemo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user