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

This implements a text on screen that will notify the user of the current state of the simulation. ie: If paused or not. It can be toggled on and off. More...

#include <imstkSceneControlText.h>

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

Public Member Functions

 SceneControlText (const std::string &name="SceneControlText")
 
void setSceneManager (std::weak_ptr< SceneManager > sceneManager)
 Set the scene manager whose fps we should track.
 
void setUseTextStatus (const bool useTextStatus)
 If on, text status will be shown when paused. On by default.
 
bool getUseTextStatus () const
 
- Public Member Functions inherited from imstk::TextVisualModel
 TextVisualModel (const std::string &name="TextVisualModel")
 
void setText (const std::string &text)
 Text to be plotted.
 
const std::string & getText () const
 
const ColorgetTextColor () const
 Text Color.
 
void setTextColor (const Color &color)
 
double getFontSize () const
 Font size.
 
void setFontSize (const double fontSize)
 
void setVisibility (const bool visible)
 Text visibility.
 
const bool getVisibility () const
 
void setPosition (const DisplayPosition position)
 Text Location.
 
DisplayPosition getPosition () const
 
- Public Member Functions inherited from imstk::VisualModel
 VisualModel (const std::string &name="VisualModel")
 
 SIGNAL (VisualModel, modified)
 
void postModified ()
 
std::shared_ptr< GeometrygetGeometry () const
 Get/Set geometry.
 
void setGeometry (std::shared_ptr< Geometry > geometry)
 
const std::string & getName () const
 Get/Set name.
 
void setName (std::string name)
 
const std::string getDelegateHint () const
 Get/Set the delegate hint, which helps indicate how to render this VisualModel.
 
void setDelegateHint (const std::string &name)
 
void setRenderMaterial (std::shared_ptr< RenderMaterial > renderMaterial)
 Set/Get render material.
 
std::shared_ptr< RenderMaterialgetRenderMaterial () const
 
void show ()
 Visibility functions.
 
void hide ()
 
bool isVisible () const
 
void setIsVisible (const bool visible)
 
bool getRenderDelegateCreated (Renderer *ren)
 Get/Set whether the delegate has been created.
 
void setRenderDelegateCreated (Renderer *ren, bool created)
 
- Public Member Functions inherited from imstk::Component
const std::string & getName () const
 
void setName (const std::string &name)
 
std::weak_ptr< EntitygetEntity () const
 Get parent entity.
 
void initialize ()
 Initialize the component, called at a later time after all component construction is complete.
 
- 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 init () override
 Initialize the component, called at a later time after all component construction is complete.
 
- Protected Member Functions inherited from imstk::Component
 Component (const std::string &name="Component")
 

Protected Attributes

std::weak_ptr< SceneManagerm_sceneManager
 
bool m_useTextStatus = true
 
- Protected Attributes inherited from imstk::TextVisualModel
std::string m_text = ""
 
Color m_textColor = Color::White
 
double m_fontSize = 20.0
 
bool m_visible = true
 
DisplayPosition m_position = DisplayPosition::CenterCenter
 
- Protected Attributes inherited from imstk::VisualModel
std::string m_delegateHint
 
std::shared_ptr< Geometrym_geometry
 
std::shared_ptr< RenderMaterialm_renderMaterial
 
bool m_isVisible
 true if mesh is shown, false if mesh is hidden
 
std::unordered_map< Renderer *, bool > m_renderDelegateCreated
 
- Protected Attributes inherited from imstk::Component
std::string m_name
 
std::weak_ptr< Entitym_entity
 Parent entity this component exists on.
 
- 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::TextVisualModel
enum  DisplayPosition {
  LowerLeft, UpperLeft, UpperRight, LowerRight,
  CenterCenter
}
 
- Public Types inherited from imstk::EventObject
using Observer = std::tuple< bool, std::weak_ptr< EventObject >, std::function< void(Event *)> >
 

Detailed Description

This implements a text on screen that will notify the user of the current state of the simulation. ie: If paused or not. It can be toggled on and off.

Definition at line 21 of file imstkSceneControlText.h.


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