NewtonCollisionGetUserData

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonCollisionGetUserData

Postby Bird » Tue Dec 06, 2011 9:22 pm

Any chance we could SDK support for set/get userData for NewtonCollision objects .... similar to the NewtonCollisionGetUserID. Looks like functions are there in dgCollision but they're not exposed in the SDK.

-Bird
Bird
 
Posts: 636
Joined: Tue Nov 22, 2011 1:27 am

Re: NewtonCollisionGetUserData

Postby Julio Jerez » Wed Dec 07, 2011 8:58 am

the collsion are reused,
for example two cubes with the same size and matrix, will be the same pointer with a increaded ref count, so the concept of user data does not work on shared resource.

you can do this, you can make each shape unique, by calling NewtonCollisionMakeUnique afte you create a collision,
thsi will remove form the cache and then you can write your use data as as a pointed save on the ID.


GetUserData on the collision is a legacy funtion that is no use anymore.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron