implement first draft of pybullet.renderImage for synthetic camera
remove a few debug printf from tinyrenderer
This commit is contained in:
@@ -612,9 +612,9 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
|
||||
}
|
||||
if (statusType ==CMD_CAMERA_IMAGE_COMPLETED)
|
||||
{
|
||||
static int counter=0;
|
||||
char msg[1024];
|
||||
sprintf(msg,"Camera image %d OK\n",counter++);
|
||||
// static int counter=0;
|
||||
// char msg[1024];
|
||||
// sprintf(msg,"Camera image %d OK\n",counter++);
|
||||
b3CameraImageData imageData;
|
||||
b3GetCameraImageData(m_physicsClientHandle,&imageData);
|
||||
if (m_canvas && m_canvasIndex >=0)
|
||||
@@ -642,11 +642,11 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
|
||||
m_canvas->refreshImageData(m_canvasIndex);
|
||||
}
|
||||
|
||||
b3Printf(msg);
|
||||
// b3Printf(msg);
|
||||
}
|
||||
if (statusType == CMD_CAMERA_IMAGE_FAILED)
|
||||
{
|
||||
b3Printf("Camera image FAILED\n");
|
||||
b3Warning("Camera image FAILED\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -716,8 +716,8 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
|
||||
bool hasStatus = (status != 0);
|
||||
if (hasStatus)
|
||||
{
|
||||
int statusType = b3GetStatusType(status);
|
||||
b3Printf("Status after reset: %d",statusType);
|
||||
//int statusType = b3GetStatusType(status);
|
||||
//b3Printf("Status after reset: %d",statusType);
|
||||
}
|
||||
}
|
||||
} else
|
||||
|
||||
@@ -448,7 +448,7 @@ const SharedMemoryStatus* PhysicsClientSharedMemory::processServerStatus() {
|
||||
|
||||
unsigned char* rgbaPixelsReceived =
|
||||
(unsigned char*)&m_data->m_testBlock1->m_bulletStreamDataServerToClientRefactor[0];
|
||||
printf("pixel = %d\n", rgbaPixelsReceived[0]);
|
||||
// printf("pixel = %d\n", rgbaPixelsReceived[0]);
|
||||
|
||||
for (int i=0;i<serverCmd.m_sendPixelDataArguments.m_numPixelsCopied*numBytesPerPixel;i++)
|
||||
{
|
||||
@@ -461,7 +461,7 @@ const SharedMemoryStatus* PhysicsClientSharedMemory::processServerStatus() {
|
||||
|
||||
case CMD_CAMERA_IMAGE_FAILED:
|
||||
{
|
||||
b3Printf("Camera image FAILED\n");
|
||||
b3Warning("Camera image FAILED\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1003,7 +1003,7 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
|
||||
|
||||
if (clientCmd.m_requestPixelDataArguments.m_startPixelIndex==0)
|
||||
{
|
||||
printf("-------------------------------\nRendering\n");
|
||||
// printf("-------------------------------\nRendering\n");
|
||||
|
||||
if ((clientCmd.m_updateFlags & REQUEST_PIXEL_ARGS_HAS_CAMERA_MATRICES)!=0)
|
||||
{
|
||||
|
||||
@@ -541,7 +541,7 @@ void TinyRendererVisualShapeConverter::render(const float viewMat[16], const flo
|
||||
|
||||
lightDirWorld.normalize();
|
||||
|
||||
printf("num m_swRenderInstances = %d\n", m_data->m_swRenderInstances.size());
|
||||
// printf("num m_swRenderInstances = %d\n", m_data->m_swRenderInstances.size());
|
||||
for (int i=0;i<m_data->m_swRenderInstances.size();i++)
|
||||
{
|
||||
TinyRendererObjectArray** visualArrayPtr = m_data->m_swRenderInstances.getAtIndex(i);
|
||||
|
||||
Reference in New Issue
Block a user