Put nodes in a broadphase to reduce tree updates

This commit is contained in:
Irlan
2019-06-15 11:33:24 -03:00
parent a3a9495d88
commit 11724ef5e3
4 changed files with 16 additions and 8 deletions

View File

@ -22,7 +22,7 @@
#include <bounce/common/math/transform.h>
#include <bounce/common/memory/stack_allocator.h>
#include <bounce/collision/trees/dynamic_tree.h>
#include <bounce/collision/broad_phase.h>
class b3World;
@ -189,8 +189,11 @@ private:
// Soft body triangles
b3SoftBodyTriangle* m_triangles;
// Node tree
b3DynamicTree m_nodeTree;
// Broadphase
b3BroadPhase m_broadPhase;
// Time-step
float32 m_dt;
// Attached world
b3World* m_world;

View File

@ -163,8 +163,8 @@ private:
// Node and body contact
b3NodeBodyContact m_bodyContact;
// Tree identifier
u32 m_treeId;
// Broadphase proxy
u32 m_broadPhaseId;
// Soft body
b3SoftBody* m_body;