Hello,
I wonder, if there is an option to hide normals of BVH trimesh in Debugdrawer in wireframe mode (those yellow pins).
Also, it seems that Multisphere (consisting of only one scaled sphere) doesn't appear with the correct scaling (simple boxes do). Or am I doing something wrong at this point?
And finally, do Ghostobjects show up in Debugdrawer? I'm not sure about the correct positioning, but I didn't see them.
Regards, Igor
Debugdrawer: Disable trimesh normals, scaling multisphere
-
- Posts: 15
- Joined: Mon Mar 28, 2011 9:11 am
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Re: Debugdrawer: Disable trimesh normals, scaling multispher
No, it is hardcoded, you have to comment out several lines in btCollisionWorld.cpp,I wonder, if there is an option to hide normals of BVH trimesh
Code: Select all
virtual void processTriangle(btVector3* triangle,int partId, int triangleIndex)
{
(void)partId;
(void)triangleIndex;
btVector3 wv0,wv1,wv2;
wv0 = m_worldTrans*triangle[0];
wv1 = m_worldTrans*triangle[1];
wv2 = m_worldTrans*triangle[2];
btVector3 center = (wv0+wv1+wv2)*btScalar(1./3.);
btVector3 normal = (wv1-wv0).cross(wv2-wv0);
normal.normalize();
btVector3 normalColor(1,1,0);
m_debugDrawer->drawLine(center,center+normal,normalColor);
m_debugDrawer->drawLine(wv0,wv1,m_color);
m_debugDrawer->drawLine(wv1,wv2,m_color);
m_debugDrawer->drawLine(wv2,wv0,m_color);
}
Last edited by mi076 on Mon Mar 28, 2011 8:21 pm, edited 1 time in total.
-
- Posts: 15
- Joined: Mon Mar 28, 2011 9:11 am
Re: Debugdrawer: Disable trimesh normals, scaling multispher
mi076, thanks, so it's more of a feature request... And what about MultiSphere? It looks bigger, than it is.
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Re: Debugdrawer: Disable trimesh normals, scaling multispher
ok, i can confirm, in fact, if use setLocalScaling on Multisphere, radii/radius in debug drawer is not updated, but you can see bigger Aabbs (press 'a'). There is no non-uniform scaling for spheres, so you can just update radius... it is possible to change radii of individual spheres in multisphereAlso, it seems that Multisphere (consisting of only one scaled sphere) doesn't appear with the correct scaling (simple boxes do). Or am I doing something wrong at this point?
http://bulletphysics.org/Bullet/phpBB3/ ... php?t=6123
Edit: ghosts object's shape shows up
-
- Posts: 15
- Joined: Mon Mar 28, 2011 9:11 am
Re: Debugdrawer: Disable trimesh normals, scaling multispher
mi076, thanks for comments. Now I'm aware 

-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Debugdrawer: Disable trimesh normals, scaling multispher
Those debug trimesh normals are only displayed when you enable wireframe debug rendering, right?
btIDebugDraw::DBG_DrawWireframe
Thanks,
Erwin
btIDebugDraw::DBG_DrawWireframe
Thanks,
Erwin
-
- Posts: 15
- Joined: Mon Mar 28, 2011 9:11 am
Re: Debugdrawer: Disable trimesh normals, scaling multispher
Yes, I'd like to hide them, but to see the wireframe, because in high-poly trimesh normals cover the biggest part of the screen, usually at rounded edges (didn't do optimization yet, since it doesn't produce wrong behaviour nor slow down simulation).