A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by yan007 » Fri Jul 23, 2010 7:05 am
I noticed the NGD 2.0 has a new parameter for some functions: shapeID
Could someone explain me please the following:
-What is the purpose of shapeID and why was this extra parameter needed (does it replace another parameter)?
-Should it be unique per object ?
-
yan007
-
- Posts: 7
- Joined: Wed Jul 07, 2010 2:30 pm
by nathanf534 » Fri Jul 23, 2010 7:58 am
I probably can't answer your question very well, but Ive been setting them all to 0, and everything works fine for me, so I don't think they need to be unique, unless you are going to actually use their ID for something.
-
nathanf534
-
- Posts: 19
- Joined: Sun Jul 11, 2010 9:01 am
by Julio Jerez » Fri Jul 23, 2010 10:05 am
shape id is for user defined material system or for any other cosification the user want to do.
the id is part of the caching system.
say you have tow boxes of the same size, but you wna the to be different collisions, the caching system will see retrun eth same pointer,
but if the have different ID then they are two separate instance.
see the wiki 101 tutorials, i implemented a unified Material system there.
wit teh shape ID is possible to implement a unified material systems that play nice face IDs in collsion gtress and comppund ids in convex shapes,
all handled in one single callback. very good for editors and data driven engines.
setting then to a unique just because you can is a mistake because it will make one instance for each shape, and shapes are not lightweight objects.
-
Julio Jerez
- 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 1 guest