iMSTK
Interactive Medical Simulation Toolkit
imstkVTKTextureDelegate.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 "imstkTextureDelegate.h"
10 
11 #include <vtkSmartPointer.h>
12 
13 class vtkTexture;
14 
15 namespace imstk
16 {
23 {
24 public:
26  ~VTKTextureDelegate() override = default;
27 
33  vtkSmartPointer<vtkTexture> getVtkTexture() const { return m_vtkTexture; }
34 
38  std::shared_ptr<Texture> getTexture() const { return m_texture; }
39 
45  const std::string& getTextureName() const { return m_textureName; }
46 
47  void initialize(std::shared_ptr<Texture> texture);
48 
49 protected:
50  void textureModified(Event* e);
51 
52  vtkSmartPointer<vtkTexture> m_vtkTexture;
53  std::shared_ptr<Texture> m_texture;
54  std::string m_textureName;
55 };
56 } // namespace imstk
Base class for events which contain a type, priority, and data priority defaults to 0 and uses a grea...
std::string m_textureName
VTK texture unique name.
Compound Geometry.
const std::string & getTextureName() const
Return the VTK texture name.
vtkSmartPointer< vtkTexture > getVtkTexture() const
Gets the VTK texture coupled to the imstk texture.
vtkSmartPointer< vtkTexture > m_vtkTexture
VTK texture.
couples a imstk texture to a VTK texture
std::shared_ptr< Texture > getTexture() const
Get the imstk texture.
std::shared_ptr< Texture > m_texture
iMSTK texture
iMSTK texture delegate abstract class