iMSTK
Interactive Medical Simulation Toolkit
imstkSelectEnclosedPoints.h
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 #pragma once
8 
9 #include "imstkGeometryAlgorithm.h"
10 #include "imstkDataArray.h"
11 
12 namespace imstk
13 {
14 class PointSet;
15 class SurfaceMesh;
16 
24 {
25 public:
27  ~SelectEnclosedPoints() override = default;
28 
29 public:
30  void setInputMesh(std::shared_ptr<SurfaceMesh> inputMesh);
31  void setInputPoints(std::shared_ptr<PointSet> inputPoints);
32  std::shared_ptr<PointSet> getOutputPoints() const;
33 
34  imstkGetMacro(UsePruning, bool);
35  imstkGetMacro(Tolerance, double);
36  imstkGetMacro(InsideOut, bool);
37  imstkGetMacro(IsInsideMask, std::shared_ptr<DataArray<unsigned char>>);
38 
39  imstkSetMacro(UsePruning, bool);
40  imstkSetMacro(Tolerance, double);
41  imstkSetMacro(InsideOut, bool);
42 
43 protected:
44  void requestUpdate() override;
45 
46 private:
47  bool m_UsePruning = true;
48  double m_Tolerance = 0.0;
49  bool m_InsideOut = false;
50  std::shared_ptr<DataArray<unsigned char>> m_IsInsideMask = nullptr;
51 };
52 } // namespace imstk
Compound Geometry.
void requestUpdate() override
Users can implement this for the logic to be run.
Abstract base class for geometry algorithms. GeometryAlgorithms take N input geometries and produce N...
Simple dynamic array implementation that also supports event posting and viewing/facade.