Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPlaneIntersectionVisitor.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkPlaneIntersectionVisitor_h
18 #define mitkPlaneIntersectionVisitor_h
19 
20 #include <mitkPoint.h>
21 #include <mitkVector.h>
22 #include <sofa/simulation/common/Visitor.h>
23 #include <MitkSimulationExports.h>
24 
25 namespace mitk
26 {
27  class MITKSIMULATION_EXPORT PlaneIntersectionVisitor : public sofa::simulation::Visitor
28  {
29  public:
30  struct Edge
31  {
34  };
35 
36  struct Intersection
37  {
38  float color[4];
39  std::vector<Edge> edges;
40  };
41 
42  PlaneIntersectionVisitor(const Point3D& point, const Vector3D& normal, const sofa::core::ExecParams* params = sofa::core::ExecParams::defaultInstance());
44 
45  const std::vector<Intersection>& GetIntersections() const;
46 
47  using sofa::simulation::Visitor::processNodeTopDown;
48  Result processNodeTopDown(sofa::simulation::Node* node) override;
49 
50  private:
53 
54  void processVisualModel(sofa::simulation::Node*, sofa::core::visual::VisualModel* visualModel);
55 
56  Point3D m_Point;
57  Vector3D m_Normal;
58 
59  std::vector<Intersection> m_Intersections;
60  };
61 }
62 
63 #endif
DataCollection - Class to facilitate loading/accessing structured data.