Problem with setAnimationEndCallback
Posted: Tue Aug 01, 2006 6:00 pm
hi all ,
in my code i use setAnimationEndCallback to call a function in which there are rules that control the movement of the static mesh bird . below is my code
-----------------------------------------------------------------------------
irr::scene::ISceneManager* smgr = device->getSceneManager();
scene::IAnimatedMesh* mesh = smgr->getMesh(
"../../media/bird.x");
scene::IAnimatedMeshSceneNode* anode = 0;
anode = smgr->addAnimatedMeshSceneNode(mesh);
anode->setLoopMode(true);
anode->setAnimationEndCallback(callBack);
-----------------------------------------------------------------------
------------------------------------------------------------------------------
void BoidsFlyer::callBack()
{
// Use the provided pointer argument to -
// - call a specific flyer's member functions.
BoidsFlyer *boidsFlyer = static_cast< BoidsFlyer * >( arg );
boidsFlyer -> directToBoid( );
boidsFlyer -> velocityMatching( );
boidsFlyer -> collisionAvoidance( );
boidsFlyer -> moveObject( );
boidsFlyer -> individual();
boidsFlyer ->foraging();
boidsFlyer ->subflocking();
}
-------------------------------------------------------------------
what do u think the problem is i m getting this error
------------------------------------------------
c:\documents and settings\haritha kolli\desktop\changing code\boidsflyer.cpp(53) : error C2664: 'setAnimationEndCallback' : cannot convert parameter 1 from 'void (void *)' to 'class irr::scene::IAnimationEndCallBack *'
There is no context in which this conversion is possible
------------------------------------------------------------------------------
please help
in my code i use setAnimationEndCallback to call a function in which there are rules that control the movement of the static mesh bird . below is my code
-----------------------------------------------------------------------------
irr::scene::ISceneManager* smgr = device->getSceneManager();
scene::IAnimatedMesh* mesh = smgr->getMesh(
"../../media/bird.x");
scene::IAnimatedMeshSceneNode* anode = 0;
anode = smgr->addAnimatedMeshSceneNode(mesh);
anode->setLoopMode(true);
anode->setAnimationEndCallback(callBack);
-----------------------------------------------------------------------
------------------------------------------------------------------------------
void BoidsFlyer::callBack()
{
// Use the provided pointer argument to -
// - call a specific flyer's member functions.
BoidsFlyer *boidsFlyer = static_cast< BoidsFlyer * >( arg );
boidsFlyer -> directToBoid( );
boidsFlyer -> velocityMatching( );
boidsFlyer -> collisionAvoidance( );
boidsFlyer -> moveObject( );
boidsFlyer -> individual();
boidsFlyer ->foraging();
boidsFlyer ->subflocking();
}
-------------------------------------------------------------------
what do u think the problem is i m getting this error
------------------------------------------------
c:\documents and settings\haritha kolli\desktop\changing code\boidsflyer.cpp(53) : error C2664: 'setAnimationEndCallback' : cannot convert parameter 1 from 'void (void *)' to 'class irr::scene::IAnimationEndCallBack *'
There is no context in which this conversion is possible
------------------------------------------------------------------------------
please help