Blender
V3.3
|
#include <btSimulationIslandManagerMt.h>
Classes | |
struct | Island |
struct | SolverParams |
Public Types | |
typedef void(* | IslandDispatchFunc) (btAlignedObjectArray< Island * > *islands, const SolverParams &solverParams) |
Static Public Member Functions | |
static void | solveIsland (btConstraintSolver *solver, Island &island, const SolverParams &solverParams) |
static void | serialIslandDispatch (btAlignedObjectArray< Island * > *islandsPtr, const SolverParams &solverParams) |
static void | parallelIslandDispatch (btAlignedObjectArray< Island * > *islandsPtr, const SolverParams &solverParams) |
Protected Member Functions | |
Island * | getIsland (int id) |
virtual Island * | allocateIsland (int id, int numBodies) |
virtual void | initIslandPools () |
virtual void | addBodiesToIslands (btCollisionWorld *collisionWorld) |
virtual void | addManifoldsToIslands (btDispatcher *dispatcher) |
virtual void | addConstraintsToIslands (btAlignedObjectArray< btTypedConstraint * > &constraints) |
virtual void | mergeIslands () |
Protected Attributes | |
btAlignedObjectArray< Island * > | m_allocatedIslands |
btAlignedObjectArray< Island * > | m_activeIslands |
btAlignedObjectArray< Island * > | m_freeIslands |
btAlignedObjectArray< Island * > | m_lookupIslandFromId |
Island * | m_batchIsland |
int | m_minimumSolverBatchSize |
int | m_batchIslandMinBodyCount |
IslandDispatchFunc | m_islandDispatch |
SimulationIslandManagerMt – Multithread capable version of SimulationIslandManager Splits the world up into islands which can be solved in parallel. In order to solve islands in parallel, an IslandDispatch function must be provided which will dispatch calls to multiple threads. The amount of parallelism that can be achieved depends on the number of islands. If only a single island exists, then no parallelism is possible.
Definition at line 35 of file btSimulationIslandManagerMt.h.
typedef void(* btSimulationIslandManagerMt::IslandDispatchFunc) (btAlignedObjectArray< Island * > *islands, const SolverParams &solverParams) |
Definition at line 60 of file btSimulationIslandManagerMt.h.
btSimulationIslandManagerMt::btSimulationIslandManagerMt | ( | ) |
Definition at line 41 of file btSimulationIslandManagerMt.cpp.
References calcBatchCost(), m_batchIsland, m_batchIslandMinBodyCount, m_islandDispatch, m_minimumSolverBatchSize, NULL, and parallelIslandDispatch().
|
virtual |
Definition at line 49 of file btSimulationIslandManagerMt.cpp.
References m_activeIslands, m_allocatedIslands, m_freeIslands, btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().
|
protectedvirtual |
Definition at line 362 of file btSimulationIslandManagerMt.cpp.
References allocateIsland(), btSimulationIslandManagerMt::Island::bodyArray, btCollisionObject, btCollisionWorld::getCollisionObjectArray(), btUnionFind::getElement(), btUnionFind::getNumElements(), btSimulationIslandManager::getUnionFind(), btSimulationIslandManagerMt::Island::isSleeping, btElement::m_id, btElement::m_sz, numBodies, and btAlignedObjectArray< T >::push_back().
Referenced by buildAndProcessIslands().
|
protectedvirtual |
Definition at line 448 of file btSimulationIslandManagerMt.cpp.
References btGetConstraintIslandId1(), btTypedConstraint(), constraints, and getIsland().
Referenced by buildAndProcessIslands().
|
protectedvirtual |
Definition at line 407 of file btSimulationIslandManagerMt.cpp.
References btCollisionObject, btPersistentManifold(), getIsland(), getIslandId(), btDispatcher::getManifoldByIndexInternal(), btDispatcher::getNumManifolds(), ISLAND_SLEEPING, and btDispatcher::needsResponse().
Referenced by buildAndProcessIslands().
|
protectedvirtual |
Definition at line 193 of file btSimulationIslandManagerMt.cpp.
References btSimulationIslandManagerMt::Island::bodyArray, btAlignedObjectArray< T >::capacity(), btSimulationIslandManagerMt::Island::id, id, m_activeIslands, m_allocatedIslands, m_batchIsland, m_batchIslandMinBodyCount, m_freeIslands, m_lookupIslandFromId, NULL, numBodies, btAlignedObjectArray< T >::pop_back(), btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::reserve(), and btAlignedObjectArray< T >::size().
Referenced by addBodiesToIslands().
|
virtual |
Definition at line 625 of file btSimulationIslandManagerMt.cpp.
References addBodiesToIslands(), addConstraintsToIslands(), addManifoldsToIslands(), BT_PROFILE, btCollisionObject, btPersistentManifold(), btTypedConstraint(), buildIslands(), constraints, btCollisionWorld::getCollisionObjectArray(), btDispatcher::getInternalManifoldPointer(), btDispatcher::getNumManifolds(), btSimulationIslandManager::getSplitIslands(), initIslandPools(), ISLAND_SLEEPING, m_activeIslands, btSimulationIslandManagerMt::SolverParams::m_debugDrawer, btSimulationIslandManagerMt::SolverParams::m_dispatcher, m_islandDispatch, m_minimumSolverBatchSize, btSimulationIslandManagerMt::SolverParams::m_solverInfo, btSimulationIslandManagerMt::SolverParams::m_solverMt, btSimulationIslandManagerMt::SolverParams::m_solverPool, mergeIslands(), NULL, btAlignedObjectArray< T >::size(), and btConstraintSolver::solveGroup().
|
virtual |
Definition at line 264 of file btSimulationIslandManagerMt.cpp.
References ACTIVE_TAG, BT_PROFILE, btAssert, btCollisionObject, DISABLE_DEACTIVATION, btCollisionWorld::getCollisionObjectArray(), btUnionFind::getElement(), btUnionFind::getNumElements(), btSimulationIslandManager::getUnionFind(), ISLAND_SLEEPING, btElement::m_id, btElement::m_sz, btUnionFind::sortIslands(), and WANTS_DEACTIVATION.
Referenced by buildAndProcessIslands().
|
protected |
Definition at line 172 of file btSimulationIslandManagerMt.cpp.
References btAssert, id, m_activeIslands, m_lookupIslandFromId, NULL, and btAlignedObjectArray< T >::size().
Referenced by addConstraintsToIslands(), and addManifoldsToIslands().
|
inline |
Definition at line 101 of file btSimulationIslandManagerMt.h.
References m_islandDispatch.
|
inline |
Definition at line 93 of file btSimulationIslandManagerMt.h.
References m_minimumSolverBatchSize.
|
protectedvirtual |
Definition at line 128 of file btSimulationIslandManagerMt.cpp.
References btSimulationIslandManagerMt::Island::bodyArray, btAlignedObjectArray< T >::capacity(), btSimulationIslandManagerMt::Island::constraintArray, btUnionFind::getNumElements(), btSimulationIslandManager::getUnionFind(), btSimulationIslandManagerMt::Island::id, btSimulationIslandManagerMt::Island::isSleeping, m_activeIslands, m_allocatedIslands, m_batchIsland, m_freeIslands, m_lookupIslandFromId, btSimulationIslandManagerMt::Island::manifoldArray, NULL, btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::quickSort(), btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().
Referenced by buildAndProcessIslands().
|
protectedvirtual |
Definition at line 467 of file btSimulationIslandManagerMt.cpp.
References btSimulationIslandManagerMt::Island::append(), btSimulationIslandManagerMt::Island::bodyArray, calcBatchCost(), btSimulationIslandManagerMt::Island::constraintArray, m_activeIslands, m_minimumSolverBatchSize, btSimulationIslandManagerMt::Island::manifoldArray, numBodies, numConstraints, numManifolds, btAlignedObjectArray< T >::quickSort(), btAlignedObjectArray< T >::reserve(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::size(), and src.
Referenced by buildAndProcessIslands().
|
static |
Definition at line 576 of file btSimulationIslandManagerMt.cpp.
References BT_PROFILE, btParallelFor(), btSimulationIslandManagerMt::SolverParams::m_solverMt, btSimulationIslandManagerMt::Island::manifoldArray, s_minimumContactManifoldsForBatching, btAlignedObjectArray< T >::size(), size(), and solveIsland().
Referenced by btSimulationIslandManagerMt().
|
static |
Definition at line 543 of file btSimulationIslandManagerMt.cpp.
References BT_PROFILE, btSimulationIslandManagerMt::SolverParams::m_solverMt, btSimulationIslandManagerMt::SolverParams::m_solverPool, btAlignedObjectArray< T >::size(), and solveIsland().
|
inline |
Definition at line 106 of file btSimulationIslandManagerMt.h.
References m_islandDispatch.
|
inline |
Definition at line 97 of file btSimulationIslandManagerMt.h.
References m_minimumSolverBatchSize.
Referenced by btDiscreteDynamicsWorldMt().
|
static |
Definition at line 528 of file btSimulationIslandManagerMt.cpp.
References btSimulationIslandManagerMt::Island::bodyArray, btPersistentManifold(), btTypedConstraint(), btSimulationIslandManagerMt::Island::constraintArray, btSimulationIslandManagerMt::SolverParams::m_debugDrawer, btSimulationIslandManagerMt::SolverParams::m_dispatcher, btSimulationIslandManagerMt::SolverParams::m_solverInfo, btSimulationIslandManagerMt::Island::manifoldArray, NULL, btAlignedObjectArray< T >::size(), and btConstraintSolver::solveGroup().
Referenced by UpdateIslandDispatcher::forLoop(), parallelIslandDispatch(), and serialIslandDispatch().
|
protected |
Definition at line 66 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), buildAndProcessIslands(), getIsland(), initIslandPools(), mergeIslands(), and ~btSimulationIslandManagerMt().
|
protected |
Definition at line 65 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), initIslandPools(), and ~btSimulationIslandManagerMt().
|
protected |
Definition at line 69 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), btSimulationIslandManagerMt(), and initIslandPools().
|
protected |
Definition at line 71 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), and btSimulationIslandManagerMt().
|
protected |
Definition at line 67 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), initIslandPools(), and ~btSimulationIslandManagerMt().
|
protected |
Definition at line 72 of file btSimulationIslandManagerMt.h.
Referenced by btSimulationIslandManagerMt(), buildAndProcessIslands(), getIslandDispatchFunction(), and setIslandDispatchFunction().
|
protected |
Definition at line 68 of file btSimulationIslandManagerMt.h.
Referenced by allocateIsland(), getIsland(), and initIslandPools().
|
protected |
Definition at line 70 of file btSimulationIslandManagerMt.h.
Referenced by btSimulationIslandManagerMt(), buildAndProcessIslands(), getMinimumSolverBatchSize(), mergeIslands(), and setMinimumSolverBatchSize().