|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
#include <framework/script/annotation.h>
Public Member Functions | |
| void | activate () |
| Entity * | entity () const |
| const std::string & | label () const |
| void | setLabel (const std::string &value) |
| void | setText (const std::string &value) |
| void | setTitle (const std::string &value) |
| const std::string & | text () const |
| const std::string & | title () const |
| Public Member Functions inherited from visutwin::canvas::Script | |
| bool | enabled () const |
| virtual void | fixedUpdate (float fixedDt) |
| virtual void | initialize () |
| virtual void | postInitialize () |
| virtual void | postUpdate (float dt) |
| virtual void | update (float dt) |
| Public Member Functions inherited from visutwin::canvas::EventHandler | |
| template<typename... Args> | |
| EventHandler * | fire (const std::string &name, Args &&... args) |
| bool | hasEvent (const std::string &name) const |
| void | initEventHandler () |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandler * | off (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandler * | off (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr) |
| EventHandler * | offByHandle (EventHandle *handle) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | on (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | on (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| template<typename Callback> requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>) | |
| EventHandle * | once (const std::string &name, Callback &&callback, void *scope=nullptr) |
| EventHandle * | once (const std::string &name, HandleEventCallback callback, void *scope=nullptr) |
| virtual | ~EventHandler ()=default |
Static Public Member Functions | |
| static constexpr const char * | scriptName () |
Additional Inherited Members | |
| Protected Member Functions inherited from visutwin::canvas::Script | |
| Entity * | entity () const |
| Protected Member Functions inherited from visutwin::canvas::EventHandler | |
| EventHandle * | addCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false) |
A lightweight data script for creating interactive 3D annotations in a scene. This script only holds the annotation data (label, title, text) — all rendering and interaction is handled by an AnnotationManager listening for engine events.
Fires the following engine-level events:
Fires the following script-level events (listened to by AnnotationManager):
Definition at line 33 of file annotation.h.
| void visutwin::canvas::Annotation::activate | ( | ) |
Call after setting label/title/text to register with the AnnotationManager. Must be called explicitly because properties need to be set before registration (the hotspot texture is generated from the label at registration time).
Definition at line 12 of file annotation.cpp.
References visutwin::canvas::Entity::engine(), and entity().
|
inline |
Definition at line 71 of file script.h.
Referenced by activate(), and scriptName().
|
inline |
|
inlinestaticconstexpr |
Definition at line 36 of file annotation.h.
References entity().
|
inline |
Definition at line 42 of file annotation.h.
References visutwin::canvas::EventHandler::fire().
|
inline |
Definition at line 56 of file annotation.h.
References visutwin::canvas::EventHandler::fire().
|
inline |
Definition at line 49 of file annotation.h.
References visutwin::canvas::EventHandler::fire().
|
inline |
Definition at line 55 of file annotation.h.
Referenced by visutwin::canvas::AnnotationManager::handleClick().
|
inline |
Definition at line 48 of file annotation.h.
Referenced by visutwin::canvas::AnnotationManager::handleClick().