- Fixed a bug in btAxisSweep3 (sweep and prune) related to object removal. Only showed up when at least one btStaticPlaneShape was inserted.
Thanks tbp for more details on reproducing case. - Fixed issue with full 32bit integers in btAxisSweep3 (define BP_USE_FIXEDPOINT_INT_32), it used only 65536 for quantization, it should use full integer space (0xffffffff) - Added 'getForwardVector' and getCurrentSpeedKmHour utility functions to btRaycastVehicle - Fixed local scaling issues (btConvexTriangleMeshShape, btBvhTriangleMeshShape, removed scaling from btMatrix3x3). Thanks Volker for reporting! - Added second filename search, so that starting BspDemo and ConvexDecompositionDemo from within Visual Studio (without setting the starting path) still works
This commit is contained in:
@@ -164,9 +164,7 @@ void btBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling)
|
||||
{
|
||||
btTriangleMeshShape::setLocalScaling(scaling);
|
||||
delete m_bvh;
|
||||
///rescale aabb, instead of calculating?
|
||||
m_localAabbMin*=scaling;
|
||||
m_localAabbMax*=scaling;
|
||||
///m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work
|
||||
m_bvh = new btOptimizedBvh();
|
||||
//rebuild the bvh...
|
||||
m_bvh->build(m_meshInterface,m_useQuantizedAabbCompression,m_localAabbMin,m_localAabbMax);
|
||||
|
||||
@@ -195,5 +195,11 @@ void btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling)
|
||||
m_stridingMesh->setScaling(scaling);
|
||||
|
||||
recalcLocalAabb();
|
||||
|
||||
}
|
||||
|
||||
|
||||
const btVector3& btConvexTriangleMeshShape::getLocalScaling() const
|
||||
{
|
||||
return m_stridingMesh->getScaling();
|
||||
}
|
||||
@@ -39,7 +39,8 @@ public:
|
||||
virtual bool isInside(const btPoint3& pt,btScalar tolerance) const;
|
||||
|
||||
|
||||
void setLocalScaling(const btVector3& scaling);
|
||||
virtual void setLocalScaling(const btVector3& scaling);
|
||||
virtual const btVector3& getLocalScaling() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user