- removed STL from the Bullet library: replace std::vector by btAlignedObjectArray. Also removed the std::set for overlapping pair set, and turned it into an overlapping pair array. The SAP only adds objects, never removed. Removal is postponed for during traversal of overlapping pairs (duplicates and non-overlapping pairs are removed during that traversal).
- added heap sort and binary search/linear search to btAlignedObjectArray - fixed wrong cast, thanks Hamstray, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1015
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "BulletCollision/CollisionShapes/btBoxShape.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <string.h>
|
||||
|
||||
BoxBoxDetector::BoxBoxDetector(btBoxShape* box1,btBoxShape* box2)
|
||||
: m_box1(box1),
|
||||
|
||||
@@ -296,7 +296,7 @@ class btConcaveTriangleCallback : public btTriangleCallback
|
||||
public:
|
||||
btCollisionObject* m_body;
|
||||
mat4f m_transform;
|
||||
std::vector<CONCAVE_TRIANGLE_TOKEN> m_triangles;
|
||||
btAlignedObjectArray<CONCAVE_TRIANGLE_TOKEN> m_triangles;
|
||||
|
||||
btConcaveTriangleCallback(btCollisionObject* body)
|
||||
{
|
||||
|
||||
@@ -26,13 +26,13 @@ class btDispatcher;
|
||||
#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
|
||||
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
|
||||
|
||||
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
|
||||
/// btConcaveConcaveCollisionAlgorithm supports collision between btBvhTriangleMeshShape shapes
|
||||
class btConcaveConcaveCollisionAlgorithm : public btCollisionAlgorithm
|
||||
{
|
||||
protected:
|
||||
std::vector<btPersistentManifold*> m_mainfoldsPtr;
|
||||
btAlignedObjectArray<btPersistentManifold*> m_mainfoldsPtr;
|
||||
public:
|
||||
|
||||
btConcaveConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
|
||||
|
||||
@@ -18,7 +18,8 @@ subject to the following restrictions:
|
||||
|
||||
#include "BulletCollision/CollisionShapes/btConcaveShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
|
||||
#include <vector>
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
|
||||
|
||||
//#define GIMPACT_SHAPE_PROXYTYPE (MAX_BROADPHASE_COLLISION_TYPES + 1)
|
||||
|
||||
@@ -29,7 +30,7 @@ Each mesh part must have a GIMPACT trimesh data (GIM_TRIMESH_DATA).
|
||||
typedef unsigned long BT_GIMPACT_TRIMESH_DATA_HANDLE;
|
||||
|
||||
|
||||
class BT_GIMPACT_TRIMESH_DATA_HANDLE_ARRAY: public std::vector<BT_GIMPACT_TRIMESH_DATA_HANDLE>
|
||||
class BT_GIMPACT_TRIMESH_DATA_HANDLE_ARRAY: public btAlignedObjectArray<BT_GIMPACT_TRIMESH_DATA_HANDLE>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -57,7 +58,7 @@ Each mesh part must have a GIMPACT trimesh (GIM_TRIMESH).
|
||||
typedef void * BT_GIMPACT_TRIMESH_HANDLE;
|
||||
|
||||
|
||||
class BT_GIMPACT_TRIMESH_HANDLE_ARRAY: public std::vector<BT_GIMPACT_TRIMESH_HANDLE>
|
||||
class BT_GIMPACT_TRIMESH_HANDLE_ARRAY: public btAlignedObjectArray<BT_GIMPACT_TRIMESH_HANDLE>
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ subject to the following restrictions:
|
||||
#include "OdeJoint.h"
|
||||
#include "OdeContactJoint.h"
|
||||
#include "OdeSolverBody.h"
|
||||
#include <new.h>
|
||||
|
||||
#include "LinearMath/btIDebugDraw.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user