I'm trying to figure out how to pass a class method pointer to the setInternalTickCallback method.
This is the class:
I want to register tickCallback method to be registered with setInternalTickCallback, but I can't figure out how this is done.class PhysicsManager: public Singleton<PhysicsManager>
{
public:
PhysicsManager();
virtual ~PhysicsManager();
static PhysicsManager& getSingleton(void);
static PhysicsManager* getSingletonPtr(void);
private:
void tickCallback(btDynamicsWorld *world, btScalar timeStep);
};
}
Here is what I tried so far, but this does not work
Code: Select all
dynamicsWorld_->setInternalTickCallback(PhysicsManager::tickCallback);
dynamicsWorld_->setInternalTickCallback(&PhysicsManager::tickCallback);
no matching function for btDynamicsWorld::setInternalTickCallback(void (PhysicsManager::*)(btDynamicsWorld*, btScalar))