Blender V2.61 - r43446
Classes | Public Member Functions | Protected Member Functions

btAlignedObjectArray< T > Class Template Reference

#include <btAlignedObjectArray.h>

List of all members.

Classes

class  less

Public Member Functions

 btAlignedObjectArray ()
 ~btAlignedObjectArray ()
 btAlignedObjectArray (const btAlignedObjectArray &otherArray)
 Generally it is best to avoid using the copy constructor of an btAlignedObjectArray, and use a (const) reference to the array instead.
SIMD_FORCE_INLINE int size () const
 return the number of elements in the array
SIMD_FORCE_INLINE const T & at (int n) const
SIMD_FORCE_INLINE T & at (int n)
SIMD_FORCE_INLINE const T & operator[] (int n) const
SIMD_FORCE_INLINE T & operator[] (int n)
SIMD_FORCE_INLINE void clear ()
 clear the array, deallocated memory. Generally it is better to use array.resize(0), to reduce performance overhead of run-time memory (de)allocations.
SIMD_FORCE_INLINE void pop_back ()
SIMD_FORCE_INLINE void resize (int newsize, const T &fillData=T())
SIMD_FORCE_INLINE T & expandNonInitializing ()
SIMD_FORCE_INLINE T & expand (const T &fillValue=T())
SIMD_FORCE_INLINE void push_back (const T &_Val)
SIMD_FORCE_INLINE int capacity () const
 return the pre-allocated (reserved) elements, this is at least as large as the total number of elements,see size() and reserve()
SIMD_FORCE_INLINE void reserve (int _Count)
template<typename L >
void quickSortInternal (L CompareFunc, int lo, int hi)
template<typename L >
void quickSort (L CompareFunc)
template<typename L >
void downHeap (T *pArr, int k, int n, L CompareFunc)
 heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
void swap (int index0, int index1)
template<typename L >
void heapSort (L CompareFunc)
int findBinarySearch (const T &key) const
 non-recursive binary search, assumes sorted array
int findLinearSearch (const T &key) const
void remove (const T &key)
void initializeFromBuffer (void *buffer, int size, int capacity)
void copyFromArray (const btAlignedObjectArray &otherArray)

Protected Member Functions

SIMD_FORCE_INLINE int allocSize (int size)
SIMD_FORCE_INLINE void copy (int start, int end, T *dest) const
SIMD_FORCE_INLINE void init ()
SIMD_FORCE_INLINE void destroy (int first, int last)
SIMD_FORCE_INLINE void * allocate (int size)
SIMD_FORCE_INLINE void deallocate ()

Detailed Description

template<typename T>
class btAlignedObjectArray< T >

The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data

Definition at line 46 of file btAlignedObjectArray.h.


Constructor & Destructor Documentation

template<typename T>
btAlignedObjectArray< T >::btAlignedObjectArray ( ) [inline]

Definition at line 113 of file btAlignedObjectArray.h.

template<typename T>
btAlignedObjectArray< T >::~btAlignedObjectArray ( ) [inline]

Definition at line 118 of file btAlignedObjectArray.h.

template<typename T>
btAlignedObjectArray< T >::btAlignedObjectArray ( const btAlignedObjectArray< T > &  otherArray) [inline]

Generally it is best to avoid using the copy constructor of an btAlignedObjectArray, and use a (const) reference to the array instead.

Definition at line 124 of file btAlignedObjectArray.h.


Member Function Documentation

template<typename T>
SIMD_FORCE_INLINE void* btAlignedObjectArray< T >::allocate ( int  size) [inline, protected]

Definition at line 89 of file btAlignedObjectArray.h.

Referenced by btAlignedObjectArray< Material * >::reserve().

template<typename T>
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::allocSize ( int  size) [inline, protected]
template<typename T>
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::at ( int  n) const [inline]

Definition at line 141 of file btAlignedObjectArray.h.

Referenced by btDefaultSerializer::initDNA().

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::at ( int  n) [inline]

Definition at line 146 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::capacity ( ) const [inline]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::clear ( ) [inline]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::copy ( int  start,
int  end,
T *  dest 
) const [inline, protected]
template<typename T>
void btAlignedObjectArray< T >::copyFromArray ( const btAlignedObjectArray< T > &  otherArray) [inline]

Definition at line 462 of file btAlignedObjectArray.h.

Referenced by btDefaultSoftBodySolver::optimize().

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::deallocate ( ) [inline, protected]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::destroy ( int  first,
int  last 
) [inline, protected]
template<typename T>
template<typename L >
void btAlignedObjectArray< T >::downHeap ( T *  pArr,
int  k,
int  n,
CompareFunc 
) [inline]
template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expand ( const T &  fillValue = T()) [inline]

Definition at line 221 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::expandNonInitializing ( ) [inline]
template<typename T>
int btAlignedObjectArray< T >::findBinarySearch ( const T &  key) const [inline]

non-recursive binary search, assumes sorted array

Definition at line 406 of file btAlignedObjectArray.h.

template<typename T>
int btAlignedObjectArray< T >::findLinearSearch ( const T &  key) const [inline]
template<typename T>
template<typename L >
void btAlignedObjectArray< T >::heapSort ( CompareFunc) [inline]

Definition at line 383 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::init ( ) [inline, protected]
template<typename T>
void btAlignedObjectArray< T >::initializeFromBuffer ( void *  buffer,
int  size,
int  capacity 
) [inline]

Definition at line 453 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE const T& btAlignedObjectArray< T >::operator[] ( int  n) const [inline]

Definition at line 151 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE T& btAlignedObjectArray< T >::operator[] ( int  n) [inline]

Definition at line 156 of file btAlignedObjectArray.h.

template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::pop_back ( ) [inline]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::push_back ( const T &  _Val) [inline]

Definition at line 237 of file btAlignedObjectArray.h.

Referenced by btDiscreteDynamicsWorld::addAction(), btGImpactCompoundShape::addChildShape(), btCollisionWorld::addCollisionObject(), btDiscreteDynamicsWorld::addConstraint(), btRigidBody::addConstraintRef(), btTriangleMesh::addIndex(), btDiscreteDynamicsWorld::addRigidBody(), btCollisionWorld::AllHitsRayResultCallback::addSingleResult(), btSoftRigidDynamicsWorld::addSoftBody(), btMultiSapBroadphase::addToChildBroadphase(), btRaycastVehicle::addWheel(), btDefaultSerializer::allocate(), btDbvt::allocate(), btSoftBody::appendAnchor(), btSoftBody::appendAngularJoint(), btSoftBody::appendFace(), btSoftBody::appendLinearJoint(), btSoftBody::appendLink(), btSoftBody::appendMaterial(), btSoftBody::appendNode(), btSoftBody::appendNote(), btSoftBody::appendTetra(), ATTRIBUTE_ALIGNED16(), btGImpactQuantizedBvh::boxQuery(), btGImpactBvh::boxQuery(), btSimulationIslandManager::buildAndProcessIslands(), btSimulationIslandManager::buildIslands(), btGImpactMeshShape::buildMeshParts(), btMultiSapBroadphase::buildTree(), btDbvt::clone(), btDbvt::collideKDOP(), btDbvt::collideOCL(), btDbvt::collideTU(), btDbvt::collideTV(), btMultiSapBroadphase::createProxy(), btDbvt::extractLeaves(), fetchleaves(), btTriangleMesh::findOrAddVertex(), btSoftBody::generateBendingConstraints(), btSoftBody::generateClusters(), btGImpactCollisionAlgorithm::getAllContactManifolds(), btConvexConvexAlgorithm::getAllContactManifolds(), btSoftSoftCollisionAlgorithm::getAllContactManifolds(), btConvexPlaneCollisionAlgorithm::getAllContactManifolds(), btBoxBoxCollisionAlgorithm::getAllContactManifolds(), btSphereTriangleCollisionAlgorithm::getAllContactManifolds(), btConvex2dConvex2dAlgorithm::getAllContactManifolds(), btSphereBoxCollisionAlgorithm::getAllContactManifolds(), btBox2dBox2dCollisionAlgorithm::getAllContactManifolds(), btConvexConcaveCollisionAlgorithm::getAllContactManifolds(), btSphereSphereCollisionAlgorithm::getAllContactManifolds(), btCollisionDispatcher::getNewManifold(), btGeometryUtil::getPlaneEquationsFromVertices(), btGeometryUtil::getVerticesFromPlaneEquations(), btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs(), btDefaultSerializer::initDNA(), btHashMap< btHashPtr, btPointerUid >::insert(), btContactArray::merge_contacts(), btDbvtNodeEnumerator::Process(), btTriangleBuffer::processTriangle(), btGImpactQuantizedBvh::rayQuery(), btGImpactBvh::rayQuery(), btSoftBody::refine(), btSoftBody::setSolver(), btDiscreteDynamicsWorld::solveConstraints(), split(), and topdown().

template<typename T>
template<typename L >
void btAlignedObjectArray< T >::quickSort ( CompareFunc) [inline]
template<typename T>
template<typename L >
void btAlignedObjectArray< T >::quickSortInternal ( CompareFunc,
int  lo,
int  hi 
) [inline]
template<typename T>
void btAlignedObjectArray< T >::remove ( const T &  key) [inline]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::reserve ( int  _Count) [inline]
template<typename T>
SIMD_FORCE_INLINE void btAlignedObjectArray< T >::resize ( int  newsize,
const T &  fillData = T() 
) [inline]

resize changes the number of elements in the array. If the new size is larger, the new elements will be constructed using the optional second argument. when the new number of elements is smaller, the destructor will be called, but memory will not be freed, to reduce performance overhead of run-time memory (de)allocations.

Definition at line 180 of file btAlignedObjectArray.h.

Referenced by btUnionFind::allocate(), btSoftBody::applyClusters(), btAlignedObjectArray< Material * >::btAlignedObjectArray(), btMultiSphereShape::btMultiSphereShape(), btSoftBody::btSoftBody(), btQuantizedBvhTree::build_tree(), btBvhTree::build_tree(), btSimulationIslandManager::buildAndProcessIslands(), btShapeHull::buildHull(), btSimulationIslandManager::buildIslands(), btGImpactQuantizedBvh::buildSet(), btGImpactBvh::buildSet(), btSimpleBroadphase::calculateOverlappingPairs(), btMultiSapBroadphase::calculateOverlappingPairs(), btAxisSweep3Internal< BP_FP_INT_TYPE >::calculateOverlappingPairs(), btDbvt::collideTT(), btDbvt::collideTTpersistentStack(), btDbvt::collideTV(), ConvexH::ConvexH(), btAlignedObjectArray< Material * >::copyFromArray(), HullLibrary::CreateConvexHull(), btSoftBodyHelpers::CreateEllipsoid(), btSoftBodyHelpers::CreateFromTetGenData(), btSoftBodyHelpers::CreateFromTriMesh(), btTriangleInfoMap::deSerialize(), btSoftBodyHelpers::Draw(), btSoftBody::generateBendingConstraints(), btSoftBody::generateClusters(), btHashMap< btHashPtr, btPointerUid >::growTables(), btSparseSdf< 3 >::Initialize(), btSoftBody::initializeClusters(), btClosestNotMeConvexResultCallback::needsCollision(), btDbvtBroadphase::performDeferredRemoval(), btSoftBody::predictMotion(), btCompoundCollisionAlgorithm::processCollision(), btDbvt::rayTest(), btDbvt::rayTestInternal(), btKinematicCharacterController::recoverFromPenetration(), btSoftBody::refine(), CcdShapeConstructionInfo::SetMesh(), btSoftBody::setPose(), btSoftBody::setVolumeMass(), btDiscreteDynamicsWorld::solveConstraints(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), split(), btSoftBody::updateConstants(), btRaycastVehicle::updateFriction(), and CcdShapeConstructionInfo::UpdateMesh().

template<typename T>
SIMD_FORCE_INLINE int btAlignedObjectArray< T >::size ( ) const [inline]

return the number of elements in the array

Definition at line 136 of file btAlignedObjectArray.h.

Referenced by add(), btCollisionWorld::addCollisionObject(), btRigidBody::addConstraintRef(), btSoftBody::addForce(), btSoftBody::addVelocity(), btDbvt::allocate(), btSoftBody::appendAnchor(), btSoftBody::appendFace(), btSoftBody::appendLink(), btSoftBody::appendMaterial(), btSoftBody::appendNode(), btSoftBody::appendTetra(), btSoftBody::applyClusters(), CcdPhysicsController::ApplyForce(), btSoftBody::applyForces(), btDiscreteDynamicsWorld::applyGravity(), btGeometryUtil::areVerticesBehindPlane(), ATTRIBUTE_ALIGNED16(), average(), btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(), bottomup(), bounds(), btGImpactQuantizedBvh::boxQuery(), btGImpactBvh::boxQuery(), btAlignedObjectArray< Material * >::btAlignedObjectArray(), btTriangleMesh::btTriangleMesh(), btQuantizedBvhTree::build_tree(), btBvhTree::build_tree(), btSimulationIslandManager::buildAndProcessIslands(), btGImpactQuantizedBvh::buildSet(), btGImpactBvh::buildSet(), btMultiSapBroadphase::buildTree(), btQuantizedBvhTree::calc_quantization(), btGImpactMeshShape::calcLocalAABB(), btSimpleBroadphase::calculateOverlappingPairs(), btMultiSapBroadphase::calculateOverlappingPairs(), btAxisSweep3Internal< BP_FP_INT_TYPE >::calculateOverlappingPairs(), btDiscreteDynamicsWorld::calculateSimulationIslands(), btCompoundCollisionAlgorithm::calculateTimeOfImpact(), btRigidBody::checkCollideWithOverride(), btSoftBody::checkFace(), btSoftBody::checkLink(), btGImpactCompoundShape::childrenHasTransform(), btSoftBody::cleanupClusters(), btAlignedObjectArray< Material * >::clear(), btSimpleDynamicsWorld::clearForces(), btDiscreteDynamicsWorld::clearForces(), btDbvt::clone(), btSoftBody::clusterCom(), btSoftBody::clusterCount(), btDbvtBroadphase::collide(), btDbvt::collideKDOP(), btDbvt::collideOCL(), btDbvt::collideTT(), btDbvt::collideTTpersistentStack(), btDbvt::collideTU(), btDbvt::collideTV(), btSequentialImpulseConstraintSolver::convertContact(), btCollisionWorld::convexSweepTest(), btAlignedObjectArray< Material * >::copyFromArray(), btDefaultSoftBodySolver::copySoftBodyToVertexBuffer(), CcdShapeConstructionInfo::CreateBulletShape(), btSoftBodyHelpers::CreateEllipsoid(), btSoftBodyHelpers::CreateFromTetGenData(), btSoftBodyHelpers::CreateFromTriMesh(), btSoftBody::cutLink(), btSoftBody::dampClusters(), btSoftRigidDynamicsWorld::debugDrawWorld(), btDiscreteDynamicsWorld::debugDrawWorld(), btCollisionWorld::debugDrawWorld(), btSoftBodyHelpers::Draw(), btSoftBodyHelpers::DrawInfos(), btSparseSdf< 3 >::Evaluate(), btSoftBody::evaluateCom(), btAlignedObjectArray< Material * >::expand(), btAlignedObjectArray< Material * >::expandNonInitializing(), btAlignedObjectArray< Material * >::findBinarySearch(), findClosestNode(), btHashMap< btHashPtr, btPointerUid >::findIndex(), btAlignedObjectArray< Material * >::findLinearSearch(), btTriangleMesh::findOrAddVertex(), btSortedOverlappingPairCache::findPair(), btHashedOverlappingPairCache::findPair(), btDefaultSerializer::finishSerialization(), btSparseSdf< 3 >::GarbageCollect(), btSoftBody::generateBendingConstraints(), btSoftBody::generateClusters(), btCompoundCollisionAlgorithm::getAllContactManifolds(), btHashMap< btHashPtr, btPointerUid >::getAtIndex(), btGImpactCompoundShape::getChildTransform(), btHashedOverlappingPairCache::GetCount(), btGImpactMeshShape::getMeshPartCount(), btCollisionDispatcher::getNewManifold(), btGImpactCompoundShape::getNumChildShapes(), btCollisionWorld::getNumCollisionObjects(), btRigidBody::getNumConstraintRefs(), btDiscreteDynamicsWorld::getNumConstraints(), btUnionFind::getNumElements(), btCollisionDispatcher::getNumManifolds(), btSortedOverlappingPairCache::getNumOverlappingPairs(), btHashedOverlappingPairCache::getNumOverlappingPairs(), btTriangleMesh::getNumTriangles(), btTriangleBuffer::getNumTriangles(), btRaycastVehicle::getNumWheels(), btGeometryUtil::getPlaneEquationsFromVertices(), btMultiSphereShape::getSphereCount(), btSoftBody::getTotalMass(), btGeometryUtil::getVerticesFromPlaneEquations(), btSoftBody::getVolume(), btGImpactCollisionAlgorithm::gimpact_vs_gimpact(), btGImpactCollisionAlgorithm::gimpact_vs_shape(), btHashMap< btHashPtr, btPointerUid >::growTables(), btSoftBody::indicesToPointers(), btDefaultSerializer::initDNA(), btSoftBody::initializeClusters(), btSoftBody::initializeFaceTree(), btAlignedObjectArray< Material * >::initializeFromBuffer(), btHashMap< btHashPtr, btPointerUid >::insert(), btSimpleDynamicsWorld::integrateTransforms(), btDiscreteDynamicsWorld::integrateTransforms(), btSoftRigidDynamicsWorld::internalSingleStepSimulation(), btGeometryUtil::isPointInsidePlanes(), btMultiSphereShape::localGetSupportingVertexWithoutMargin(), btContactArray::merge_contacts(), btContactArray::merge_contacts_unique(), mul(), btClosestNotMeConvexResultCallback::needsCollision(), notExist(), btShapeHull::numVertices(), btDbvtBroadphase::performDeferredRemoval(), btSoftBody::pointersToIndices(), btGImpactMeshShape::postUpdate(), btSoftBody::predictMotion(), btDefaultSoftBodySolver::predictMotion(), btSimpleDynamicsWorld::predictUnconstraintMotion(), btDiscreteDynamicsWorld::predictUnconstraintMotion(), btSoftBody::prepareClusters(), btSortedOverlappingPairCache::processAllOverlappingPairs(), btHashedOverlappingPairCache::processAllOverlappingPairs(), btGImpactMeshShape::processAllTriangles(), btGImpactMeshShapePart::processAllTriangles(), btSoftRigidCollisionAlgorithm::processCollision(), btCompoundCollisionAlgorithm::processCollision(), btSoftBody::PSolve_Anchors(), btSoftBody::PSolve_Links(), btSoftBody::PSolve_RContacts(), btSoftBody::PSolve_SContacts(), btAlignedObjectArray< Material * >::push_back(), btAlignedObjectArray< Material * >::quickSort(), btSoftBody::randomizeConstraints(), btGImpactQuantizedBvh::rayQuery(), btGImpactBvh::rayQuery(), btSoftBody::rayTest(), btMultiSapBroadphase::rayTest(), btDbvt::rayTest(), btDbvt::rayTestInternal(), btKinematicCharacterController::recoverFromPenetration(), btSoftBody::refine(), btSoftBody::releaseClusters(), ReleaseHull(), btCollisionDispatcher::releaseManifold(), HullLibrary::ReleaseResult(), btHashMap< btHashPtr, btPointerUid >::remove(), btAlignedObjectArray< Material * >::remove(), btRigidBody::removeConstraintRef(), btSortedOverlappingPairCache::removeOverlappingPair(), btHashedOverlappingPairCache::removeOverlappingPair(), btSparseSdf< 3 >::RemoveReferences(), CcdPhysicsController::ReplaceControllerShape(), btAlignedObjectArray< Material * >::reserve(), btSparseSdf< 3 >::Reset(), btRaycastVehicle::resetSuspension(), btAlignedObjectArray< Material * >::resize(), btDiscreteDynamicsWorld::saveKinematicState(), btSoftBody::scale(), btTriangleInfoMap::serialize(), btSoftBody::serialize(), btMultiSphereShape::serialize(), btCollisionWorld::serializeCollisionObjects(), btDiscreteDynamicsWorld::serializeRigidBodies(), btSoftRigidDynamicsWorld::serializeSoftBodies(), btMultiSapBroadphase::setAabb(), btGImpactCompoundShape::setChildTransform(), btSimpleDynamicsWorld::setGravity(), btDiscreteDynamicsWorld::setGravity(), btGImpactMeshShape::setLocalScaling(), btGImpactMeshShape::setMargin(), CcdShapeConstructionInfo::SetMesh(), btSoftBody::setPose(), btSoftBody::setTotalMass(), btSoftBody::setVelocity(), btSoftBody::setVolumeDensity(), btSoftBody::setVolumeMass(), btHashMap< btHashPtr, btPointerUid >::size(), btSoftBody::solveClusters(), btSoftBody::solveConstraints(), btDiscreteDynamicsWorld::solveConstraints(), btDefaultSoftBodySolver::solveConstraints(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations(), btSequentialImpulseConstraintSolver::solveSingleIteration(), btSoftRigidDynamicsWorld::solveSoftBodiesConstraints(), btUnionFind::sortIslands(), split(), SplitTest(), btSoftBody::staticSolve(), btSimulationIslandManager::storeIslandActivationState(), sum(), btSimpleDynamicsWorld::synchronizeMotionStates(), btDiscreteDynamicsWorld::synchronizeMotionStates(), topdown(), btSoftBody::transform(), btSimpleDynamicsWorld::updateAabbs(), btCollisionWorld::updateAabbs(), btDiscreteDynamicsWorld::updateActions(), btSimulationIslandManager::updateActivationState(), btDiscreteDynamicsWorld::updateActivationState(), btSoftBody::updateClusters(), btSoftBody::updateConstants(), CcdShapeConstructionInfo::UpdateMesh(), btSoftBody::updateNormals(), btSoftBody::updatePose(), btDefaultSoftBodySolver::updateSoftBodies(), btRaycastVehicle::updateVehicle(), btSoftBody::VSolve_Links(), btDbvt::write(), btCollisionWorld::~btCollisionWorld(), btGImpactMeshShape::~btGImpactMeshShape(), btRigidBody::~btRigidBody(), and btSoftBody::~btSoftBody().

template<typename T>
void btAlignedObjectArray< T >::swap ( int  index0,
int  index1 
) [inline]

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