93 return lhs->bodyArray.capacity() >
rhs->bodyArray.capacity();
118 for (
int i = 0; i <
island.bodyArray.size(); ++i)
164 island->manifoldArray.resize(0);
165 island->constraintArray.resize(0);
167 island->isSleeping =
true;
196 int allocSize = numBodies;
227 if (
freeIslands[i]->bodyArray.capacity() >= allocSize)
252 island->bodyArray.reserve(allocSize);
354 colObj0->setDeactivationTime(0.f);
394 island->isSleeping =
false;
425 if (
colObj0->hasContactResponse())
430 if (
colObj1->hasContactResponse())
492 int numConstraints =
island->constraintArray.size();
498 numBodies +=
src->bodyArray.
size();
500 numConstraints +=
src->constraintArray.size();
513 island->bodyArray.reserve(numBodies);
515 island->constraintArray.reserve(numConstraints);
535 island.manifoldArray.size(),
537 island.constraintArray.size(),
549 for (
int i = 0; i <
islands.size(); ++i)
654 if (
colObj0->hasContactResponse())
659 if (
colObj1->hasContactResponse())
static void getElement(int arrayLen, const char *cur, const char *old, char *oldPtr, char *curData)
#define DISABLE_DEACTIVATION
#define WANTS_DEACTIVATION
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const T & btMax(const T &a, const T &b)
#define SIMD_FORCE_INLINE
int btGetConstraintIslandId1(const btTypedConstraint *lhs)
bool btIsBodyInIsland(const btSimulationIslandManagerMt::Island &island, const btCollisionObject *obj)
int getIslandId(const btPersistentManifold *lhs)
int calcBatchCost(int bodies, int manifolds, int constraints)
int getIslandId(const btPersistentManifold *lhs)
void btParallelFor(int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)
function object that routes calls to operator<
bool operator()(const btSimulationIslandManagerMt::Island *lhs, const btSimulationIslandManagerMt::Island *rhs) const
bool operator()(const btSimulationIslandManagerMt::Island *lhs, const btSimulationIslandManagerMt::Island *rhs) const
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void quickSort(const L &CompareFunc)
void push_back(const T &_Val)
int capacity() const
return the pre-allocated (reserved) elements, this is at least as large as the total number of elemen...
btCollisionObject can be used to manage collision detection objects.
void activate(bool forceActivation=false) const
CollisionWorld is interface and container for the collision detection.
virtual btScalar solveGroup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifold, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &info, class btIDebugDraw *debugDrawer, btDispatcher *dispatcher)=0
solve a group of constraints
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
static int s_minimumContactManifoldsForBatching
btAlignedObjectArray< Island * > m_allocatedIslands
virtual void addBodiesToIslands(btCollisionWorld *collisionWorld)
virtual void buildAndProcessIslands(btDispatcher *dispatcher, btCollisionWorld *collisionWorld, btAlignedObjectArray< btTypedConstraint * > &constraints, const SolverParams &solverParams)
virtual void initIslandPools()
Island * getIsland(int id)
int m_batchIslandMinBodyCount
virtual Island * allocateIsland(int id, int numBodies)
btAlignedObjectArray< Island * > m_freeIslands
virtual ~btSimulationIslandManagerMt()
btAlignedObjectArray< Island * > m_lookupIslandFromId
virtual void addManifoldsToIslands(btDispatcher *dispatcher)
int m_minimumSolverBatchSize
virtual void addConstraintsToIslands(btAlignedObjectArray< btTypedConstraint * > &constraints)
IslandDispatchFunc m_islandDispatch
btAlignedObjectArray< Island * > m_activeIslands
static void parallelIslandDispatch(btAlignedObjectArray< Island * > *islandsPtr, const SolverParams &solverParams)
static void solveIsland(btConstraintSolver *solver, Island &island, const SolverParams &solverParams)
static void serialIslandDispatch(btAlignedObjectArray< Island * > *islandsPtr, const SolverParams &solverParams)
btSimulationIslandManagerMt()
virtual void mergeIslands()
virtual void buildIslands(btDispatcher *dispatcher, btCollisionWorld *colWorld)
btUnionFind & getUnionFind()
TypedConstraint is the baseclass for Bullet constraints and vehicles.
int getNumElements() const
btElement & getElement(int index)
void sortIslands()
this is a special operation, destroying the content of btUnionFind.
UpdateIslandDispatcher(btAlignedObjectArray< btSimulationIslandManagerMt::Island * > &islandsPtr, const btSimulationIslandManagerMt::SolverParams &solverParams)
void forLoop(int iBegin, int iEnd) const BT_OVERRIDE
btAlignedObjectArray< btSimulationIslandManagerMt::Island * > & m_islandsPtr
const btSimulationIslandManagerMt::SolverParams & m_solverParams
btAlignedObjectArray< btTypedConstraint * > constraintArray
void append(const Island &other)
btAlignedObjectArray< btCollisionObject * > bodyArray
btAlignedObjectArray< btPersistentManifold * > manifoldArray
btConstraintSolver * m_solverPool