24 lines
568 B
C++
24 lines
568 B
C++
#include "realposition.hh"
|
|
#include "calibrationrequest.hh"
|
|
#include "referencepoint.hh"
|
|
|
|
|
|
|
|
Result RealPosition::compute(const Request &request)
|
|
{
|
|
const Point3D *coordinates = NULL ;
|
|
|
|
const CalibrationRequest *calibration_request =
|
|
dynamic_cast<const CalibrationRequest*>(&request) ;
|
|
|
|
if (calibration_request != NULL)
|
|
coordinates = static_cast<Point3D*>(
|
|
calibration_request->get_reference_point()) ;
|
|
|
|
coordinates = request.get_real_position() ;
|
|
if (coordinates)
|
|
return Result(*coordinates, name) ;
|
|
|
|
return Result(name) ;
|
|
}
|