23 DataMetric(uid, name, dataManager, spaceProvider)
25 mArguments.reset(
new MetricReferenceArgumentList(QStringList() <<
"position" <<
"direction"));
26 connect(mArguments.get(), SIGNAL(argumentsChanged()),
this, SIGNAL(transformChanged()));
46 mArguments->addXml(dataNode);
47 dataNode.toElement().setAttribute(
"radius", mRadius);
48 dataNode.toElement().setAttribute(
"thickness", mThickness);
49 dataNode.toElement().setAttribute(
"height", mHeight);
50 dataNode.toElement().setAttribute(
"flat", mFlat);
57 mArguments->parseXml(dataNode,
mDataManager->getDatas());
58 mRadius = dataNode.toElement().attribute(
"radius",
qstring_cast(mRadius)).toDouble();
59 mThickness = dataNode.toElement().attribute(
"thickness",
qstring_cast(mThickness)).toDouble();
60 mHeight = dataNode.toElement().attribute(
"height",
qstring_cast(mHeight)).toDouble();
61 mFlat = dataNode.toElement().attribute(
"flat",
qstring_cast(mFlat)).toInt();
66 return !mArguments->getRefCoords().empty();
71 return mArguments->getRefCoords().front();
81 std::vector<Vector3D> coords = mArguments->getRefCoords();
83 return Vector3D::Zero();
89 std::vector<Vector3D> coords = mArguments->getRefCoords();
91 return Vector3D::UnitZ();
92 Vector3D diff = (coords[1]-coords[0]);
93 if (
similar(diff.length(), 0.0))