fix BasicGpuDemo compilation

This commit is contained in:
erwin coumans
2013-09-17 14:46:11 -07:00
parent e2accf82a0
commit fcd5541b04
3 changed files with 11 additions and 9 deletions

View File

@@ -42,7 +42,9 @@ subject to the following restrictions:
#include "Bullet3OpenCL/ParallelPrimitives/b3LauncherCL.h" #include "Bullet3OpenCL/ParallelPrimitives/b3LauncherCL.h"
#include "Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h" #include "Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.h"
#include "Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h" #include "Bullet3OpenCL/RigidBody/b3GpuNarrowPhase.h"
#include "Bullet3OpenCL/RigidBody/b3Config.h" #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h"
#include "Bullet3Collision/BroadPhaseCollision/b3DynamicBvhBroadphase.h" #include "Bullet3Collision/BroadPhaseCollision/b3DynamicBvhBroadphase.h"

View File

@@ -329,7 +329,7 @@ int b3GpuDynamicsWorld::findOrRegisterCollisionShape(const btCollisionShape* col
if (type == PHY_FLOAT) if (type == PHY_FLOAT)
{ {
float* graphicsbase = (float*)(vertexbase+graphicsindex*stride); float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
triangleVerts[j] = b3Vector3( triangleVerts[j] = b3MakeVector3(
graphicsbase[0]*trimeshScaling.getX(), graphicsbase[0]*trimeshScaling.getX(),
graphicsbase[1]*trimeshScaling.getY(), graphicsbase[1]*trimeshScaling.getY(),
graphicsbase[2]*trimeshScaling.getZ()); graphicsbase[2]*trimeshScaling.getZ());
@@ -337,7 +337,7 @@ int b3GpuDynamicsWorld::findOrRegisterCollisionShape(const btCollisionShape* col
else else
{ {
double* graphicsbase = (double*)(vertexbase+graphicsindex*stride); double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
triangleVerts[j] = b3Vector3( btScalar(graphicsbase[0]*trimeshScaling.getX()), triangleVerts[j] = b3MakeVector3( btScalar(graphicsbase[0]*trimeshScaling.getX()),
btScalar(graphicsbase[1]*trimeshScaling.getY()), btScalar(graphicsbase[1]*trimeshScaling.getY()),
btScalar(graphicsbase[2]*trimeshScaling.getZ())); btScalar(graphicsbase[2]*trimeshScaling.getZ()));
} }

View File

@@ -25,10 +25,10 @@ subject to the following restrictions:
#define REL_ERROR2 b3Scalar(1.0e-6) #define REL_ERROR2 b3Scalar(1.0e-6)
//temp globals, to improve GJK/EPA/penetration calculations //temp globals, to improve GJK/EPA/penetration calculations
int gNumDeepPenetrationChecks = 0; int gNumDeepPenetrationChecks2 = 0;
int gNumGjkChecks = 0; int gNumGjkChecks2 = 0;
int gGjkSeparatingAxis=0; int gGjkSeparatingAxis2=0;
int gEpaSeparatingAxis=0; int gEpaSeparatingAxis2=0;
@@ -174,7 +174,7 @@ bool getClosestPoints(b3GjkPairDetector* gjkDetector, const b3Transform& transA,
b3Scalar marginA = 0.f;//m_marginA; b3Scalar marginA = 0.f;//m_marginA;
b3Scalar marginB = 0.f;//m_marginB; b3Scalar marginB = 0.f;//m_marginB;
gNumGjkChecks++; gNumGjkChecks2++;
//for CCD we don't use margins //for CCD we don't use margins
@@ -463,7 +463,7 @@ bool getClosestPoints(b3GjkPairDetector* gjkDetector, const b3Transform& transA,
// Penetration depth case. // Penetration depth case.
b3Vector3 tmpPointOnA,tmpPointOnB; b3Vector3 tmpPointOnA,tmpPointOnB;
gNumDeepPenetrationChecks++; gNumDeepPenetrationChecks2++;
gjkDetector->m_cachedSeparatingAxis.setZero(); gjkDetector->m_cachedSeparatingAxis.setZero();
bool isValid2 = calcPenDepth( bool isValid2 = calcPenDepth(