Bullet Collision Detection & Physics Library
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btSimulationIslandManagerMt Class Reference

SimulationIslandManagerMt – Multithread capable version of SimulationIslandManager Splits the world up into islands which can be solved in parallel. More...

#include <btSimulationIslandManagerMt.h>

Inheritance diagram for btSimulationIslandManagerMt:
Inheritance graph
[legend]
Collaboration diagram for btSimulationIslandManagerMt:
Collaboration graph
[legend]

Classes

struct  Island
 
struct  SolverParams
 

Public Types

typedef void(* IslandDispatchFunc) (btAlignedObjectArray< Island * > *islands, const SolverParams &solverParams)
 

Public Member Functions

 btSimulationIslandManagerMt ()
 
virtual ~btSimulationIslandManagerMt ()
 
virtual void buildAndProcessIslands (btDispatcher *dispatcher, btCollisionWorld *collisionWorld, btAlignedObjectArray< btTypedConstraint * > &constraints, const SolverParams &solverParams)
 
virtual void buildIslands (btDispatcher *dispatcher, btCollisionWorld *colWorld)
 
int getMinimumSolverBatchSize () const
 
void setMinimumSolverBatchSize (int sz)
 
IslandDispatchFunc getIslandDispatchFunction () const
 
void setIslandDispatchFunction (IslandDispatchFunc func)
 
- Public Member Functions inherited from btSimulationIslandManager
 btSimulationIslandManager ()
 
virtual ~btSimulationIslandManager ()
 
void initUnionFind (int n)
 
btUnionFindgetUnionFind ()
 
virtual void updateActivationState (btCollisionWorld *colWorld, btDispatcher *dispatcher)
 
virtual void storeIslandActivationState (btCollisionWorld *world)
 
void findUnions (btDispatcher *dispatcher, btCollisionWorld *colWorld)
 
void buildAndProcessIslands (btDispatcher *dispatcher, btCollisionWorld *collisionWorld, IslandCallback *callback)
 
void buildIslands (btDispatcher *dispatcher, btCollisionWorld *colWorld)
 
void processIslands (btDispatcher *dispatcher, btCollisionWorld *collisionWorld, IslandCallback *callback)
 
bool getSplitIslands ()
 
void setSplitIslands (bool doSplitIslands)
 

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

IslandgetIsland (int id)
 
virtual IslandallocateIsland (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
 
Islandm_batchIsland
 
int m_minimumSolverBatchSize
 
int m_batchIslandMinBodyCount
 
IslandDispatchFunc m_islandDispatch
 

Detailed Description

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.

Member Typedef Documentation

◆ IslandDispatchFunc

typedef void(* btSimulationIslandManagerMt::IslandDispatchFunc) (btAlignedObjectArray< Island * > *islands, const SolverParams &solverParams)

Definition at line 60 of file btSimulationIslandManagerMt.h.

Constructor & Destructor Documentation

◆ btSimulationIslandManagerMt()

btSimulationIslandManagerMt::btSimulationIslandManagerMt ( )

Definition at line 41 of file btSimulationIslandManagerMt.cpp.

◆ ~btSimulationIslandManagerMt()

btSimulationIslandManagerMt::~btSimulationIslandManagerMt ( )
virtual

Definition at line 49 of file btSimulationIslandManagerMt.cpp.

Member Function Documentation

◆ addBodiesToIslands()

void btSimulationIslandManagerMt::addBodiesToIslands ( btCollisionWorld collisionWorld)
protectedvirtual

Definition at line 362 of file btSimulationIslandManagerMt.cpp.

◆ addConstraintsToIslands()

void btSimulationIslandManagerMt::addConstraintsToIslands ( btAlignedObjectArray< btTypedConstraint * > &  constraints)
protectedvirtual

Definition at line 448 of file btSimulationIslandManagerMt.cpp.

◆ addManifoldsToIslands()

void btSimulationIslandManagerMt::addManifoldsToIslands ( btDispatcher dispatcher)
protectedvirtual

Definition at line 407 of file btSimulationIslandManagerMt.cpp.

◆ allocateIsland()

btSimulationIslandManagerMt::Island * btSimulationIslandManagerMt::allocateIsland ( int  id,
int  numBodies 
)
protectedvirtual

Definition at line 193 of file btSimulationIslandManagerMt.cpp.

◆ buildAndProcessIslands()

void btSimulationIslandManagerMt::buildAndProcessIslands ( btDispatcher dispatcher,
btCollisionWorld collisionWorld,
btAlignedObjectArray< btTypedConstraint * > &  constraints,
const SolverParams solverParams 
)
virtual

Definition at line 625 of file btSimulationIslandManagerMt.cpp.

◆ buildIslands()

void btSimulationIslandManagerMt::buildIslands ( btDispatcher dispatcher,
btCollisionWorld colWorld 
)
virtual

Definition at line 264 of file btSimulationIslandManagerMt.cpp.

◆ getIsland()

btSimulationIslandManagerMt::Island * btSimulationIslandManagerMt::getIsland ( int  id)
protected

Definition at line 172 of file btSimulationIslandManagerMt.cpp.

◆ getIslandDispatchFunction()

IslandDispatchFunc btSimulationIslandManagerMt::getIslandDispatchFunction ( ) const
inline

Definition at line 101 of file btSimulationIslandManagerMt.h.

◆ getMinimumSolverBatchSize()

int btSimulationIslandManagerMt::getMinimumSolverBatchSize ( ) const
inline

Definition at line 93 of file btSimulationIslandManagerMt.h.

◆ initIslandPools()

void btSimulationIslandManagerMt::initIslandPools ( )
protectedvirtual

Definition at line 128 of file btSimulationIslandManagerMt.cpp.

◆ mergeIslands()

void btSimulationIslandManagerMt::mergeIslands ( )
protectedvirtual

Definition at line 467 of file btSimulationIslandManagerMt.cpp.

◆ parallelIslandDispatch()

void btSimulationIslandManagerMt::parallelIslandDispatch ( btAlignedObjectArray< Island * > *  islandsPtr,
const SolverParams solverParams 
)
static

Definition at line 576 of file btSimulationIslandManagerMt.cpp.

◆ serialIslandDispatch()

void btSimulationIslandManagerMt::serialIslandDispatch ( btAlignedObjectArray< Island * > *  islandsPtr,
const SolverParams solverParams 
)
static

Definition at line 543 of file btSimulationIslandManagerMt.cpp.

◆ setIslandDispatchFunction()

void btSimulationIslandManagerMt::setIslandDispatchFunction ( IslandDispatchFunc  func)
inline

Definition at line 106 of file btSimulationIslandManagerMt.h.

◆ setMinimumSolverBatchSize()

void btSimulationIslandManagerMt::setMinimumSolverBatchSize ( int  sz)
inline

Definition at line 97 of file btSimulationIslandManagerMt.h.

◆ solveIsland()

void btSimulationIslandManagerMt::solveIsland ( btConstraintSolver solver,
Island island,
const SolverParams solverParams 
)
static

Definition at line 528 of file btSimulationIslandManagerMt.cpp.

Member Data Documentation

◆ m_activeIslands

btAlignedObjectArray<Island*> btSimulationIslandManagerMt::m_activeIslands
protected

Definition at line 66 of file btSimulationIslandManagerMt.h.

◆ m_allocatedIslands

btAlignedObjectArray<Island*> btSimulationIslandManagerMt::m_allocatedIslands
protected

Definition at line 65 of file btSimulationIslandManagerMt.h.

◆ m_batchIsland

Island* btSimulationIslandManagerMt::m_batchIsland
protected

Definition at line 69 of file btSimulationIslandManagerMt.h.

◆ m_batchIslandMinBodyCount

int btSimulationIslandManagerMt::m_batchIslandMinBodyCount
protected

Definition at line 71 of file btSimulationIslandManagerMt.h.

◆ m_freeIslands

btAlignedObjectArray<Island*> btSimulationIslandManagerMt::m_freeIslands
protected

Definition at line 67 of file btSimulationIslandManagerMt.h.

◆ m_islandDispatch

IslandDispatchFunc btSimulationIslandManagerMt::m_islandDispatch
protected

Definition at line 72 of file btSimulationIslandManagerMt.h.

◆ m_lookupIslandFromId

btAlignedObjectArray<Island*> btSimulationIslandManagerMt::m_lookupIslandFromId
protected

Definition at line 68 of file btSimulationIslandManagerMt.h.

◆ m_minimumSolverBatchSize

int btSimulationIslandManagerMt::m_minimumSolverBatchSize
protected

Definition at line 70 of file btSimulationIslandManagerMt.h.


The documentation for this class was generated from the following files: