I am programming against an external library which requires a static callback function. I declared my callback as static but then i loose access to the object properties i want to modify with this callback.
.h
static void selCallback(void* userData, SoPath* selPath);
.cpp
void MyClass::selCallback(void* userData, SoPath* selPath) {
classProperty = 3;
}
Is there a way how can create a static callback while being able to access my current objects properties? The library i use is the openInventor library. The callback wiring up is done with the following code:
SoSelection *selNode = new SoSelection;
selNode->addSelectionCallback(MyClass::selCallback);