iMSTK
Interactive Medical Simulation Toolkit
imstkSurfaceMeshSubdivide.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 
11 namespace imstk
12 {
13 class SurfaceMesh;
14 
23 {
24 public:
25  enum class Type
26  {
27  LINEAR,
28  LOOP,
29  BUTTERFLY
30  };
31 
32 public:
34  ~SurfaceMeshSubdivide() override = default;
35 
36 public:
37  std::shared_ptr<SurfaceMesh> getOutputMesh();
38 
39  void setInputMesh(std::shared_ptr<SurfaceMesh> inputMesh);
40 
41  imstkGetMacro(SubdivisionType, Type);
42  imstkGetMacro(NumberOfSubdivisions, int);
43  imstkSetMacro(SubdivisionType, Type);
44  imstkSetMacro(NumberOfSubdivisions, int);
45 
46 protected:
47  void requestUpdate() override;
48 
49 private:
50  Type m_SubdivisionType = Type::LINEAR;
51  int m_NumberOfSubdivisions = 1;
52 };
53 } // 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...