#include <renderable3dtextcomponent.h>
Public Member Functions | |
virtual void | getDependentComponents (std::vector< rtti::TypeInfo > &components) const override |
![]() | |
virtual const rtti::TypeInfo | getInstanceType () const =0 |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual bool | init (utility::ErrorState &errorState) |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
bool | mNormalize = true |
Property: 'Normalize' text is rendered at the origin with normalized bounds (-0.5,0.5) More... | |
EDepthMode | mDepthMode = EDepthMode::InheritFromBlendMode |
Property: 'DepthMode' how text is handled by z-buffer. More... | |
![]() | |
ResourcePtr< Font > | mFont |
Property: 'Font' that represents the style of the text. More... | |
std::string | mText |
Property: 'Text' to draw. More... | |
RGBColorFloat | mColor = { 1.0f, 1.0f, 1.0f } |
Property: 'TextColor' the color of the text. More... | |
![]() | |
bool | mVisible = true |
Property: 'Visible' if this object is rendered to target by the render service. More... | |
ResourcePtr< RenderLayer > | mLayer |
Property: 'Layer' the render layer assigned to this component. More... | |
std::vector< ResourcePtr< RenderTag > > | mTags |
Property: 'Tags' List of tags specifying the category this render component belongs to. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Resource part of the Renderable3DTextComponentInstance. Draws flat text in 3D space. Use this component when you want to render text at a specific location in the world Use the normalize toggle to render the text at the origin of the scene with a unit size of 1. When rendering in normalized mode the initial text is used to compute the normalization factor. This ensures that when changing text at runtime the size of the letters don't change as well. Use the Renderable2DTextComponent to draw text in screen (pixel) space with an orthographic camera.
3D text can only be rendered using the render service, similar to how 3D meshes are rendered. The text can be transformed, scaled and rotated. It's best to render 3D text using a perspective camera. The font size directly influences the size of the text unless normalization is turned on. When normalization is turned on the text is rendered centered on the origin with -0.5-0,5 bounds.
It is possible to cache multiple lines at once, where each line can be selected and drawn individually inside a render loop. This is useful when you want the same component to render multiple lines of text, removing the need to declare a component for each individual line. You cannot update or add a line of text when rendering a frame: inside the render loop. Only update or add new lines of text on update. You can however change the position and line of text to draw inside the render loop.
|
overridevirtual |
Get a list of all component types that this component is dependent on (i.e. must be initialized before this one)
components | the components this object depends on |
Reimplemented from Component.
EDepthMode mDepthMode = EDepthMode::InheritFromBlendMode |
Property: 'DepthMode' how text is handled by z-buffer.
bool mNormalize = true |
Property: 'Normalize' text is rendered at the origin with normalized bounds (-0.5,0.5)