MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / stepSimulation

Method stepSimulation

examples/MultiBody/Pendulum.cpp:162–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void Pendulum::stepSimulation(float deltaTime)
163{
164 m_multiBody->addJointTorque(0, 20.0);
165#ifdef USE_GTEST
166 m_dynamicsWorld->stepSimulation(1. / 1000.0, 0);
167#else
168 m_dynamicsWorld->stepSimulation(deltaTime);
169#endif
170 btVector3 from = m_multiBody->getBaseWorldTransform().getOrigin();
171 btVector3 to = m_multiBody->getLink(0).m_collider->getWorldTransform().getOrigin();
172 btVector4 color(1, 0, 0, 1);
173 if (m_guiHelper->getRenderInterface())
174 {
175 m_guiHelper->getRenderInterface()->drawLine(from, to, color, btScalar(1));
176 }
177}
178
179#ifdef USE_GTEST
180

Callers 15

initMethod · 0.45
threecubes.pyFile · 0.45
threecubes_org.pyFile · 0.45
mainFunction · 0.45
test_rolling_frictionMethod · 0.45
testJacobianMethod · 0.45
setupWorldMethod · 0.45
testSaveRestoreStateMethod · 0.45
demo_runFunction · 0.45
demo_runFunction · 0.45
sceneAabb.pyFile · 0.45
jacobian.pyFile · 0.45

Calls 4

addJointTorqueMethod · 0.80
getLinkMethod · 0.80
getRenderInterfaceMethod · 0.45
drawLineMethod · 0.45

Tested by 7

test_rolling_frictionMethod · 0.36
testJacobianMethod · 0.36
setupWorldMethod · 0.36
testSaveRestoreStateMethod · 0.36
testFunction · 0.36
stepMethod · 0.36
testFunction · 0.36