diff --git a/examples/OpenGLWindow/GLInstancingRenderer.cpp b/examples/OpenGLWindow/GLInstancingRenderer.cpp index 26d765536..1a66c32df 100644 --- a/examples/OpenGLWindow/GLInstancingRenderer.cpp +++ b/examples/OpenGLWindow/GLInstancingRenderer.cpp @@ -1618,7 +1618,7 @@ void GLInstancingRenderer::renderScene() { renderSceneInternal(B3_CREATE_SHADOWMAP_RENDERMODE); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); + if (m_planeReflectionShapeIndex>=0) { diff --git a/examples/OpenGLWindow/Win32OpenGLWindow.cpp b/examples/OpenGLWindow/Win32OpenGLWindow.cpp index 28eab35cb..aa71750ad 100644 --- a/examples/OpenGLWindow/Win32OpenGLWindow.cpp +++ b/examples/OpenGLWindow/Win32OpenGLWindow.cpp @@ -119,9 +119,9 @@ void Win32OpenGLWindow::closeWindow() void Win32OpenGLWindow::startRendering() { pumpMessage(); - //don't clear all 3 buffers because some AMD drivers are buggy - //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); + //glCullFace(GL_BACK); 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/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 4e0785021..1fae95a6d 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -937,6 +937,12 @@ static PyObject* pybullet_changeDynamicsInfo(PyObject* self, PyObject* args, PyO return NULL; } + if ((contactStiffness>=0 && contactDamping <0)||(contactStiffness<0 && contactDamping >=0)) + { + PyErr_SetString(SpamError, "Both contactStiffness and contactDamping needs to be set together."); + return NULL; + } + { b3SharedMemoryCommandHandle command = b3InitChangeDynamicsInfo(sm); b3SharedMemoryStatusHandle statusHandle; 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