fix doubleprecision build
This commit is contained in:
@@ -200,8 +200,13 @@ public:
|
||||
btScalar m[16];
|
||||
T.getOpenGLMatrix (&m[0]);
|
||||
glPushMatrix ();
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
glMultMatrixd (&m[0]);
|
||||
glScaled (2.0 * boxShapeHalfExtents[0], 2.0 * boxShapeHalfExtents[1], 2.0 * boxShapeHalfExtents[2]);
|
||||
#else
|
||||
glMultMatrixf (&m[0]);
|
||||
glScalef (2.0 * boxShapeHalfExtents[0], 2.0 * boxShapeHalfExtents[1], 2.0 * boxShapeHalfExtents[2]);
|
||||
#endif //BT_USE_DOUBLE_PRECISION
|
||||
glutSolidCube (1.0);
|
||||
glPopMatrix ();
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void SpuRaycastTaskProcess::issueTask2()
|
||||
}
|
||||
}
|
||||
|
||||
void SpuRaycastTaskProcess::addWorkToTask(SpuRaycastTaskWorkUnit workunit)
|
||||
void SpuRaycastTaskProcess::addWorkToTask(SpuRaycastTaskWorkUnit& workunit)
|
||||
{
|
||||
m_spuRaycastTaskDesc[m_currentTask].workUnits[m_currentWorkUnitInTask] = workunit;
|
||||
m_currentWorkUnitInTask++;
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
void initialize2(void* spuCollisionObjectsWrappers, int numSpuCollisionObjectWrappers);
|
||||
|
||||
/// batch up additional work to a current task for SPU processing. When batch is full, it issues the task.
|
||||
void addWorkToTask(struct SpuRaycastTaskWorkUnit);
|
||||
void addWorkToTask(struct SpuRaycastTaskWorkUnit&);
|
||||
|
||||
/// call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished
|
||||
void flush2();
|
||||
|
||||
@@ -100,7 +100,8 @@ btShapeHull::buildHull (btScalar margin)
|
||||
}
|
||||
|
||||
btVector3 supportPoints[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
|
||||
for (int i = 0; i < numSampleDirections; i++)
|
||||
int i;
|
||||
for (i = 0; i < numSampleDirections; i++)
|
||||
{
|
||||
supportPoints[i] = m_shape->localGetSupportingVertex(btUnitSpherePoints[i]);
|
||||
}
|
||||
@@ -108,9 +109,23 @@ btShapeHull::buildHull (btScalar margin)
|
||||
HullDesc hd;
|
||||
hd.mFlags = QF_TRIANGLES;
|
||||
hd.mVcount = numSampleDirections;
|
||||
hd.mVertices = &supportPoints[0][0];
|
||||
hd.mVertexStride = sizeof (btVector3);
|
||||
|
||||
#ifdef BT_USE_DOUBLE_PRECISION
|
||||
float* tmpVerts = new float[numSampleDirections*3];
|
||||
|
||||
for (i=0;i<numSampleDirections;i++)
|
||||
{
|
||||
tmpVerts[i*3] = supportPoints[i].getX();
|
||||
tmpVerts[i*3+1] = supportPoints[i].getY();
|
||||
tmpVerts[i*3+2] = supportPoints[i].getZ();
|
||||
}
|
||||
|
||||
hd.mVertices = tmpVerts;
|
||||
hd.mVertexStride = 3*sizeof(float);//sizeof (btVector3);
|
||||
#else
|
||||
hd.mVertices = &supportPoints[0];
|
||||
hd.mVertexStride = sizeof (btVector3);
|
||||
#endif
|
||||
|
||||
HullLibrary hl;
|
||||
HullResult hr;
|
||||
|
||||
Reference in New Issue
Block a user