MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / dBodyCreate

Function dBodyCreate

3rd_party/Src/ode/ode/src/ode.cpp:251–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251dxBody *dBodyCreate (dxWorld *w)
252{
253 //dAASSERT (w);
254 dxBody *b = new dxBody;
255 initObject (b,w);
256 b->firstjoint = 0;
257 b->flags = 0;
258 b->geom = 0;
259 dMassSetParameters (&b->mass,1,0,0,0,1,1,1,0,0,0);
260 dSetZero (b->invI,4*3);
261 b->invI[0] = 1;
262 b->invI[5] = 1;
263 b->invI[10] = 1;
264 b->invMass = 1;
265 dSetZero (b->pos,4);
266 dSetZero (b->q,4);
267 b->q[0] = 1;
268 dRSetIdentity (b->R);
269 dSetZero (b->lvel,4);
270 dSetZero (b->avel,4);
271 dSetZero (b->facc,4);
272 dSetZero (b->tacc,4);
273 dSetZero (b->finite_rot_axis,4);
274 if (w) dWorldAddBody(w,b);
275
276 // set auto-disable parameters
277 dBodySetAutoDisableDefaults (b); // must do this after adding to world
278// b->adis_stepsleft = b->adis.idle_steps;
279// b->adis_timeleft = b->adis.idle_time;
280
281 return b;
282}
283
284void dBodyDestroy (dxBody *b)
285{

Callers 8

dTestDataStructuresFunction · 0.85
dBodyMethod · 0.85
createMethod · 0.85
buildMethod · 0.85
CreateSimulBaseMethod · 0.85
CreateMethod · 0.85
CreateMethod · 0.85
CreateBodyMethod · 0.85

Calls 6

initObjectFunction · 0.85
dMassSetParametersFunction · 0.85
dSetZeroFunction · 0.85
dRSetIdentityFunction · 0.85
dWorldAddBodyFunction · 0.85

Tested by

no test coverage detected