Hallo,
is there any way to use *ellipsoids* as colliding shapes?
I just tried to use the 'sphere' collision shape, by using a non
uniform transformation matrix, but this does not work. In fact,
in the header file of btSphereCollisionShape I read that the
non-uniform scaling isn't supported anymore.
Does this mean that I should implement a custom inherited
class, or do I miss something?
regards,
Alessandro
Ellipsoids
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Ellipsoids
Yes, to create an ellipsoid you can use the btMultiSphereShape with just one sphere and set the non-uniform scaling on that shape, using setLocalScale(...).
You can also make a capsule with this btMultiSphereShape, by adding two spheres, it will automatically use the convex-hull of all spheres.
Erwin
PS: the btSphereShape has the non-uniform scaling removed to improve performance, this is an internal optimization: the full radius can be used as 'gjk margin' which means less expensive 'penetration' depth calculation using ordinaty gjk instead of epa.
You can also make a capsule with this btMultiSphereShape, by adding two spheres, it will automatically use the convex-hull of all spheres.
Erwin
PS: the btSphereShape has the non-uniform scaling removed to improve performance, this is an internal optimization: the full radius can be used as 'gjk margin' which means less expensive 'penetration' depth calculation using ordinaty gjk instead of epa.
tasora wrote:Hallo,
is there any way to use *ellipsoids* as colliding shapes?
I just tried to use the 'sphere' collision shape, by using a non
uniform transformation matrix, but this does not work. In fact,
in the header file of btSphereCollisionShape I read that the
non-uniform scaling isn't supported anymore.
Does this mean that I should implement a custom inherited
class, or do I miss something?
regards,
Alessandro
-
- Posts: 26
- Joined: Mon Aug 15, 2005 8:57 am
- Location: Italy