Enable MPR by default

Add the contact point from MPR, in addition to SAT/clipping contacts. Added a new kernel to clear/reset the number of contacts in pairs (stored in the z component)
Always sample unit sphere directions, if there are more edge-edge combinations than unit sphere directions (162 by default)
Remember last running demo for Bullet 3 (and save it in a text file, Bullet
Enable the testFileFracture.bullet in the Bullet2FileDemo
This commit is contained in:
Erwin Coumans
2014-01-15 10:35:51 -08:00
parent ca86e135de
commit 472a4068fc
27 changed files with 573 additions and 65 deletions

View File

@@ -75,6 +75,31 @@ extern bool gUseCalculateOverlappingPairsHost;
extern bool gIntegrateOnCpu;
extern bool gConvertConstraintOnCpu;
static const char* sStartFileName = "bullet3StartDemo.txt";
static void saveCurrentDemoEntry(int currentEntry,const char* startFileName)
{
FILE* f = fopen(startFileName,"w");
if (f)
{
fprintf(f,"%d\n",currentEntry);
fclose(f);
}
};
static int loadCurrentDemoEntry(const char* startFileName)
{
int currentEntry= 0;
FILE* f = fopen(startFileName,"r");
if (f)
{
fscanf(f,"%d",&currentEntry);
fclose(f);
}
return currentEntry;
};
static void MyResizeCallback( float width, float height)
{
g_OpenGLWidth = width;
@@ -180,6 +205,7 @@ void MyComboBoxCallback(int comboId, const char* item)
gReset = true;
selectedDemo = i;
printf("selected demo %s!\n", item);
saveCurrentDemoEntry(i,sStartFileName);
}
}
}
@@ -611,6 +637,8 @@ int main(int argc, char* argv[])
return 0;
}
selectedDemo = loadCurrentDemoEntry(sStartFileName);
args.GetCmdLineArgument("selected_demo",selectedDemo);