diff --git a/examples/SharedMemory/PhysicsClientExample.cpp b/examples/SharedMemory/PhysicsClientExample.cpp index 718ad5967..8dc2f962d 100644 --- a/examples/SharedMemory/PhysicsClientExample.cpp +++ b/examples/SharedMemory/PhysicsClientExample.cpp @@ -736,7 +736,7 @@ void PhysicsClientExample::stepSimulation(float deltaTime) if (m_canvasDepthIndex >=0) { int depthPixelIndex = (xIndex+yIndex*imageData.m_pixelWidth); - float depthValue = imageData.m_depthValues4[depthPixelIndex]; + float depthValue = imageData.m_depthValues[depthPixelIndex]; //todo: rescale the depthValue to [0..255] if (depthValue>-1e20) { @@ -770,7 +770,7 @@ void PhysicsClientExample::stepSimulation(float deltaTime) if (m_canvasDepthIndex >=0) { int depthPixelIndex = (xIndex+yIndex*imageData.m_pixelWidth); - float depthValue = imageData.m_depthValues4[depthPixelIndex]; + float depthValue = imageData.m_depthValues[depthPixelIndex]; //todo: rescale the depthValue to [0..255] if (depthValue>-1e20) { diff --git a/examples/SharedMemory/PhysicsClientSharedMemory.cpp b/examples/SharedMemory/PhysicsClientSharedMemory.cpp index e7002b04f..16b435f61 100644 --- a/examples/SharedMemory/PhysicsClientSharedMemory.cpp +++ b/examples/SharedMemory/PhysicsClientSharedMemory.cpp @@ -712,7 +712,7 @@ void PhysicsClientSharedMemory::getCachedCameraImage(struct b3CameraImageData* c { cameraData->m_pixelWidth = m_data->m_cachedCameraPixelsWidth; cameraData->m_pixelHeight = m_data->m_cachedCameraPixelsHeight; - cameraData->m_depthValues4 = m_data->m_cachedCameraDepthBuffer.size() ? &m_data->m_cachedCameraDepthBuffer[0] : 0; + cameraData->m_depthValues = m_data->m_cachedCameraDepthBuffer.size() ? &m_data->m_cachedCameraDepthBuffer[0] : 0; cameraData->m_rgbColorData = m_data->m_cachedCameraPixelsRGBA.size() ? &m_data->m_cachedCameraPixelsRGBA[0] : 0; cameraData->m_segmentationMaskValues = m_data->m_cachedSegmentationMaskBuffer.size()?&m_data->m_cachedSegmentationMaskBuffer[0] : 0; } diff --git a/examples/SharedMemory/PhysicsDirect.cpp b/examples/SharedMemory/PhysicsDirect.cpp index d913954c5..05c8c0eed 100644 --- a/examples/SharedMemory/PhysicsDirect.cpp +++ b/examples/SharedMemory/PhysicsDirect.cpp @@ -464,7 +464,7 @@ void PhysicsDirect::getCachedCameraImage(b3CameraImageData* cameraData) { cameraData->m_pixelWidth = m_data->m_cachedCameraPixelsWidth; cameraData->m_pixelHeight = m_data->m_cachedCameraPixelsHeight; - cameraData->m_depthValues4 = m_data->m_cachedCameraDepthBuffer.size() ? &m_data->m_cachedCameraDepthBuffer[0] : 0; + cameraData->m_depthValues = m_data->m_cachedCameraDepthBuffer.size() ? &m_data->m_cachedCameraDepthBuffer[0] : 0; cameraData->m_rgbColorData = m_data->m_cachedCameraPixelsRGBA.size() ? &m_data->m_cachedCameraPixelsRGBA[0] : 0; cameraData->m_segmentationMaskValues = m_data->m_cachedSegmentationMask.size()? &m_data->m_cachedSegmentationMask[0] : 0; } diff --git a/examples/SharedMemory/SharedMemoryPublic.h b/examples/SharedMemory/SharedMemoryPublic.h index 9fee50a66..fb5d41364 100644 --- a/examples/SharedMemory/SharedMemoryPublic.h +++ b/examples/SharedMemory/SharedMemoryPublic.h @@ -122,7 +122,7 @@ struct b3CameraImageData int m_pixelWidth; int m_pixelHeight; const unsigned char* m_rgbColorData;//3*m_pixelWidth*m_pixelHeight bytes - const float* m_depthValues4;//m_pixelWidth*m_pixelHeight floats + const float* m_depthValues;//m_pixelWidth*m_pixelHeight floats const int* m_segmentationMaskValues;//m_pixelWidth*m_pixelHeight ints }; diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index f9d4fa898..915de51f1 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -1231,7 +1231,7 @@ static PyObject* pybullet_renderImage(PyObject* self, PyObject* args) // TODO(hellojas): validate depth values make sense int depIndex = i+j*imageData.m_pixelWidth; { - item = PyFloat_FromDouble(imageData.m_depthValues4[depIndex]); + item = PyFloat_FromDouble(imageData.m_depthValues[depIndex]); PyTuple_SetItem(pylistDep, depIndex, item); } {