Hey
Is it possible to exclude an object form btIDebugDraw ?
In my case I have a terrain shape (heightfieldShape) that generate a lot (>100'000) points when I use btIDebugDraw.
If I could exclude the terrain from drawing it would save a lot of lines being drawn as it kills the performance.
Any help appreciated.
[Feature request] Exclude an object from btIDebugDraw
-
- Posts: 10
- Joined: Fri Mar 06, 2009 6:55 am
- Location: Australia - Canberra
[Feature request] Exclude an object from btIDebugDraw
Last edited by lazalong on Sun Apr 26, 2009 2:48 am, edited 1 time in total.
-
- Posts: 10
- Joined: Fri Mar 06, 2009 6:55 am
- Location: Australia - Canberra
Re: [Feature request ?] Exclude an object from btIDebugDraw
Bump ?
Should this be a feature request?
Should this be a feature request?
-
- Posts: 144
- Joined: Fri Aug 01, 2008 6:36 am
- Location: Bonn, Germany
Re: [Feature request ?] Exclude an object from btIDebugDraw
Debug draw of heightfield terrain is in fact very slow.
I have written once my own debug_draw_world function, it skips
TERRAIN_SHAPE_PROXYTYPE.
if (shape->getShapeType() == TERRAIN_SHAPE_PROXYTYPE)
{
// TODO
;;
}
else
{
m_dynamicsWorld->debugDrawObject(worldTrans,shape,color);
}
I have written once my own debug_draw_world function, it skips
TERRAIN_SHAPE_PROXYTYPE.
if (shape->getShapeType() == TERRAIN_SHAPE_PROXYTYPE)
{
// TODO
;;
}
else
{
m_dynamicsWorld->debugDrawObject(worldTrans,shape,color);
}
-
- Posts: 10
- Joined: Fri Mar 06, 2009 6:55 am
- Location: Australia - Canberra
Re: [Feature request ?] Exclude an object from btIDebugDraw
Ok thanks
IMO it would be worthwhile to be able to exclude objects from debug (for example machine gun bullets or a static terrain).
Better to be able to retrieve the static objects at will (so that we create the debug meshes only once.)
Also btDiscreteDynamicsWorld::debugDrawObject() (and those in the other world type) could be modified with something like:
IMO it would be worthwhile to be able to exclude objects from debug (for example machine gun bullets or a static terrain).
Better to be able to retrieve the static objects at will (so that we create the debug meshes only once.)
Also btDiscreteDynamicsWorld::debugDrawObject() (and those in the other world type) could be modified with something like:
Code: Select all
switch (shape->getShapeType())
{
case TERRAIN_SHAPE_PROXYTYPE:
{
if (ignoreTerrainShape) break;
if (drawTerrainNearCamera)
{
// show terrain in a radius/aabb around the camera position
}
else
{
// draw all
}
}
case SPHERE_SHAPE_PROXYTYPE:
etc