\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. */
| 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 | * |
no outgoing calls