Does it make sense, that when I set the localScaling of a btConvexTriangleMeshShape it will store the scaling by calling m_stridingMesh->setScaling(scaling); but when I call getLocalScaling on the btConvexTriangleMeshShape I will get the member variable m_localScaling from the btConvexShape class?
In this case these values are not equal!
Confused about localScaling
-
- Posts: 5
- Joined: Sat May 12, 2007 9:30 pm
Another confusion
Another curiosity is in btBvhTriangleMeshShape::setLocalScaling:
within this method btTriangleMeshShape::setLocalScaling is called which recalculates m_localAabbMin and m_localAabbMax. But after this recalculation these two variables are multiplicated with the given scaling again which results in a quadratic scaling, e.g. when specifying a scale of 3 the m_localAabbMin and -Max has a scale of 9.
within this method btTriangleMeshShape::setLocalScaling is called which recalculates m_localAabbMin and m_localAabbMax. But after this recalculation these two variables are multiplicated with the given scaling again which results in a quadratic scaling, e.g. when specifying a scale of 3 the m_localAabbMin and -Max has a scale of 9.
-
- Posts: 5
- Joined: Sat May 12, 2007 9:30 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
This local scaling issue will be fixed for convex and concave triangle meshes.
Note that not all shapes support local non-uniform scaling, in particar btSphereShape. If you want a non-uniform scaled sphere, you need to use btMultiSphereShape.
Scaling functionality should have been removed from transforms (btTransform) and this remainder will be removed from btMatrix3x3.
Thanks for the feedback!
Erwin
Note that not all shapes support local non-uniform scaling, in particar btSphereShape. If you want a non-uniform scaled sphere, you need to use btMultiSphereShape.
Scaling functionality should have been removed from transforms (btTransform) and this remainder will be removed from btMatrix3x3.
Thanks for the feedback!
Erwin