Tetrahedral mesh in ConcavePhysicsDemo

rsea
Posts: 1
Joined: Fri Aug 19, 2011 12:43 pm

Tetrahedral mesh in ConcavePhysicsDemo

Post by rsea »

Hi,
I'm very new on Bullet, it is very amazing, thank you for your great work!!
I'm interested to use Concave Mesh, so I'm looking into:
ConcavePhysicsDemo.cpp
I'm using this demo for my practice. The bunny works fine, but if I try to change only the mesh using the follow simple mesh of a tetrahedral, I see a bizarre behavior of the object, it has strange equilibrium points. I certainly have not understood something! Could you help me to understand, please?
Thank you very much
Luk

Code: Select all

const int NUM_TRIANGLES =4;
const int NUM_VERTICES = 4;
const int NUM_INDICES  = NUM_TRIANGLES * 3;

#define REAL btScalar
REAL gVertices[NUM_VERTICES * 3] = {
    REAL(0.0), REAL(0.0), REAL(0.0),
    REAL(0.0), REAL(1.0), REAL(0.0),
    REAL(1.0), REAL(0.0), REAL(0.0),
    REAL(0.0), REAL(0.0), REAL(1.0)
};

int gIndices[NUM_TRIANGLES][3] = {
    {0,1,3},
    {0,1,2},
    {3,1,2},
    {0,2,3}
};