mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 13:20:07 +00:00
revert accidently renaming of m_depthvalues4
This commit is contained in:
parent
4abe083388
commit
c75bebcafe
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user