Trouble with dMass

7 views
Skip to first unread message

Mayank Barnawal

unread,
Jan 26, 2012, 1:02:56 AM1/26/12
to ode-users
Hello ode-users,

I am new to ODE. I am having trouble with the 'dMass' data type. I am
using VC++. Here is my program:

#include <stdio.h>
#include <math.h>
#include <ode/ode.h>
#include <drawstuff/drawstuff.h>

static dWorldID world;
static dBodyID box;

int main()
{
world=dWorldCreate();
box=dBodyCreate(world);
dBodySetPosition(box,0.0,0.0,0.0);
dMass m;
dMassSetBoxTotal(&m,0.05,5,5,5);
dBodySetMass(box,&m);

dWorldDestroy(world);
return 0;
}

The above code shows run time error message: Stack around the variable
'm' is corrupted.

Can anyone explain why it is so?

Thanks,
Mayank
Reply all
Reply to author
Forward
0 new messages