Shared collision shape with multiple scale factors

feedbrian
Posts: 9
Joined: Thu Feb 19, 2009 12:22 am

Shared collision shape with multiple scale factors

Post by feedbrian »

Hello, I'm writing a code to simulate a collection of convex particles. All the particles are using the same btConvexHull shape right now, but I'd like to add a random distribution of sizes. From the documentation, it looks like there are two ways to do this (correct me if I'm wrong or missing something):

1. use one btUniformScalingShape per particle
2. use a separate btConvexHull per particle and call setLocalScaling to change the size

If I understand what's going on, it seems like btUniformScalingShape is more memory-efficient but less flexible (uniform scaling only). Is this correct? Are there performance ramifications to using one or the other method?

Thanks
Brian
feedbrian
Posts: 9
Joined: Thu Feb 19, 2009 12:22 am

Re: Shared collision shape with multiple scale factors

Post by feedbrian »

Never mind, btUniformScalingShape is working fine for me with only a very small performance impact!