MCPcopy Create free account
hub / github.com/MITK/MITK / Line_TestParallel

Method Line_TestParallel

Modules/Core/test/mitkLineTest.cpp:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 void Line_TestParallel()
79 {
80 // first line
81 mitk::Point3D point1, point2;
82 mitk::FillVector3D(point1, 0, 1, 0);
83 mitk::FillVector3D(point2, 0, 2.5, 0);
84 m_Line.SetPoint1(point1);
85 m_Line.SetPoint2(point2);
86
87 // parallel line
88 mitk::Point3D point3;
89 mitk::Vector3D directionLine2;
90 mitk::FillVector3D(point1, 1, 1, 0);
91 mitk::FillVector3D(directionLine2, 0, 1, 0);
92 mitk::Line<double, 3> parallelLine = mitk::Line<double, 3>(point1, directionLine2);
93 CPPUNIT_ASSERT_MESSAGE("Test if lines are parallel.", m_Line.IsParallel(parallelLine));
94
95 /* Seems as this method is broken, so disabled the test for the moment, see bug 17938
96 MITK_INFO << "Distance: " << m_Line.Distance(point3);
97 CPPUNIT_ASSERT_MESSAGE("Test line distance.",m_Line.Distance(point3)==1.0);
98 */
99 }
100
101 void Test2DLine()
102 {

Callers

nothing calls this directly

Calls 4

FillVector3DFunction · 0.85
SetPoint1Method · 0.80
SetPoint2Method · 0.80
IsParallelMethod · 0.45

Tested by

no test coverage detected