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

Method IsParallel

Modules/Core/include/mitkLine.h:266–276  ·  view source on GitHub ↗

\brief Test if a line is parallel to this line. * * Uses the cross product of direction vectors (3D only). * * \param line The other line to compare. * \return True if the lines are parallel, false otherwise. */

Source from the content-addressed store, hash-verified

264 * \return True if the lines are parallel, false otherwise.
265 */
266 bool IsParallel(const Line<TCoordRep, NPointDimension> &line) const
267 {
268 vnl_vector<TCoordRep> normal;
269
270 normal = vnl_cross_3d(m_Direction.GetVnlVector(), line.GetDirection().GetVnlVector());
271
272 if (normal.squared_magnitude() < eps)
273 return true;
274
275 return false;
276 }
277
278 /** \brief Test if another line is part of this line (line having infinite length).
279 *

Callers 3

MitkRenderMethod · 0.45
Line_TestParallelMethod · 0.45
TestPlaneComparisonMethod · 0.45

Calls

no outgoing calls

Tested by 2

Line_TestParallelMethod · 0.36
TestPlaneComparisonMethod · 0.36