Skip to content

Commit

Permalink
reverting to 3.13 because of auto sleep bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioJerez committed Jun 17, 2015
1 parent 046de07 commit 20e7991
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coreLibrary_300/source/newton/Newton.h
Expand Up @@ -24,7 +24,7 @@


#define NEWTON_MAJOR_VERSION 3
#define NEWTON_MINOR_VERSION 14
#define NEWTON_MINOR_VERSION 13


#ifdef _NEWTON_STATIC_LIB
Expand Down
10 changes: 9 additions & 1 deletion coreLibrary_300/source/physics/dgBroadPhase.cpp
Expand Up @@ -207,13 +207,21 @@ void dgBroadPhase::ForceAndToqueKernel(void* const context, void* const node, dg
broadPhase->ApplyForceAndtorque(descriptor, (dgBodyMasterList::dgListNode*) node, threadID);
}

bool dgBroadPhase::DoNeedUpdate(dgBodyMasterList::dgListNode* const node) const
{
dgBody* const body = node->GetInfo().GetBody();

bool state = body->GetInvMass().m_w != dgFloat32 (0.0f);
state = state || !body->m_equilibrium || (body->GetExtForceAndTorqueCallback() != NULL);
return state;
}

void dgBroadPhase::ApplyForceAndtorque(dgBroadphaseSyncDescriptor* const descriptor, dgBodyMasterList::dgListNode* node, dgInt32 threadID)
{
dgFloat32 timestep = descriptor->m_timestep;

const dgInt32 threadCount = descriptor->m_world->GetThreadCount();
while (node && (node->GetInfo().GetBody()->GetExtForceAndTorqueCallback() != NULL)) {
while (node && DoNeedUpdate(node)) {
dgBody* const body = node->GetInfo().GetBody();

if (body->IsRTTIType(dgBody::m_dynamicBodyRTTI)) {
Expand Down
1 change: 1 addition & 0 deletions coreLibrary_300/source/physics/dgBroadPhase.h
Expand Up @@ -273,6 +273,7 @@ class dgBroadPhase
void CollisionChange (dgBody* const body, dgCollisionInstance* const collisionSrc);

protected:
bool DoNeedUpdate(dgBodyMasterList::dgListNode* const node) const;
dgFloat64 CalculateEntropy (dgFitnessList& fitness, dgBroadPhaseNode** const root);
dgBroadPhaseNode* InsertNode (dgBroadPhaseNode* const root, dgBroadPhaseNode* const node);

Expand Down

0 comments on commit 20e7991

Please sign in to comment.