15 #include "boost/bind.hpp" 26 ToolMetricRep::ToolMetricRep()
29 mViewportListener->setCallback(boost::bind(&ToolMetricRep::rescale,
this));
43 mViewportListener->startListen(view->getRenderer());
50 mViewportListener->stopListen();
62 if (!metric || !metric->isValid() || !this->
getView())
65 if (!mAxes || !mToolTip || !mToolOffset)
72 mAxes->setFontSize(0.04);
73 mAxes->setAxisLength(0.05);
75 mAxes->setShowAxesLabels(
false);
82 mToolTip->setValue(toolTip_r);
83 mToolTip->setColor(
mMetric->getColor());
85 mToolOffset->setValue(p0_r, toolTip_r);
86 mToolOffset->setColor(
mMetric->getColor());
88 mAxes->setTransform(metric->getRefFrame());
93 void ToolMetricRep::rescale()
98 double size = mViewportListener->getVpnZoom(this->getToolMetric()->getCoordinate());
100 mToolTip->setRadius(sphereSize);
vtkRendererPtr getRenderer()
boost::shared_ptr< class ToolMetric > ToolMetricPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Visualization for one 3D coordinate axis triplet.
boost::shared_ptr< class ToolMetricRep > ToolMetricRepPtr
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
Helper for rendering a point in 3D.
boost::shared_ptr< class View > ViewPtr
Listens to changes in viewport and camera matrix.
void addRepActorsToViewRenderer(ViewPtr view)
Helper for rendering a line in 3D.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void removeRepActorsFromViewRenderer(ViewPtr view)
Namespace for all CustusX production code.