diff --git a/examples/SharedMemory/PhysicsClientSharedMemory.cpp b/examples/SharedMemory/PhysicsClientSharedMemory.cpp index a9bf810e6..c78eff91c 100644 --- a/examples/SharedMemory/PhysicsClientSharedMemory.cpp +++ b/examples/SharedMemory/PhysicsClientSharedMemory.cpp @@ -1,10 +1,10 @@ #include "PhysicsClientSharedMemory.h" #include "PosixSharedMemory.h" #include "Win32SharedMemory.h" -#include "LinearMath/btAlignedObjectArray.h" -#include "LinearMath/btVector3.h" +#include "Bullet3Common/b3AlignedObjectArray.h" +#include "Bullet3Common/b3Vector3.h" #include - +#include "Bullet3Common/b3HashMap.h" #include "Bullet3Common/b3Logging.h" #include "../Utils/b3ResourcePath.h" #include "../../Extras/Serialize/BulletFileLoader/btBulletFile.h" @@ -19,7 +19,7 @@ struct BodyJointInfoCache { std::string m_baseName; - btAlignedObjectArray m_jointInfo; + b3AlignedObjectArray m_jointInfo; std::string m_bodyName; }; @@ -28,32 +28,32 @@ struct PhysicsClientSharedMemoryInternalData { bool m_ownsSharedMemory; SharedMemoryBlock* m_testBlock1; - btHashMap m_bodyJointMap; - btHashMap m_userConstraintInfoMap; + b3HashMap m_bodyJointMap; + b3HashMap m_userConstraintInfoMap; - btAlignedObjectArray m_debugLinesFrom; - btAlignedObjectArray m_debugLinesTo; - btAlignedObjectArray m_debugLinesColor; + b3AlignedObjectArray m_debugLinesFrom; + b3AlignedObjectArray m_debugLinesTo; + b3AlignedObjectArray m_debugLinesColor; int m_cachedCameraPixelsWidth; int m_cachedCameraPixelsHeight; - btAlignedObjectArray m_cachedCameraPixelsRGBA; - btAlignedObjectArray m_cachedCameraDepthBuffer; - btAlignedObjectArray m_cachedSegmentationMaskBuffer; + b3AlignedObjectArray m_cachedCameraPixelsRGBA; + b3AlignedObjectArray m_cachedCameraDepthBuffer; + b3AlignedObjectArray m_cachedSegmentationMaskBuffer; - btAlignedObjectArray m_cachedContactPoints; - btAlignedObjectArray m_cachedOverlappingObjects; - btAlignedObjectArray m_cachedVisualShapes; - btAlignedObjectArray m_cachedCollisionShapes; + b3AlignedObjectArray m_cachedContactPoints; + b3AlignedObjectArray m_cachedOverlappingObjects; + b3AlignedObjectArray m_cachedVisualShapes; + b3AlignedObjectArray m_cachedCollisionShapes; - btAlignedObjectArray m_cachedVREvents; - btAlignedObjectArray m_cachedKeyboardEvents; - btAlignedObjectArray m_cachedMouseEvents; - btAlignedObjectArray m_cachedMassMatrix; - btAlignedObjectArray m_raycastHits; + b3AlignedObjectArray m_cachedVREvents; + b3AlignedObjectArray m_cachedKeyboardEvents; + b3AlignedObjectArray m_cachedMouseEvents; + b3AlignedObjectArray m_cachedMassMatrix; + b3AlignedObjectArray m_raycastHits; - btAlignedObjectArray m_bodyIdsRequestInfo; - btAlignedObjectArray m_constraintIdsRequestInfo; + b3AlignedObjectArray m_bodyIdsRequestInfo; + b3AlignedObjectArray m_constraintIdsRequestInfo; SharedMemoryStatus m_tempBackupServerStatus; diff --git a/examples/SharedMemory/Win32SharedMemory.cpp b/examples/SharedMemory/Win32SharedMemory.cpp index 7a2c688ea..4c7e04d6c 100644 --- a/examples/SharedMemory/Win32SharedMemory.cpp +++ b/examples/SharedMemory/Win32SharedMemory.cpp @@ -2,7 +2,7 @@ #include "Win32SharedMemory.h" #include "Bullet3Common/b3Logging.h" #include "Bullet3Common/b3Scalar.h" -#include "LinearMath/btAlignedObjectArray.h" +#include "Bullet3Common/b3AlignedObjectArray.h" #include #include @@ -29,7 +29,7 @@ struct Win32SharedMemorySegment struct Win32SharedMemoryInteralData { - btAlignedObjectArray m_segments; + b3AlignedObjectArray m_segments; Win32SharedMemoryInteralData() { diff --git a/src/Bullet3Common/b3AlignedObjectArray.h b/src/Bullet3Common/b3AlignedObjectArray.h index 947362d08..ef7101656 100644 --- a/src/Bullet3Common/b3AlignedObjectArray.h +++ b/src/Bullet3Common/b3AlignedObjectArray.h @@ -528,6 +528,14 @@ protected: otherArray.copy(0, otherSize, m_data); } + void removeAtIndex(int index) + { + if (index