iMSTK
Interactive Medical Simulation Toolkit
imstkVolumeRenderMaterial.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 "imstkRenderMaterial.h"
10 
11 #include <vtkSmartPointer.h>
12 
13 class vtkVolumeProperty;
14 
15 namespace imstk
16 {
18 {
19 public:
21  ~VolumeRenderMaterial() override = default;
22 
26  vtkSmartPointer<vtkVolumeProperty> getVolumeProperty();
27 
28  bool getUseAutoSample() const { return m_useAutoSample; }
29  void setUseAutoSample(bool useAutoSample) { m_useAutoSample = useAutoSample; }
30 
31  double getSampleDistance() const { return m_sampleDistance; }
32  void setSampleDistance(double sampleDistance) { m_sampleDistance = sampleDistance; }
33 
34 protected:
35  vtkSmartPointer<vtkVolumeProperty> m_property;
36 
37  bool m_useAutoSample = true;
38  double m_sampleDistance = 0.0;
39 };
40 } // namespace imstk
Compound Geometry.
vtkSmartPointer< vtkVolumeProperty > getVolumeProperty()
Get the volume property.
Serves no function, just a database for render properties, emits events for others to observe its cha...