Documentation for NewtonCreateCompoundCollisionFromMesh

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Documentation for NewtonCreateCompoundCollisionFromMesh

Postby lost_jedi » Fri Jul 24, 2009 2:15 pm

Heya,

I can't seem to find any documentation about a very useful looking function in the 2.0 header: NewtonCreateCompoundCollisionFromMesh. The prototype is as follows;
Code: Select all
NewtonCollision* NewtonCreateCompoundCollisionFromMesh (const NewtonWorld* newtonWorld, const NewtonMesh* mesh, dFloat concavity, int maxShapeCount);


Is there any sample usage in the SDK I could take a look at? I can't seem to find it.

Much obliged,

John
lost_jedi
 
Posts: 12
Joined: Thu Aug 21, 2008 7:45 pm

Re: Documentation for NewtonCreateCompoundCollisionFromMesh

Postby Deltakosh » Sun Sep 06, 2009 5:02 am

Hi :)

I also tried to use this function but I can not manage to make it working.

I build a NewtonMesh and pass it to the function but I always got a crash :(

Here is my code (I try many values for concavity and maxShapes but none are working):

NewtonMesh *mesh = NewtonMeshCreate();

NewtonMeshBeginFace(mesh);
for (int index = 0; index < facesCount; index++)
{
NewtonMeshAddFace(mesh, 3, vertices + index * 12, 36, 0);
}
NewtonMeshEndFace(mesh);

avatar = NewtonCreateCompoundCollisionFromMesh(nWorld, mesh, concavity, maxShapes, 0);

NewtonMeshDestroy(mesh);
return avatar;
Deltakosh
 


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron