36 #include "boost/bind.hpp" 47 ToolMetricRep::ToolMetricRep()
50 mViewportListener->setCallback(boost::bind(&ToolMetricRep::rescale,
this));
64 mViewportListener->startListen(view->getRenderer());
71 mViewportListener->stopListen();
83 if (!metric || !metric->isValid() || !this->
getView())
86 if (!mAxes || !mToolTip || !mToolOffset)
93 mAxes->setFontSize(0.04);
94 mAxes->setAxisLength(0.05);
96 mAxes->setShowAxesLabels(
false);
103 mToolTip->setValue(toolTip_r);
104 mToolTip->setColor(
mMetric->getColor());
106 mToolOffset->setValue(p0_r, toolTip_r);
107 mToolOffset->setColor(
mMetric->getColor());
109 mAxes->setTransform(metric->getRefFrame());
114 void ToolMetricRep::rescale()
119 double size = mViewportListener->getVpnZoom(this->getToolMetric()->getCoordinate());
121 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.