11 #ifndef CXCUSTOMMETRIC_H
12 #define CXCUSTOMMETRIC_H
14 #include "cxResourceExport.h"
47 virtual bool isValid()
const;
48 virtual QIcon
getIcon() {
return QIcon(
":/icons/metric_custom.png");}
50 QString getDefineVectorUpMethod()
const;
51 void setDefineVectorUpMethod(QString defineVectorUpMethod);
52 void setModelUid(QString val);
53 QString getModelUid()
const;
56 void setScaleToP1(
bool val);
57 bool getScaleToP1()
const;
58 void setOffsetFromP0(
double val);
59 double getOffsetFromP0()
const;
60 void setOffsetFromP1(
double val);
61 double getOffsetFromP1()
const;
62 void setRepeatDistance(
double val);
63 double getRepeatDistance()
const;
64 void setTranslationOnly(
bool val);
65 bool getTranslationOnly()
const;
66 void setTextureFollowTool(
bool val);
67 bool getTextureFollowTool()
const;
70 virtual void addXml(QDomNode& dataNode);
71 virtual void parseXml(QDomNode& dataNode);
73 virtual Vector3D getRefCoord()
const;
80 return "CustomMetric";
86 std::vector<Vector3D> getPositions()
const;
91 struct cxResource_EXPORT DefineVectorUpMethods
93 DefineVectorUpMethods()
95 table =
"tableDefinesUp";
96 connectedFrameInP1 =
"connectedFrameDefinesUp";
97 tool =
"toolDefinesUp";
100 QString connectedFrameInP1;
102 QStringList getAvailableDefineVectorUpMethods()
const;
103 std::map<QString, QString> getAvailableDefineVectorUpMethodsDisplayNames()
const;
108 QString mDefineVectorUpMethod;
110 DefineVectorUpMethods mDefineVectorUpMethods;
112 double mOffsetFromP0;
113 double mOffsetFromP1;
114 double mRepeatDistance;
115 bool mShowDistanceMarkers;
116 double mDistanceMarkerVisibility;
117 bool mTranslationOnly;
118 bool mTextureFollowTool;
123 Transform3D calculateTransformTo2DImageCenter()
const;
124 void onPropertiesChanged();
125 bool needForToolListenerHasChanged()
const;
126 void createOrDestroyToolListener();
129 CustomMetric::DefineVectorUpMethods getDefineVectorUpMethods()
const;
130 std::vector<Transform3D> calculateOrientations()
const;
131 int getRepeatCount()
const;
132 std::vector<Vector3D> getPointCloud()
const;
133 bool modelIsImage()
const;
134 void setShowDistanceMarkers(
bool show);
135 bool getShowDistanceMarkers()
const;
137 void setDistanceMarkerVisibility(
double val);
138 double getDistanceMarkerVisibility()
const;
147 #endif // CXSHAPEDMETRIC_H