|
@@ -13,6 +13,8 @@ subject to the following restrictions:
|
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
3. This notice may not be removed or altered from any source distribution.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
+// Modified by Lasse Öörni for Urho3D
|
|
|
|
|
+
|
|
|
#include "btCollisionWorld.h"
|
|
#include "btCollisionWorld.h"
|
|
|
#include "btCollisionDispatcher.h"
|
|
#include "btCollisionDispatcher.h"
|
|
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
|
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
|
@@ -1197,10 +1199,12 @@ public:
|
|
|
wv0 = m_worldTrans*triangle[0];
|
|
wv0 = m_worldTrans*triangle[0];
|
|
|
wv1 = m_worldTrans*triangle[1];
|
|
wv1 = m_worldTrans*triangle[1];
|
|
|
wv2 = m_worldTrans*triangle[2];
|
|
wv2 = m_worldTrans*triangle[2];
|
|
|
- btVector3 center = (wv0+wv1+wv2)*btScalar(1./3.);
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawNormals )
|
|
if (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawNormals )
|
|
|
{
|
|
{
|
|
|
|
|
+ // Urho3D: calculate center only if needed
|
|
|
|
|
+ btVector3 center = (wv0+wv1+wv2)*btScalar(1./3.);
|
|
|
|
|
+
|
|
|
btVector3 normal = (wv1-wv0).cross(wv2-wv0);
|
|
btVector3 normal = (wv1-wv0).cross(wv2-wv0);
|
|
|
normal.normalize();
|
|
normal.normalize();
|
|
|
btVector3 normalColor(1,1,0);
|
|
btVector3 normalColor(1,1,0);
|