|
iMSTK
Interactive Medical Simulation Toolkit
|
Base class for VTK render delegates. More...
#include <imstkVTKRenderDelegate.h>


Public Member Functions | |
| void | initialize (std::shared_ptr< VisualModel > model) |
| Setup the VTKRenderDelegate with given model. | |
| std::shared_ptr< VisualModel > | getVisualModel () const |
| Return geometry to render. | |
| vtkSmartPointer< vtkProp > | getVtkActor () const |
| Get VTK actor. | |
| void | setTextureManager (std::weak_ptr< TextureManager< VTKTextureDelegate >> textureManager) |
| Set the TextureManager. | |
| void | update () |
| Update render delegate. | |
| virtual void | processEvents () |
| Process the event queue, default implementation processes visualModel events and its RenderMaterial events. | |
| virtual void | updateRenderProperties ()=0 |
| Updates the actor and mapper properties from the currently set VisualModel. | |
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. | |
Static Public Member Functions | |
| static std::shared_ptr< VTKRenderDelegate > | makeDelegate (std::shared_ptr< VisualModel > visualModel) |
| Instantiate proper render delegate. | |
Protected Member Functions | |
| virtual void | init ()=0 |
| void | materialModified (Event *imstkNotUsed(e)) |
| Callback for updating render properties. | |
| void | visualModelModified (Event *e) |
| Callback for visual model modifications. | |
| vtkSmartPointer< vtkTexture > | getVTKTexture (std::shared_ptr< Texture > texture) |
Protected Attributes | |
| vtkSmartPointer< vtkTransform > | m_transform |
| vtkSmartPointer< vtkProp > | m_actor |
| vtkSmartPointer< vtkAbstractMapper > | m_mapper |
| std::shared_ptr< VisualModel > | m_visualModel |
| imstk visual model (contains data (geometry) and render specification (render material)) | |
| std::shared_ptr< RenderMaterial > | m_material |
| std::weak_ptr< TextureManager< VTKTextureDelegate > > | m_textureManager |
Protected Attributes inherited from imstk::EventObject | |
| ParallelUtils::SpinLock | eventQueueLock |
| std::deque< Command > | eventQueue |
| 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 *)> > |
Base class for VTK render delegates.
Definition at line 32 of file imstkVTKRenderDelegate.h.
1.8.13