[solved] when to use m_World->getDefaultMaterialID()??

marc_antoine

18-05-2009 21:54:29

when asigning materials to the ogreNewt bodies, in the collisionCallback demo, the materials are declared like this:

mMatDefault = m_World->getDefaultMaterialID();
mMatConveyor = new OgreNewt::MaterialID( m_World );


so why is that mMatDefault, has to be declared like that? why not like this?

mMatDefault=new OgreNewt::MaterialID(m_World);

what's the difference??

thanks in advance.
Cheers!

melven

19-05-2009 01:34:49

It's the default-material; every new body will have that material if you don't set another one...

marc_antoine

19-05-2009 02:04:54

thanks melven.. :), it makes sense now...!!! noob question. :oops:

cheers!