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
59 lines
1.1 KiB
C
59 lines
1.1 KiB
C
|
|
#ifndef BULLET_DEMO_ENTRIES_H
|
|
#define BULLET_DEMO_ENTRIES_H
|
|
|
|
#include "BulletDemoInterface.h"
|
|
#include "../bullet2/BasicDemo/BasicDemo.h"
|
|
#include "../bullet2/FeatherstoneMultiBodyDemo/BulletMultiBodyDemos.h"
|
|
#include "../bullet2/FeatherstoneMultiBodyDemo/MultiDofDemo.h"
|
|
|
|
#include "../bullet2/RagdollDemo/RagdollDemo.h"
|
|
|
|
|
|
struct BulletDemoEntry
|
|
{
|
|
const char* m_name;
|
|
BulletDemoInterface::CreateFunc* m_createFunc;
|
|
};
|
|
|
|
|
|
static BulletDemoEntry allDemos[]=
|
|
{
|
|
|
|
//{"emptydemo",EmptyBulletDemo::MyCreateFunc},
|
|
{"BasicDemo",BasicDemo::MyCreateFunc},
|
|
{"Ragdoll",RagDollDemo::MyCreateFunc},
|
|
{"MultiBody1",FeatherstoneDemo1::MyCreateFunc},
|
|
{"MultiDofDemo",MultiDofDemo::MyCreateFunc},
|
|
|
|
|
|
};
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
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",¤tEntry);
|
|
fclose(f);
|
|
}
|
|
return currentEntry;
|
|
};
|
|
|
|
#endif//BULLET_DEMO_ENTRIES_H
|
|
|