iMSTK
Interactive Medical Simulation Toolkit
imstkStraightNeedle.cpp
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #include "imstkStraightNeedle.h"
8 #include "imstkLineMesh.h"
9 
10 namespace imstk
11 {
12 Vec3d
14 {
15  return (-m_needleGeom->getRotation().col(1)).normalized();
16 }
17 
18 const Vec3d&
19 StraightNeedle::getNeedleStart() const
20 {
21  return (*m_needleGeom->getVertexPositions())[0];
22 }
23 
24 const Vec3d&
25 StraightNeedle::getNeedleEnd() const
26 {
27  return (*m_needleGeom->getVertexPositions())[1];
28 }
29 } // namespace imstk
Vec3d getNeedleDirection() const override
Returns axes/direciton of the needle.
Compound Geometry.