|
Blender V4.5
|
#include "btBatchedConstraints.h"#include "LinearMath/btIDebugDraw.h"#include "LinearMath/btMinMax.h"#include "LinearMath/btStackAlloc.h"#include "LinearMath/btQuickprof.h"#include <string.h>#include <cmath>Go to the source code of this file.
Classes | |
| struct | btBatchedConstraintInfo |
| struct | btBatchInfo |
| struct | ReadSolverConstraintsLoop |
| struct | ExpandConstraintRowsLoop |
| struct | UpdateConstraintBatchIdsForMergesLoop |
| struct | WriteOutConstraintIndicesLoop |
| class | PreallocatedMemoryHelper< N > |
| struct | btIntVec3 |
| struct | AssignConstraintsToGridBatchesParams |
| struct | AssignConstraintsToGridBatchesLoop |
Functions | |
| static void | debugDrawSingleBatch (const btBatchedConstraints *bc, btConstraintArray *constraints, const btAlignedObjectArray< btSolverBody > &bodies, int iBatch, const btVector3 &color, const btVector3 &offset) |
| static void | debugDrawPhase (const btBatchedConstraints *bc, btConstraintArray *constraints, const btAlignedObjectArray< btSolverBody > &bodies, int iPhase, const btVector3 &color0, const btVector3 &color1, const btVector3 &offset) |
| static void | debugDrawAllBatches (const btBatchedConstraints *bc, btConstraintArray *constraints, const btAlignedObjectArray< btSolverBody > &bodies) |
| static void | initBatchedBodyDynamicFlags (btAlignedObjectArray< bool > *outBodyDynamicFlags, const btAlignedObjectArray< btSolverBody > &bodies) |
| static int | runLengthEncodeConstraintInfo (btBatchedConstraintInfo *outConInfos, int numConstraints) |
| static int | initBatchedConstraintInfo (btBatchedConstraintInfo *outConInfos, btConstraintArray *constraints) |
| static void | expandConstraintRowsInPlace (int *constraintBatchIds, const btBatchedConstraintInfo *conInfos, int numConstraints, int numConstraintRows) |
| static void | expandConstraintRows (int *destConstraintBatchIds, const int *srcConstraintBatchIds, const btBatchedConstraintInfo *conInfos, int numConstraints, int numConstraintRows) |
| static void | expandConstraintRowsMt (int *destConstraintBatchIds, const int *srcConstraintBatchIds, const btBatchedConstraintInfo *conInfos, int numConstraints, int numConstraintRows) |
| static void | initBatchedConstraintInfoArray (btAlignedObjectArray< btBatchedConstraintInfo > *outConInfos, btConstraintArray *constraints) |
| static void | mergeSmallBatches (btBatchInfo *batches, int iBeginBatch, int iEndBatch, int minBatchSize, int maxBatchSize) |
| static void | updateConstraintBatchIdsForMerges (int *constraintBatchIds, int numConstraints, const btBatchInfo *batches, int numBatches) |
| static void | updateConstraintBatchIdsForMergesMt (int *constraintBatchIds, int numConstraints, const btBatchInfo *batches, int numBatches) |
| bool | BatchCompare (const btBatchedConstraints::Range &a, const btBatchedConstraints::Range &b) |
| static void | writeOutConstraintIndicesForRangeOfBatches (btBatchedConstraints *bc, const int *constraintBatchIds, int numConstraints, int *constraintIdPerBatch, int batchBegin, int batchEnd) |
| static void | writeOutConstraintIndicesMt (btBatchedConstraints *bc, const int *constraintBatchIds, int numConstraints, int *constraintIdPerBatch, int maxNumBatchesPerPhase, int numPhases) |
| static void | writeGrainSizes (btBatchedConstraints *bc) |
| static void | writeOutBatches (btBatchedConstraints *bc, const int *constraintBatchIds, int numConstraints, const btBatchInfo *batches, int *batchWork, int maxNumBatchesPerPhase, int numPhases) |
| static btVector3 | findMaxDynamicConstraintExtent (btVector3 *bodyPositions, bool *bodyDynamicFlags, btBatchedConstraintInfo *conInfos, int numConstraints, int numBodies) |
| static void | assignConstraintsToGridBatches (const AssignConstraintsToGridBatchesParams ¶ms, int iConBegin, int iConEnd) |
| static void | setupSpatialGridBatchesMt (btBatchedConstraints *batchedConstraints, btAlignedObjectArray< char > *scratchMemory, btConstraintArray *constraints, const btAlignedObjectArray< btSolverBody > &bodies, int minBatchSize, int maxBatchSize, bool use2DGrid) |
| static void | setupSingleBatch (btBatchedConstraints *bc, int numConstraints) |
Variables | |
| const int | kNoMerge = -1 |
|
static |
Definition at line 705 of file btBatchedConstraints.cpp.
References assignConstraintsToGridBatches(), AssignConstraintsToGridBatchesParams::bodyDynamicFlags, AssignConstraintsToGridBatchesParams::bodyGridCoords, btBatchedConstraintInfo::bodyIds, BT_PROFILE, btAssert, btClamp(), btMax(), btMin(), AssignConstraintsToGridBatchesParams::conInfos, AssignConstraintsToGridBatchesParams::constraintBatchIds, AssignConstraintsToGridBatchesParams::gridChunkDim, i, btIntVec3::m_ints, AssignConstraintsToGridBatchesParams::maxNumBatchesPerPhase, AssignConstraintsToGridBatchesParams::numPhases, and AssignConstraintsToGridBatchesParams::phaseMask.
Referenced by assignConstraintsToGridBatches(), AssignConstraintsToGridBatchesLoop::forLoop(), and setupSpatialGridBatchesMt().
|
inline |
Definition at line 432 of file btBatchedConstraints.cpp.
References b, BatchCompare(), btBatchedConstraints::Range::begin, and btBatchedConstraints::Range::end.
Referenced by BatchCompare(), and writeOutBatches().
|
static |
Definition at line 145 of file btBatchedConstraints.cpp.
References b, BT_LARGE_FLOAT, BT_PROFILE, btVector3, constraints, debugDrawAllBatches(), debugDrawPhase(), btBatchedConstraints::m_debugDrawer, btBatchedConstraints::m_phases, and btAlignedObjectArray< T >::size().
Referenced by debugDrawAllBatches(), and btBatchedConstraints::setup().
|
static |
Definition at line 124 of file btBatchedConstraints.cpp.
References btBatchedConstraints::Range::begin, BT_PROFILE, btMax(), btVector3, constraints, debugDrawPhase(), debugDrawSingleBatch(), btBatchedConstraints::Range::end, lerp, btBatchedConstraints::m_debugDrawer, and btBatchedConstraints::m_phases.
Referenced by debugDrawAllBatches(), and debugDrawPhase().
|
static |
Definition at line 101 of file btBatchedConstraints.cpp.
References b, btSolverConstraint, btVector3, constraints, debugDrawSingleBatch(), btIDebugDraw::drawLine(), btBatchedConstraints::m_batches, btBatchedConstraints::m_constraintIndices, and btBatchedConstraints::m_debugDrawer.
Referenced by debugDrawPhase(), and debugDrawSingleBatch().
|
static |
Definition at line 286 of file btBatchedConstraints.cpp.
References BT_PROFILE, btAssert, btBatchedConstraintInfo::constraintIndex, expandConstraintRows(), i, btBatchedConstraintInfo::numConstraintRows, and numConstraints.
Referenced by expandConstraintRows(), and ExpandConstraintRowsLoop::forLoop().
|
static |
Definition at line 265 of file btBatchedConstraints.cpp.
References BT_PROFILE, btAssert, btBatchedConstraintInfo::constraintIndex, expandConstraintRowsInPlace(), i, btBatchedConstraintInfo::numConstraintRows, and numConstraints.
Referenced by expandConstraintRowsInPlace().
|
static |
Definition at line 323 of file btBatchedConstraints.cpp.
References BT_PROFILE, btParallelFor(), expandConstraintRowsMt(), and numConstraints.
Referenced by expandConstraintRowsMt(), and setupSpatialGridBatchesMt().
|
static |
Definition at line 653 of file btBatchedConstraints.cpp.
References btBatchedConstraintInfo::bodyIds, BT_PROFILE, btAssert, btVector3, findMaxDynamicConstraintExtent(), numBodies, and numConstraints.
Referenced by findMaxDynamicConstraintExtent(), and setupSpatialGridBatchesMt().
|
static |
Definition at line 175 of file btBatchedConstraints.cpp.
References BT_PROFILE, btSolverBody, i, initBatchedBodyDynamicFlags(), btAlignedObjectArray< T >::resizeNoInitialize(), btAlignedObjectArray< T >::size(), and x.
Referenced by initBatchedBodyDynamicFlags().
|
static |
Definition at line 234 of file btBatchedConstraints.cpp.
References btBatchedConstraintInfo::bodyIds, BT_PROFILE, btParallelFor(), btSolverConstraint, btBatchedConstraintInfo::constraintIndex, constraints, i, initBatchedConstraintInfo(), btBatchedConstraintInfo::numConstraintRows, numConstraints, and runLengthEncodeConstraintInfo().
Referenced by initBatchedConstraintInfo(), initBatchedConstraintInfoArray(), and setupSpatialGridBatchesMt().
|
static |
Definition at line 331 of file btBatchedConstraints.cpp.
References btAlignedObjectArray< T >::at(), BT_PROFILE, constraints, initBatchedConstraintInfo(), initBatchedConstraintInfoArray(), numConstraints, and btAlignedObjectArray< T >::resizeNoInitialize().
Referenced by initBatchedConstraintInfoArray().
|
static |
Definition at line 342 of file btBatchedConstraints.cpp.
References BT_PROFILE, kNoMerge, btBatchInfo::mergeIndex, mergeSmallBatches(), and btBatchInfo::numConstraints.
Referenced by mergeSmallBatches(), and setupSpatialGridBatchesMt().
|
static |
Definition at line 187 of file btBatchedConstraints.cpp.
References btBatchedConstraintInfo::bodyIds, BT_PROFILE, btBatchedConstraintInfo::constraintIndex, btBatchedConstraintInfo::numConstraintRows, numConstraints, and runLengthEncodeConstraintInfo().
Referenced by initBatchedConstraintInfo(), and runLengthEncodeConstraintInfo().
|
static |
Definition at line 1036 of file btBatchedConstraints.cpp.
References BT_PROFILE, i, btBatchedConstraints::m_batches, btBatchedConstraints::m_constraintIndices, btBatchedConstraints::m_phaseGrainSize, btBatchedConstraints::m_phaseOrder, btBatchedConstraints::m_phases, numConstraints, btAlignedObjectArray< T >::push_back(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::resizeNoInitialize(), and setupSingleBatch().
Referenced by btBatchedConstraints::setup(), and setupSingleBatch().
|
static |
Definition at line 816 of file btBatchedConstraints.cpp.
References PreallocatedMemoryHelper< N >::addChunk(), assignConstraintsToGridBatches(), btAlignedObjectArray< T >::at(), AssignConstraintsToGridBatchesParams::bodyDynamicFlags, AssignConstraintsToGridBatchesParams::bodyGridCoords, BT_LARGE_FLOAT, BT_PROFILE, btAssert, btBatchInfo::btBatchInfo(), btMax(), btParallelFor(), btSolverBody, btVector3, btAlignedObjectArray< T >::capacity(), AssignConstraintsToGridBatchesParams::conInfos, AssignConstraintsToGridBatchesParams::constraintBatchIds, constraints, expandConstraintRowsMt(), findMaxDynamicConstraintExtent(), PreallocatedMemoryHelper< N >::getSizeToAllocate(), AssignConstraintsToGridBatchesParams::gridChunkDim, i, initBatchedConstraintInfo(), btIntVec3::m_ints, AssignConstraintsToGridBatchesParams::maxNumBatchesPerPhase, mergeSmallBatches(), AssignConstraintsToGridBatchesParams::numBodies, btBatchedConstraintInfo::numConstraintRows, btBatchInfo::numConstraints, numConstraints, AssignConstraintsToGridBatchesParams::numPhases, AssignConstraintsToGridBatchesParams::phaseMask, btAlignedObjectArray< T >::reserve(), btAlignedObjectArray< T >::resizeNoInitialize(), PreallocatedMemoryHelper< N >::setChunkPointers(), setupSpatialGridBatchesMt(), btAlignedObjectArray< T >::size(), updateConstraintBatchIdsForMergesMt(), v, btBatchedConstraints::validate(), writeOutBatches(), and x.
Referenced by btBatchedConstraints::setup(), and setupSpatialGridBatchesMt().
|
static |
Definition at line 388 of file btBatchedConstraints.cpp.
References BT_PROFILE, btAssert, i, kNoMerge, btBatchInfo::mergeIndex, numConstraints, and updateConstraintBatchIdsForMerges().
Referenced by UpdateConstraintBatchIdsForMergesLoop::forLoop(), and updateConstraintBatchIdsForMerges().
|
static |
Definition at line 424 of file btBatchedConstraints.cpp.
References BT_PROFILE, btParallelFor(), numConstraints, and updateConstraintBatchIdsForMergesMt().
Referenced by setupSpatialGridBatchesMt(), and updateConstraintBatchIdsForMergesMt().
|
static |
Definition at line 515 of file btBatchedConstraints.cpp.
References btGetTaskScheduler(), btMax(), btITaskScheduler::getNumThreads(), btBatchedConstraints::m_phaseGrainSize, btBatchedConstraints::m_phases, btAlignedObjectArray< T >::resizeNoInitialize(), and writeGrainSizes().
Referenced by writeGrainSizes(), and writeOutBatches().
|
static |
Definition at line 530 of file btBatchedConstraints.cpp.
References BatchCompare(), BT_PROFILE, btAssert, i, btBatchedConstraints::m_batches, btBatchedConstraints::m_constraintIndices, btBatchedConstraints::m_phaseOrder, btBatchedConstraints::m_phases, btBatchInfo::numConstraints, numConstraints, btAlignedObjectArray< T >::reserve(), btAlignedObjectArray< T >::resize(), btAlignedObjectArray< T >::resizeNoInitialize(), writeGrainSizes(), writeOutBatches(), and writeOutConstraintIndicesMt().
Referenced by setupSpatialGridBatchesMt(), and writeOutBatches().
|
static |
Definition at line 439 of file btBatchedConstraints.cpp.
References BT_PROFILE, btBatchedConstraints::m_constraintIndices, numConstraints, and writeOutConstraintIndicesForRangeOfBatches().
Referenced by WriteOutConstraintIndicesLoop::forLoop(), and writeOutConstraintIndicesForRangeOfBatches().
|
static |
Definition at line 489 of file btBatchedConstraints.cpp.
References BT_PROFILE, btParallelFor(), btBatchedConstraints::m_constraintIndices, numConstraints, and writeOutConstraintIndicesMt().
Referenced by writeOutBatches(), and writeOutConstraintIndicesMt().
| const int kNoMerge = -1 |
Definition at line 27 of file btBatchedConstraints.cpp.
Referenced by btBatchInfo::btBatchInfo(), mergeSmallBatches(), and updateConstraintBatchIdsForMerges().