16 #include "cxResourceExport.h"
21 #include <boost/shared_ptr.hpp>
33 typedef boost::shared_ptr<class Tool>
ToolPtr;
34 typedef std::map<QString, ToolPtr>
ToolMap;
46 QString toString()
const;
61 class cxResource_EXPORT
Tool:
public QObject
67 Tool(
const QString& uid=
"",
const QString& name =
"");
92 virtual const std::map<double, ToolPositionMetadata>& getMetadataHistory() = 0;
94 virtual std::set<Type> getTypes()
const = 0;
100 return this->getTypes().count(type);
105 virtual bool getVisible()
const = 0;
108 virtual QString getUid()
const = 0;
109 virtual QString getName()
const = 0;
111 virtual bool isCalibrated()
const = 0;
112 virtual Transform3D getCalibration_sMt()
const = 0;
113 virtual void setCalibration_sMt(
Transform3D calibration) { Q_UNUSED(calibration); }
116 virtual double getTimestamp()
const = 0;
117 virtual void printSelf(std::ostream &os, Indent indent) { Q_UNUSED(os); Q_UNUSED(indent); }
119 virtual double getTooltipOffset()
const {
return 0; }
120 virtual void setTooltipOffset(
double val) { Q_UNUSED(val); }
121 virtual std::map<QString, Vector3D> getReferencePoints()
const {
return std::map<QString, Vector3D>(); }
124 virtual TimedTransformMap getSessionHistory(
double startTime,
double stopTime) = 0;
129 virtual void set_prMt(
const Transform3D& prMt,
double timestamp=-1) = 0;
130 virtual void setVisible(
bool vis) = 0;
132 virtual ToolPtr getBaseTool() = 0;
134 virtual bool isNull() = 0;
135 static ToolPtr getNullObject();
142 void toolTransformAndTimestamp(
Transform3D matrix,
double timestamp);
143 void toolVisible(
bool visible);
144 void tooltipOffset(
double offset);
145 void toolProbeSector();