35 #include "tgGLDebugDrawer.h"
37 #include "BulletSoftBody/btSoftRigidDynamicsWorld.h"
54 btSoftRigidDynamicsWorld& dynamicsWorld =
57 btIDebugDraw*
const pDrawer = dynamicsWorld.getDebugDrawer();
61 if (pDrawer && pMuscle)
64 const btVector3 lineFrom =
65 pMuscle->anchor1->getWorldPosition();
66 const btVector3 lineTo =
67 pMuscle->anchor2->getWorldPosition();
68 const double stretch =
69 linString.getCurrentLength() - pMuscle->getRestLength();
70 const btVector3 color =
72 btVector3(0.0, 0.0, 1.0) :
73 btVector3(0.5 + stretch / 3.0,
76 pDrawer->drawLine(lineFrom, lineTo, color);
const Muscle2P * getMuscle() const
virtual void render(const tgLinearString &linString) const
Contains the definition of class tgWorldBulletPhysicsImpl.
static btSoftRigidDynamicsWorld & worldToDynamicsWorld(tgWorld &world)
tgBulletRenderer(tgWorld &world)
Definitions of classes Muscle2P and MuscleAnchor.
Contains the definition of class tgLinearString.
Contains the definition of class tgWorld $Id$.
Contains the definition of class tgBulletUtil.
Contains the definition of concrete class tgBulletRenderer.