38 #include <vtkVectorText.h> 39 #include <vtkFollower.h> 40 #include <vtkPolyDataMapper.h> 41 #include <vtkProperty.h> 42 #include <vtkRenderer.h> 43 #include <vtkCamera.h> 44 #include <vtkRenderWindow.h> 46 #include "vtkTextActor.h" 59 AngleMetricRep::AngleMetricRep()
80 if (!angleMetric || !
mMetric->isValid())
87 std::vector<Vector3D> p = angleMetric->getEndpoints();
89 if (angleMetric->getUseSimpleVisualization())
100 mLine0->setColor(
mMetric->getColor());
101 mLine0->setStipple(0x0F0F);
102 mLine0->setValue(p[0], p[1]);
108 mLine1->setColor(
mMetric->getColor());
109 mLine1->setStipple(0x0F0F);
110 mLine1->setValue(p[2], p[3]);
117 mArc->setColor(
mMetric->getColor());
118 mArc->setStipple(0xF0FF);
119 Vector3D a_center = (p[1] + p[2]) / 2;
122 double d = (l0.length() + l1.length()) / 2 * 0.5;
123 Vector3D a_start = a_center + l0.normalized() * d;
124 Vector3D a_end = a_center + l1.normalized() * d;
125 mArc->setValue(a_start, a_end, a_center);
vtkRendererPtr getRenderer()
Helper for rendering a line in 3D.
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
static AngleMetricRepPtr New(const QString &uid="")
boost::shared_ptr< class AngleMetric > AngleMetricPtr
boost::shared_ptr< class AngleMetricRep > AngleMetricRepPtr
Helper for rendering a line in 3D.
virtual void onModifiedStartRender()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Data class that represents an angle between two lines.
Namespace for all CustusX production code.