[SOLVED] showLines for only one body

goldman82

08-07-2007 16:02:33

hi,

is it possible to use the showLines function from the newton debugger for showing selected items?
i want to highlight my selected objects. with showboundingbox it is very imprecise. showing only one body with this lines would be the best i think.

any ideas?

thanks
goldman82

walaber

08-07-2007 17:39:47

steal some code from the OgreNewt::Debugger... and modify it to call the callback for only 1 body, it should be pretty simple!

goldman82

08-07-2007 17:53:27

ok, thanks.
i will check it out 8)

goldman82

goldman82

09-07-2007 19:02:24

thanks walaber!

i added one function in the debugger class:

void Debugger::showLines( const NewtonBody* body )
{
m_debugnode->detachAllObjects();
m_debuglines->clear();
m_debuglines->begin("BaseWhiteNoLighting", Ogre::RenderOperation::OT_LINE_LIST );

// make the new lines.
newtonPerBody(body);

m_debuglines->end();
m_debugnode->attachObject(m_debuglines);
}


That is it!!! :)