Problem 1
The arguments you see are function pointer, all of the following: ONEfunction pointer
Point3D (*globalPositionCalculator) (float horizontalAngle, float verticalAngle)
This pointer is said to point to a method that has the following:
Point3D methodName(float horizontalAngle, float verticalAngle);
And yours globalPositionCalculatoris a pointer pointing tomethodName
Check out this example with barebones from cprogramming
#include <iostream>
void my_int_func(int x)
{
std::cout << x << std::endl;
}
int main()
{
void (*foo)(int);
foo = &my_int_func;
foo( 2 );
(*foo)( 2 );
return 0;
}
Problem 2
processImage setGobalPositionCalculator, , .
, setGobalPositionCalculator
void Detection::setGobalPositionCalculator (Point3D (*thefunctionpointer) (float, float))
{
this->globalPositionCalculator = thefunctionpointer;
}
,
void Detection::processImage(Mat& image)
{
if (this->globalPositionCalculator)
{
landmark.position = this->globalPositionCalculator (hAngle, vAngle);
}
}
, this, . , , .