An aspect responsible for rendering text textures and displaying them on a surface in the scene.
More...
|
|
| UIText () |
| | Constructs a new UIText aspect.
|
| |
| std::shared_ptr< BaseSimObjectAspect > | clone () const override |
| | Constructs a new UIText instance using this one as its blueprint.
|
| |
| void | onActivated () override |
| | Renders the initial text associated with this object once it becomes a part of the active scene.
|
| |
| std::string | getText () const |
| | Gets the actual text associated with this UIText object.
|
| |
| void | updateText (const std::string &newText) |
| | Updates the text rendered by this object.
|
| |
| void | updateColor (glm::u8vec4 newColour) |
| | Updates the color of the text rendered by this object.
|
| |
| void | updateScale (float scale) |
| | Updates the scale of this object.
|
| |
| void | updateFont (const std::string &textResourceName) |
| | Updates the font using which this object's text texture is rendered.
|
| |
| void | updateAnchor (glm::vec2 anchor) |
| | Updates the point considered this object's origin, where (0,0) represents the top left corner of the object and (1,1) represents its bottom right corner.
|
| |
|
virtual | ~BaseSimObjectAspect ()=default |
| | Destroys this object.
|
| |
| virtual void | simulationUpdate (uint32_t simStepMillis) |
| | Overriding this allows an aspect to respond to simulation updates.
|
| |
| virtual void | variableUpdate (uint32_t variableStepMillis) |
| | Overriding this allows an aspect to respond to variable updates.
|
| |
| bool | handleAction (const ActionData &actionData, const ActionDefinition &actionDefinition) override final |
| | Pipes an action received from the InputManager via our SimObject to all that action's handler methods on this aspect.
|
| |
| ViewportNode & | getLocalViewport () |
| | Returns the closest ancestor viewport to this node, if one exists (which it should, since this shouldn't be called until this aspect is attached to an active SimObject).
|
| |
|
| SignalTracker () |
| | Constructs a new SignalTracker object.
|
| |
| | SignalTracker (const SignalTracker &other) |
| | Constructs a new SignalTracker.
|
| |
| SignalTracker & | operator= (const SignalTracker &other) |
| | Copy assignment operator.
|
| |
| | SignalTracker (SignalTracker &&other) |
| | Moves resources from another SignalTracker into this one, invalidating them from the other.
|
| |
| SignalTracker & | operator= (SignalTracker &&other) |
| | Moves resources from another SignalTracker into this one, destroying this tracker's resources in the process.
|
| |
| void | connect (const std::string &theirSignal, const std::string &ourObserver, SignalTracker &other) |
| | Method that connects one of this objects SignalObservers to another tracker's Signal.
|
| |
|
|
glm::u8vec4 | mColor {0x00, 0x00, 0x00, 0xFF} |
| | The color associated with the text rendered by this object.
|
| |
|
std::shared_ptr< ToyMaker::TextFont > | mFont {} |
| | The font used to render the text texture used by this object.
|
| |
|
std::string | mText {} |
| | The text displayed by this object on its associated StaticModel surface.
|
| |
|
float | mScale { 1e-2 } |
| | The scale, relative to the texture's dimensions, with which the object is made.
|
| |
|
uint32_t | mMaxWidthPixels { 0 } |
| | The width, in pixels, a single line of text is rendered on before it is wrapped around to the next line in the text texture.
|
| |
|
glm::vec2 | mAnchor {0.f, 0.f} |
| | The point considered the origin of this object, where (0,0) represents the top left hand corner, and (1,1) the bottom right corner.
|
| |
|
|
| SimObjectAspect (int explicitlyInitializeMe) |
| |
|
| BaseSimObjectAspect (const BaseSimObjectAspect &other)=delete |
| |
|
| BaseSimObjectAspect (BaseSimObjectAspect &&other)=delete |
| |
| SimObject & | getSimObject () |
| | Returns the sim object that this aspect is attached to.
|
| |
| template<typename TComponent> |
| void | addComponent (const TComponent &component) |
| | Adds a component of some type to the underlying entity.
|
| |
| template<typename TComponent> |
| bool | hasComponent () |
| | Tests whether a component of some specific type is present on the object.
|
| |
| template<typename TComponent> |
| void | updateComponent (const TComponent &component) |
| | Updates the value of a component belonging to this object to a new one.
|
| |
| template<typename TComponent> |
| TComponent | getComponent (const float simulationProgress=1.f) const |
| | Gets the value of a component belonging to this object.
|
| |
| template<typename TComponent> |
| void | removeComponent () |
| | Removes a component of some type belonging to the underlying SimObject.
|
| |
| void | addAspect (const nlohmann::json &jsonAspectProperties) |
| | Adds a new aspect to the underlying SimObject constructed based on its properties in JSON.
|
| |
| void | addAspect (const BaseSimObjectAspect &aspect) |
| | Adds a new aspect to the underlying SimObject copied from an already existing aspect.
|
| |
| template<typename TSimObjectAspect> |
| bool | hasAspect () const |
| | Tests whether an aspect of a particular type is attached to the underlying SimObject.
|
| |
| bool | hasAspect (const std::string &aspectType) const |
| | Tests whether an aspect of a particular type is attached to the underlying SimObject.
|
| |
| template<typename TSimObjectAspect> |
| TSimObjectAspect & | getAspect () |
| | Gets an aspect of a particular type belonging to the underlying SimObject.
|
| |
| BaseSimObjectAspect & | getAspect (const std::string &aspectType) |
| | Gets (a base class reference to) an aspect of a particular type belonging to the underlying SimObject.
|
| |
| template<typename TSimObjectAspect> |
| void | removeAspect () |
| | Removes an aspect from the underlying SimObject.
|
| |
| void | addOrReplaceAspect (const BaseSimObjectAspect &aspect) |
| | Adds or replaces an aspect on the underlying SimObject with a new aspect constructed as a copy of another.
|
| |
| void | addOrReplaceAspect (const nlohmann::json &jsonAspectProperties) |
| | Adds or replaces an aspect on the underlying SimObject with a new aspect constructed from its JSON description.
|
| |
| std::weak_ptr< FixedActionBinding > | declareFixedActionBinding (const std::string &context, const std::string &action, std::function< bool(const ActionData &, const ActionDefinition &)>) |
| | Binds some method (or any function) present on this object to an action generated by the InputManager.
|
| |
| EntityID | getEntityID () const |
| | Gets the ID of the ECSWorld Entity belonging to our SimObject.
|
| |
| std::weak_ptr< ECSWorld > | getWorld () const |
| | Gets a weak reference to the ECSWorld to which our SimObject's entity belongs.
|
| |
| template<typename TSimObjectAspectDerived> |
| static void | registerAspect () |
| | Registers an implementation of an aspect with the SimSystem.
|
| |
An aspect responsible for rendering text textures and displaying them on a surface in the scene.