how to use CustomTransformCallback?

maxwave

28-04-2006 10:32:58

How to setCustomTransformCallback?
For CustomForceAndTorqueCallback I use line:
bod->setCustomForceAndTorqueCallback (fastdelegate::MakeDelegate( this, &cPhysics::ForceCallback));
and it compile without errors.
But when I use
bod->setCustomTransformCallback (fastdelegate::MakeDelegate( this, &cPhysics::TransformCallback));
I get error:

OgreNewt::Body::setCustomTransformCallback' : cannot convert parameter 1 from 'fastdelegate::FastDelegate1<Param1>' to 'OgreNewt::Body::TransformCallback'
with
[
Param1=OgreNewt::Body *
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

maxwave

28-04-2006 13:33:24

Oh, sorry I add invalid TransformCallback function in my code. I type one arguments, but it count should be 3. It should be like on this:

void cPhysics::TransformCallback ( OgreNewt::Body* bod, const Ogre::Quaternion& quat, const Ogre::Vector3& vect)
{

}