iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::VTKTextureDelegate Class Reference

couples a imstk texture to a VTK texture More...

#include <imstkVTKTextureDelegate.h>

Inheritance diagram for imstk::VTKTextureDelegate:
Inheritance graph
[legend]
Collaboration diagram for imstk::VTKTextureDelegate:
Collaboration graph
[legend]

Public Member Functions

vtkSmartPointer< vtkTexture > getVtkTexture () const
 Gets the VTK texture coupled to the imstk texture. More...
 
std::shared_ptr< TexturegetTexture () const
 Get the imstk texture.
 
const std::string & getTextureName () const
 Return the VTK texture name. More...
 
void initialize (std::shared_ptr< Texture > texture)
 
- Public Member Functions inherited from imstk::EventObject
template<typename T >
void postEvent (const T &e)
 Emits the event Direct observers will be immediately called, in sync Queued observers will receive the Command in their queue for later execution, reciever must implement doEvent.
 
template<typename T >
void queueEvent (const T &e)
 Queues event directly to this.
 
void doEvent ()
 Do an event, if none exists return.
 
void doAllEvents ()
 Do all the events in the event queue.
 
void foreachEvent (std::function< void(Command cmd)> func)
 Thread safe loop over all event commands, one can implement a custom handler.
 
void rforeachEvent (std::function< void(Command cmd)> func)
 thread safe reverse loop over all event commands, one can implement a custom handler
 
void clearEvents ()
 Removes all events from queue cleans up copies of the event.
 

Protected Member Functions

void textureModified (Event *e)
 

Protected Attributes

vtkSmartPointer< vtkTexture > m_vtkTexture
 VTK texture.
 
std::shared_ptr< Texturem_texture
 iMSTK texture
 
std::string m_textureName
 VTK texture unique name.
 
- Protected Attributes inherited from imstk::EventObject
ParallelUtils::SpinLock eventQueueLock
 
std::deque< CommandeventQueue
 
std::vector< std::pair< std::string, std::vector< Observer > > > queuedObservers
 
std::vector< std::pair< std::string, std::vector< Observer > > > directObservers
 

Additional Inherited Members

- Public Types inherited from imstk::EventObject
using Observer = std::tuple< bool, std::weak_ptr< EventObject >, std::function< void(Event *)> >
 

Detailed Description

couples a imstk texture to a VTK texture

Definition at line 22 of file imstkVTKTextureDelegate.h.

Member Function Documentation

◆ getTextureName()

const std::string& imstk::VTKTextureDelegate::getTextureName ( ) const
inline

Return the VTK texture name.

Returns
VTK texture

Definition at line 45 of file imstkVTKTextureDelegate.h.

◆ getVtkTexture()

vtkSmartPointer<vtkTexture> imstk::VTKTextureDelegate::getVtkTexture ( ) const
inline

Gets the VTK texture coupled to the imstk texture.

Returns
VTK texture

Definition at line 33 of file imstkVTKTextureDelegate.h.


The documentation for this class was generated from the following files: