36 #include "boost/bind.hpp"
39 #include <vtkPolyDataMapper.h>
40 #include <vtkProperty.h>
41 #include <vtkRenderer.h>
42 #include <vtkSectorSource.h>
57 PointMetricRep2D::PointMetricRep2D()
70 mViewportListener.reset();
76 if (mViewportListener)
77 mViewportListener->startListen(view->getRenderer());
85 if (mViewportListener)
86 mViewportListener->stopListen();
111 mDisk->setColor(
mMetric->getColor());
112 mDisk->setOutlineColor(
mMetric->getColor());
113 mDisk->setOutlineWidth(0.25);
114 mDisk->setFillVisible(
false);
116 mDisk->setRadiusBySlicingSphere(this->findSphereRadius(), position[2]);
118 Vector3D projectedPosition = position;
119 double offsetFromXYPlane = 0.01;
120 projectedPosition[2] = offsetFromXYPlane;
121 mDisk->setPosition(projectedPosition);
126 double PointMetricRep2D::findSphereRadius()
129 if (mViewportListener)
131 double size = mViewportListener->getVpnZoom();
147 mSliceProxy = sliceProxy;
vtkRendererPtr getRenderer()
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
boost::shared_ptr< class PointMetricRep2D > PointMetricRep2DPtr
boost::shared_ptr< class View > ViewPtr
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
static PointMetricRep2DPtr New(const QString &uid="")
Listens to changes in viewport and camera matrix.
void addRepActorsToViewRenderer(ViewPtr view)
virtual void addRepActorsToViewRenderer(ViewPtr view)
virtual void onModifiedStartRender()
void setSliceProxy(SliceProxyPtr slicer)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void removeRepActorsFromViewRenderer(ViewPtr view)
void setDynamicSize(bool on)