17 #include <vtkVectorText.h> 18 #include <vtkFollower.h> 19 #include <vtkPolyDataMapper.h> 20 #include <vtkProperty.h> 21 #include <vtkRenderer.h> 22 #include <vtkCamera.h> 23 #include <vtkRenderWindow.h> 25 #include "vtkTextActor.h" 38 AngleMetricRep::AngleMetricRep()
59 if (!angleMetric || !
mMetric->isValid())
66 std::vector<Vector3D> p = angleMetric->getEndpoints();
68 if (angleMetric->getUseSimpleVisualization())
79 mLine0->setColor(
mMetric->getColor());
80 mLine0->setStipple(0x0F0F);
81 mLine0->setValue(p[0], p[1]);
87 mLine1->setColor(
mMetric->getColor());
88 mLine1->setStipple(0x0F0F);
89 mLine1->setValue(p[2], p[3]);
96 mArc->setColor(
mMetric->getColor());
97 mArc->setStipple(0xF0FF);
98 Vector3D a_center = (p[1] + p[2]) / 2;
101 double d = (l0.length() + l1.length()) / 2 * 0.5;
102 Vector3D a_start = a_center + l0.normalized() * d;
103 Vector3D a_end = a_center + l1.normalized() * d;
104 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.