how to create BasicJointCallback?

maxwave

05-07-2006 13:31:18

for create Joint callback I use string
joint->setCallback (fastdelegate::MakeDelegate( this, &cPhysics::JointsCallBack));
and function for callback:
void cPhysics::JointsCallBack(OgreNewt::BasicJoints::Hinge * hing)
{
}


but when I compile app, I get error:
d:\programming\ogre\ogresdk\samples\max444\src\cphysics.cpp(248) : error C2664: 'OgreNewt::BasicJoints::Hinge::setCallback' : cannot convert parameter 1 from 'fastdelegate::FastDelegate1<Param1,RetType>' to 'OgreNewt::BasicJoints::Hinge::HingeCallback'
with
[
Param1=OgreNewt::BasicJoints::Hinge *,
RetType=void
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called


What I do not right? If this way is incorrect, which way I can use for implement JointCallback? (sorry for my stupid question :oops: , but I bad understand callback tehnoligy, fastelegate and type conversion from fastdelegate to HingeCallback type :roll: ).

walaber

05-07-2006 19:35:40

first of all, OgreNewt no longer uses fastdelegate, please delete your OgreNewt directory, and get a fresh copy.

2nd of all, I don't think I ever upgraded the Joint callbacks to use the new system... I will try to do that soon! for now, you will have to use static functions with the joint callbacks.