iMSTK
Interactive Medical Simulation Toolkit
imstkQuadricDecimate.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 
21 {
22 public:
24  ~QuadricDecimate() override = default;
25 
26 public:
30  void setInputMesh(std::shared_ptr<SurfaceMesh> inputMesh);
31 
35  imstkSetMacro(VolumePreserving, bool);
36  imstkGetMacro(VolumePreserving, bool);
38 
42  imstkSetMacro(TargetReduction, double);
43  imstkGetMacro(TargetReduction, double);
45 
46 protected:
47  void requestUpdate() override;
48 
49 private:
50  bool m_VolumePreserving;
51  double m_TargetReduction;
52 };
53 } // namespace imstk
void setInputMesh(std::shared_ptr< SurfaceMesh > inputMesh)
Required input, port 0.
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...
imstkSetMacro(VolumePreserving, bool)
Get/Set whether to preserve volume or not, default on.