remove some warnings

This commit is contained in:
erwin coumans
2013-06-03 10:16:50 -07:00
parent a886a978b7
commit 70b4ead641
4 changed files with 4 additions and 5 deletions

View File

@@ -46,8 +46,8 @@ B3_ATTRIBUTE_ALIGNED16(struct) b3Contact4
float getFrictionCoeff() const { return ((float)m_frictionCoeffCmp/(float)0xffff); } float getFrictionCoeff() const { return ((float)m_frictionCoeffCmp/(float)0xffff); }
void setFrictionCoeff( float c ) { b3Assert( c >= 0.f && c <= 1.f ); m_frictionCoeffCmp = (unsigned short)(c*0xffff); } void setFrictionCoeff( float c ) { b3Assert( c >= 0.f && c <= 1.f ); m_frictionCoeffCmp = (unsigned short)(c*0xffff); }
float& getNPoints() { return m_worldNormal[3]; } //float& getNPoints() { return m_worldNormal[3]; }
float getNPoints() const { return m_worldNormal[3]; } int getNPoints() const { return (int) m_worldNormal[3]; }
float getPenetration(int idx) const { return m_worldPos[idx][3]; } float getPenetration(int idx) const { return m_worldPos[idx][3]; }

View File

@@ -117,7 +117,7 @@ void getContactPoint(b3Contact4* contact, int contactIndex, b3ContactPoint& poin
pointOut.m_contactCFM2 = 0.f; pointOut.m_contactCFM2 = 0.f;
pointOut.m_contactMotion1 = 0.f; pointOut.m_contactMotion1 = 0.f;
pointOut.m_contactMotion2 = 0.f; pointOut.m_contactMotion2 = 0.f;
pointOut.m_distance = contact->getPenetration(contactIndex)+0.01;//??0.01 pointOut.m_distance = contact->getPenetration(contactIndex);//??0.01f
b3Vector3 n = contact->m_worldNormal; b3Vector3 n = contact->m_worldNormal;
b3Vector3 normalOnB(-n); b3Vector3 normalOnB(-n);
normalOnB.normalize(); normalOnB.normalize();

View File

@@ -1540,7 +1540,7 @@ void clipHullHullSingle(
contact.m_worldNormal = normalOnSurfaceB; contact.m_worldNormal = normalOnSurfaceB;
} }
//printf("bodyIndexA %d,bodyIndexB %d,normal=%f,%f,%f numPoints %d\n",bodyIndexA,bodyIndexB,normalOnSurfaceB.x,normalOnSurfaceB.y,normalOnSurfaceB.z,numPoints); //printf("bodyIndexA %d,bodyIndexB %d,normal=%f,%f,%f numPoints %d\n",bodyIndexA,bodyIndexB,normalOnSurfaceB.x,normalOnSurfaceB.y,normalOnSurfaceB.z,numPoints);
contact.m_worldNormal.w = numPoints; contact.m_worldNormal.w = (b3Scalar)numPoints;
nContacts++; nContacts++;
} }
} }

View File

@@ -664,7 +664,6 @@ int main( int argc, char** argv)
printf("error: no OpenCL devices\n"); printf("error: no OpenCL devices\n");
exit(0); exit(0);
} }
int result;
int devId = 0; int devId = 0;
g_device = b3OpenCLUtils_getDevice(g_cxMainContext,devId); g_device = b3OpenCLUtils_getDevice(g_cxMainContext,devId);
b3OpenCLUtils_printDeviceInfo(stdout, g_device); b3OpenCLUtils_printDeviceInfo(stdout, g_device);