You.i Engine
CYISDFAtlasTextSceneNode Class Reference

Detailed Description

A text scene node which renders text using signed distance fields.

This text node is ideal for situations where text is rotated, not at the default z-position, or has a scale animation applied to it.

This text node uses CYISDFTextAtlas.

#include <scenetree/YiSDFAtlasTextSceneNode.h>

Inheritance diagram for CYISDFAtlasTextSceneNode:

Public Member Functions

 CYISDFAtlasTextSceneNode ()
virtual ~CYISDFAtlasTextSceneNode ()
virtual YI_FLOAT_RECT_REL CalculateGlyphBox () override
virtual YI_FLOAT_RECT GetRectForTextRange (size_t startIndex, size_t endIndex, float horizontalPixelRatio, float verticalPixelRatio) override
void EnableApproximationShader ()
- Public Member Functions inherited from CYITextSceneNode
 CYITextSceneNode ()
virtual ~CYITextSceneNode ()
float GetTextWidth ()
float GetTextHeight ()
YI_FLOAT_RECT CalculateTightTextRect ()
void SetTextOffsetX (float textOffsetX)
void SetTextMaxWidth (float maxWidth)
bool SetFont (const CYIString &fontFamilyName, const CYIString &fontStyle, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetFontID (ssize_t fontID, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
bool SetFontFamily (const CYIString &fontFamilyName, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
bool SetFontStyle (const CYIString &fontStyleName, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetFontSize (int32_t fontSize, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetFontColor (const CYIColor &color, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetAllCaps (bool enable, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetScriptMode (CYITextEngine::ScriptMode scriptMode, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetBaselineShift (int32_t baselineShift, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetTracking (int32_t baselineShift, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetKerning (int32_t baselineShift, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetLeading (int32_t leading, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
void SetEllipses (bool enable)
void SetMaximumNumberOfLines (int32_t numberOfLines)
void SetAdjustsFontSizeToFit (bool adjustsFontSizeToFit)
void SetMinimumFontScale (float minimumFontScale)
void SetMultiline (bool enable)
virtual void SetSize (const glm::vec3 &size, bool dirtyLayout=true) override
void SetText (const CYIString &text)
void SetMarkedUpText (const CYIString &markedUpText, CYITextMarkupParser *pMarkupParser=nullptr, const CYICustomMarkupTagsProvider *pExternalTagsProvider=nullptr)
void SetXJustify (Justification xJustify)
void SetTrimmingMode (CYITextEngine::TrimmingMode trimmingMode)
CYITextEngine::TrimmingMode GetTrimmingMode () const
void SetPointTypeOn (int32_t width=0)
void SetBoxTypeOn (int32_t boxWidth, int32_t boxHeight)
void SetLineStyle (CYITextEngine::LineStyle textLineStyle, size_t firstCodepointIndex=0, size_t length=std::numeric_limits< size_t >::max())
float GetTextOffsetX () const
const CYIStringGetText () const
const CYIStringGetMarkedUpText () const
size_t GetLength () const
Justification GetXJustify () const
bool GetMultiline () const
bool GetEllipses () const
int32_t GetMaximumNumberOfLines () const
bool GetAdjustsFontSizeToFit () const
float GetMinimumFontScale () const
ssize_t GetFontID (size_t codepointIndex=0) const
const CYIStringGetFontFamily (size_t codepointIndex=0) const
const CYIStringGetFontStyle (size_t codepointIndex=0) const
size_t GetFontSize (size_t codepointIndex=0) const
const CYIColorGetFontColor (size_t codepointIndex=0) const
bool IsAllCaps (size_t codepointIndex=0) const
CYITextEngine::LineStyle GetLineStyle (size_t codepointIndex=0) const
int32_t GetLeading (size_t codepointIndex=0) const
CYITextEngine::ScriptMode GetScriptMode (size_t codepointIndex=0) const
int32_t GetBaselineShift (size_t codepointIndex=0) const
int32_t GetTracking (size_t codepointIndex=0) const
int32_t GetKerning (size_t codepointIndex=0) const
const std::vector< YI_TEXT_STYLE_DEF > & GetTextStyles () const
const YI_TEXT_STYLE_DEFGetTextStyle (size_t codepointIndex) const
void SetTextStyle (const YI_TEXT_STYLE_DEF &style, size_t firstCodepointIndex)
void SetTextStyles (const std::vector< YI_TEXT_STYLE_DEF > &styles)
void SetEllipsisStyle (const YI_TEXT_STYLE_DEF &style)
void ResetPerCharacterStyles ()
int32_t GetBoxWidth () const
int32_t GetBoxHeight () const
void SetUseFontTables (bool useFontTables)
bool IsUsingFontTables () const
bool IsBoxType () const
bool IsPointType () const
bool IsTruncated () const
CYITextLayout::TextDirection GetBaseTextDirection () const
CYITextLayout::TextDirection GetCharacterTextDirection (size_t characterIndex) const
bool IsCharacterRightToLeft (size_t characterIndex) const
bool IsBaseRightToLeft () const
CYITextEngine::PositionInString GetIndexOfPosition (float x, float y, float horizontalPixelRatio, float verticalPixelRatio)
CYITextEngine::PositionInString GetOffsetPosition (CYITextEngine::PositionInString initialPosition, int8_t offset)
void SetTextLayoutFactory (std::function< std::unique_ptr< CYITextLayout >()> textLayoutFactory)
virtual void Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override
virtual void ApplyMeasurements () override
float GetAdjustedFontSizeScale ()
- Public Member Functions inherited from CYISceneNode
 CYISceneNode ()
virtual ~CYISceneNode ()
virtual bool Init ()
bool IsInitialized () const
void ForceDirty ()
void SetDirtyFlag (DirtyFlag dirtyFlag)
DirtyFlag GetDirtyFlag () const
DirtyFlag GetPreviousDirtyFlag () const
const CYIStringGetName () const
CYIString GetUniqueName () const
void SetSceneManager (CYISceneManager *pSceneManager)
void SetName (const CYIString &name)
int32_t GetID () const
void SetID (int32_t id)
uint64_t GetUniqueID () const
bool AddChild (std::unique_ptr< CYISceneNode > pSceneNode)
bool AddChild (std::unique_ptr< CYISceneNode >, size_t index)
bool InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode)
std::unique_ptr< CYISceneNodeRemoveChild (CYISceneNode *pSceneNode)
bool ReorderChild (size_t fromIndex, size_t toIndex)
CYITransformGetTransform ()
CYISceneNodeGetParent () const
bool ChangeParent (CYISceneNode *pParent)
CYISceneNodeGetDrawParent () const
bool IsAncestorOf (const CYISceneNode *pNode) const
CYISceneManagerGetSceneManager () const
size_t GetChildCount () const
uint32_t GetChildCountRecursive () const
CYISceneNodeGetChild (size_t index) const
Iterator begin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
Iterator end (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rbegin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
ReverseIterator rend (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
CYISceneNodeGetChild (const CYIString &name) const
size_t GetDrawChildCount () const
CYISceneNodeGetDrawChild (size_t index) const
CYISceneNodeGetDrawChildByID (int32_t id) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetChild (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetChildren () const
template<class YI_SCENE_NODE_SUBCLASS >
std::list< YI_SCENE_NODE_SUBCLASS * > GetDrawChildren () const
size_t GetIndexOfChild (const CYISceneNode *pSceneNode) const
size_t GetIndexOfDrawChild (const CYISceneNode *pSceneNode) const
void Show ()
void Hide ()
void SetVisibility (bool visible)
void SetOpacity (float opacity)
float GetCompositeOpacity () const
float GetLocalOpacity () const
bool IsVisible () const
bool IsTrulyVisible () const
bool IsPerceptible () const
CYISceneNodeGetNode (CYIStringView name)
CYISceneNodeGetNode (CYIStringView name, const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNode (const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget)
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (CYIStringView name)
CYISceneNodeGetNode (const int32_t id)
CYISceneNodeGetNode (const int32_t id, const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeWithUniqueID (uint64_t uniqueID)
template<class YI_SCENE_NODE_SUBCLASS >
bool FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag)
std::list< CYISceneNode * > GetNodes (CYIStringView name)
std::list< CYISceneNode * > GetNodes (int32_t id)
std::list< CYISceneNode * > GetNodes (const CYIRuntimeTypeInfo &enforceClassType)
template<class YI_SCENE_NODE_SUBCLASS >
const YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1) const
template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS * GetNode (uint32_t targetMatchedNodeCount=1)
void SetMesh (const std::shared_ptr< CYIMesh > &pMesh)
bool SetNPatchBitmap (const std::shared_ptr< CYIBitmap > &pNPatchBitmap)
void ClearNPatch ()
void SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
void AddEffect (const std::shared_ptr< CYIEffect > &pEffect)
void RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect)
size_t GetEffectCount () const
const std::shared_ptr< CYIEffect > & GetEffect (size_t index) const
void ConnectEffectsToTimelines (const CYITimelineTrack *pTrack)
void AddMask (std::unique_ptr< CYIMask > pMask)
std::unique_ptr< CYIMaskRemoveMask (const CYIMask *pMask)
size_t GetMaskCount () const
const CYIMaskGetMask (size_t index) const
CYIMaskGetMask (size_t index)
const std::shared_ptr< CYIMesh > & GetMesh () const
const std::shared_ptr< CYIBitmap > & GetNPatchBitmap () const
size_t GetMaterialCount () const
const std::shared_ptr< CYIMaterial > & GetMaterial (size_t index=0) const
const std::shared_ptr< IYIUniformBufferObject > & GetShaderUniforms () const
void SetMeshTransform (const glm::mat4 &transform)
void DestroyChildren ()
glm::mat4 GetLocalTransform () const
glm::mat4 GetWorldTransform () const
bool Intersects (const CYISceneNode *pNode) const
void SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget)
const std::shared_ptr< CYIRenderTarget > & GetRenderTarget () const
virtual void OnPreBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList, std::vector< CYIAbstractCameraSceneNode *> *pDrawWithCameraList)
virtual void OnPostBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList)
const CYIAABBGetWorldAABB () const
const CYIAABBGetLocalAABB () const
void SetAnchorPoint (const glm::vec3 &anchorPoint)
void SetAnchorPoint (float x, float y, float z)
void SetAnchorPointX (float x)
void SetAnchorPointY (float y)
void SetAnchorPointZ (float z)
void SetPosition (const glm::vec3 &position)
void SetPosition (float x, float y, float z)
void SetPositionX (float x)
void SetPositionY (float y)
void SetPositionZ (float z)
void SetRotation (const glm::vec3 &rotation)
void SetRotation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetRotationX (float pitchDegrees)
void SetRotationY (float yawDegrees)
void SetRotationZ (float rollDegrees)
void SetOrientation (float pitchDegrees, float yawDegrees, float rollDegrees)
void SetOrientation (const glm::quat &orientation)
void SetScale (const glm::vec3 &scale)
void SetScale (float factorX, float factorY, float factorZ)
void SetScaleX (float factor)
void SetScaleY (float factor)
void SetScaleZ (float factor)
const glm::vec3 & GetPosition () const
const glm::vec3 & GetScale () const
const glm::vec3 & GetWorldScale () const
const glm::vec3 & GetWorldSurfaceScale () const
const glm::vec3 & GetRotation () const
const glm::quat & GetOrientation () const
const glm::vec3 & GetAnchorPoint () const
const glm::vec3 & GetSize () const
const glm::vec3 & GetInitialSize () const
void SetMeasuredSize (const glm::vec3 &measuredSize)
const glm::vec3 & GetMeasuredSize () const
void SetInternalCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
virtual void SetCustomTimelineValue (uint32_t trackID, const CYIVariant &value)
void SetClippingOn ()
void SetClippingOff ()
bool GetClipping () const
void SetClippingBox (const CYIAABB &worldBox)
const CYIAABBGetClippingBox () const
void StartPropertyAnimation (PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true)
void StopPropertyAnimation (PropertyAnimation::Type propType)
void UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent)
virtual bool BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
void UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const
bool IsBoundingBoxHit (const CYIRay &worldSpaceRay) const
bool IsMeshHit (const CYIRay &worldSpaceRay) const
void DumpTree () const
void StartCaptureKeyboardEvents ()
void StopCaptureKeyboardEvents ()
void StartCaptureTrackpadEvents ()
void StopCaptureTrackpadEvents ()
void StartCapturePointerEvents (uint8_t pointerID)
void StopCapturePointerEvents (uint8_t pointerID)
bool DrawBehindChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFrontOfChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawBehind (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool DrawInFront (CYISceneNode *pSceneNode, bool *pChanged=nullptr)
bool IsFocusRoot () const
void SetIsFocusRoot (bool isFocusRoot)
virtual void OnFocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void OnFocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual void FocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus)
virtual bool ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
void SetUseLocalTransformAndAlpha (bool use)
virtual CYIOptional< CYIStringViewGetProperty (CYIStringView propertyName) const override
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const
virtual std::map< CYIString, CYIStringGetProperties () const override
virtual void ForEachProperty (const std::function< void(const CYIString &, const CYIString &)> &action) const override
virtual bool HasProperties () const override
void SetProperty (const CYIString &propertyName, const CYIString &propertyValue)
std::shared_ptr< CYISceneNodeProxyGetSceneNodeProxy () const
void SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig)
const CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) const
CYILayoutConfigGetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate)
void SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState)
const CYILayoutStateGetLayoutState () const
CYILayoutStateGetLayoutState ()
void RequestLayout ()
LayoutDirtyFlag GetLayoutDirtyFlag () const
virtual void SetLayoutDirtyFlag (LayoutDirtyFlag flag)
virtual CYIAbstractCameraSceneNodeFindActiveCamera (const CYISceneNode *pTargetSceneNode=nullptr) const
CYIAccessibilityAttributes::Accessible GetAccessible () const
void SetAccessible (CYIAccessibilityAttributes::Accessible accessible)
const CYIAccessibilityAttributesGetAccessibilityAttributes () const
std::unique_ptr< CYIAccessibilityAttributesTakeAccessibilityAttributes ()
void SetAccessibilityAttributes (std::unique_ptr< CYIAccessibilityAttributes > pAttributes)
const CYIRenderableGetRenderable () const
template<typename T >
bool CanCastTo () const
CYIAdjustmentLayerSceneNode * GetLastAdjustmentLayer () const
- Public Member Functions inherited from CYIEventTarget
 CYIEventTarget ()
virtual ~CYIEventTarget ()
bool AddEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
bool RemoveEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble)
void SetSpecialTypeFlag (SpecialEventTargetType type)
void ClearSpecialTypeFlag (SpecialEventTargetType type)
SpecialEventTargetType GetSpecialTypes () const
const std::shared_ptr< CYIEventTargetProxy > & GetProxy () const
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 CYISignalHandler (const CYISignalHandler &signalHandler)
virtual ~CYISignalHandler ()
CYISignalHandleroperator= (const CYISignalHandler &signalHandler)
void MoveToThread (CYIThread *pThread)
 This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More...
CYIThreadHandle GetThreadAffinity () const
void SetThreadAffinity (const CYIThreadHandle &threadAffinity)
virtual bool IsConnected () const
virtual bool IsConnected (const CYISignalBase &signal) const
void Disconnect (CYISignalBase &signal)
void DisconnectFromAllSignals ()
- Public Member Functions inherited from CYIThread::Listener
 Listener ()
virtual ~Listener ()
virtual void OnThreadStarted (CYIThread *)
virtual void OnThreadTerminated (CYIThread *)
virtual void OnThreadFinished (CYIThread *)
- Public Member Functions inherited from IYIPropertiesSource
virtual ~IYIPropertiesSource ()=default
bool GetProperty (CYIStringView propertyName, CYIString *pValue) const

Protected Member Functions

virtual YI_FLOAT_RECT_REL CalculateGlyphBox (const YI_RECT_REL &boxRect) override
void GenerateTextMesh ()
virtual void PrepareToDraw () override
virtual void WorldSurfaceScaleUpdated () override
virtual void SpecializeTextRenderInfo (CYITextEngine::RenderInfo *pInfo) override
- Protected Member Functions inherited from CYITextSceneNode
const std::shared_ptr< const CYITextLayout > & GetTextLayout (const CYITextEngine::RenderInfo &textRenderInfo)
CYITextEngine::RenderInfo CreateTextRenderInfo ()
CYITextEngine::RenderInfo CreateTextRenderInfo (const YI_RECT_REL &textRect)
YI_FLOAT_RECT_REL CalculateGlyphBox (const CYITextLayout *pLayout, const YI_FLOAT_RECT_REL &layoutRect) const
virtual void WorldBoundingBoxUpdated () override
virtual void UpdateEnd () override
virtual CYIString GetDumpTreeString () const override
void SetTextDirty ()
virtual void UpdateTextRect ()
- Protected Member Functions inherited from CYISceneNode
void Update ()
virtual void OnUpdateBegin ()
virtual void UpdateBegin ()
virtual void OnUpdateEnd ()
virtual void OnDirtyFlagChanged ()
virtual void DirtyFlagChanged ()
virtual void OnTransformUpdated ()
virtual void TransformUpdated ()
virtual void OnWorldScaleUpdated ()
virtual void WorldScaleUpdated ()
virtual void OnWorldSurfaceScaleUpdated ()
virtual void OnVisibilityUpdated ()
virtual void VisibilityUpdated ()
virtual void OnCompositeOpacityUpdated ()
virtual void CompositeOpacityUpdated ()
virtual void OnWorldBoundingBoxUpdated ()
virtual void OnLocalBoundingBoxUpdated ()
virtual void LocalBoundingBoxUpdated ()
virtual void OnChildAdded (CYISceneNode *pChild)
virtual void ChildAdded (CYISceneNode *pChild)
virtual void OnChildRemoved (CYISceneNode *pChild)
virtual void ChildRemoved (CYISceneNode *pChild)
virtual void OnSizeChanged ()
virtual void SizeChanged ()
virtual void ChildNeedsLayout ()
virtual void LayoutDirtied ()
virtual void OnChildVisibilityChanged (CYISceneNode *pChild)
virtual void ChildVisibilityChanged (CYISceneNode *pChild)
virtual void OnDrawOrderChanged ()
virtual bool ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
LayoutDirtyFlag GetCurrentLayoutDirtyFlag () const
void DumpTree (int32_t indentLevel) const
virtual void SetCustomUniforms ()
template<class T >
void SetNodeType ()
virtual CYISceneNodeGetNodeFromChildren (CYIStringView name)
virtual CYISceneNodeGetNodeFromChildren (const int32_t id)
virtual CYISceneNodeGetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType)
CYISceneNodeGetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget)

Additional Inherited Members

- Public Types inherited from CYITextSceneNode
enum  Justification : uint8_t {
  Justification::Left = 0,
- Public Types inherited from CYISceneNode
enum  LayoutDirtyFlag : uint8_t {
enum  LayoutConfigFetchMode {
  LayoutConfigFetchMode::DoNotLazyInstantiate = 0,
enum  MeasureMode {
enum  FetchType {
  FetchType::Optional = 0,
typedef std::reverse_iterator< IteratorReverseIterator
typedef uint16_t DirtyFlag
- Public Types inherited from CYIEventTarget
enum  SpecialEventTargetType : uint8_t {
  SpecialEventTargetType::None = 0x00,
  SpecialEventTargetType::NoPick = 0x20
enum  Phase : uint8_t {
- Static Public Member Functions inherited from CYISceneNode
static void RegisterAllSceneNodes ()
- Public Attributes inherited from CYISceneNode
CYISignal< CYISceneNode *, PropertyAnimation::TypePropertyAnimationComplete
CYISignal< CYISceneNode *, CYISceneNode *> DescendantGainedFocus
 Emitted when focus has entered this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantLostFocus
 Emitted when focus has left this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYISceneNode *, CYISceneNode *> DescendantsChangedFocus
 Emitted when focus has changed within this tree. This signal is called only if focus was previously within this tree and focus is now on a different node (but still within this tree). The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More...
CYISignal< CYIAccessibilityAttributes::AccessibleAccessibleStateChanged
 Emitted when accessible state changed. More...
- Static Public Attributes inherited from CYISceneNode
static constexpr DirtyFlag DirtyClean = 0x0000
static constexpr DirtyFlag DirtySceneGraph = 0x0001
static constexpr DirtyFlag DirtyVisibility = 0x0002
static constexpr DirtyFlag DirtyOpacity = 0x0004
static constexpr DirtyFlag DirtyLocalTransform = 0x0008
static constexpr DirtyFlag DirtyWorldTransform = 0x0010
static constexpr DirtyFlag DirtyUniform = 0x0020
static constexpr DirtyFlag DirtyWorldBoundingBox = 0x0040
static constexpr DirtyFlag DirtyMesh = 0x0080
static constexpr DirtyFlag DirtyWorldSurfaceScale = 0x0100
static constexpr DirtyFlag DirtyWorldScale = 0x0200
static constexpr DirtyFlag DirtyLocalBoundingBox = 0x0400
static constexpr DirtyFlag DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox)
- Static Protected Member Functions inherited from CYITextSceneNode
static bool HasAllCaps (const YI_TEXT_DEF &textDef)
static void UpdateTextForAllCaps (const YI_TEXT_DEF &textDef, CYIString &text)
- Protected Attributes inherited from CYITextSceneNode
CYIString m_markedUpText
YI_RECT_REL m_LayoutRect
YI_RECT_REL m_MeasuredBoxRect
YI_RECT_REL m_PreferredBoxRect
float m_textMaxWidth
bool m_textBufferDirty
bool m_isBoxType
bool m_textRectDirty
bool m_usesFontTables
std::function< std::unique_ptr< CYITextLayout >)> m_textLayoutFactory
- Protected Attributes inherited from CYISceneNode
CYIString m_name
std::vector< std::unique_ptr< CYISceneNode > > m_children
std::vector< CYISceneNode * > m_drawChildren
std::map< CYIString, CYIString, std::less< void > > m_Properties
std::vector< std::shared_ptr< CYIEffect > > m_Effects
std::vector< std::unique_ptr< PropertyAnimation > > m_propertyAnimations
float m_localOpacity
std::unique_ptr< CYITransformm_pTransform
glm::vec3 m_size
glm::vec3 m_initialSize
glm::vec3 m_measuredSize
glm::vec3 m_vlsLastCollision
bool m_clip
bool m_localVisibility
int32_t m_id
uint64_t m_guid
std::unique_ptr< CYINPatch > m_pNPatch
std::shared_ptr< CYIBitmapm_pNPatchBitmap
std::shared_ptr< CYIRenderablem_pRenderable
- Protected Attributes inherited from CYIEventTarget
std::vector< EventListenerEntry > m_listeners
SpecialEventTargetType m_specialTypes
std::shared_ptr< CYIEventTargetProxym_pEventTargetProxy

Constructor & Destructor Documentation

◆ CYISDFAtlasTextSceneNode()

CYISDFAtlasTextSceneNode::CYISDFAtlasTextSceneNode ( )

◆ ~CYISDFAtlasTextSceneNode()

virtual CYISDFAtlasTextSceneNode::~CYISDFAtlasTextSceneNode ( )

Member Function Documentation

◆ CalculateGlyphBox() [1/2]

virtual YI_FLOAT_RECT_REL CYISDFAtlasTextSceneNode::CalculateGlyphBox ( )

Calculates a rectangle around the text. The rectangle is calculated using the glyph box of the individual characters. The height of that glyph box remains constant even if the specific characters renderered change, thus the height of the returned will remain constant so long as the number of lines in the rendered text does not increase. The rectangle is in local coordinate space.

With some characters or fonts, the rendered text may overflow the glyph box.

Reimplemented from CYITextSceneNode.

◆ CalculateGlyphBox() [2/2]

virtual YI_FLOAT_RECT_REL CYISDFAtlasTextSceneNode::CalculateGlyphBox ( const YI_RECT_REL boxRect)

Returns a tight fitting rectangle that describes the total size of the rendered glyphs including text with multiple lines. The boxRect is used to compute the glyph box size. The returned rectangle is in local space.

Reimplemented from CYITextSceneNode.

◆ EnableApproximationShader()

void CYISDFAtlasTextSceneNode::EnableApproximationShader ( )

Enables the use of the SDF approximation shader on this node.

◆ GenerateTextMesh()

void CYISDFAtlasTextSceneNode::GenerateTextMesh ( )

Prepares a mesh which will contain a quad for each glyph. This function can also render glyphs into an atlas if a required glyph isn't already there.

◆ GetRectForTextRange()

virtual YI_FLOAT_RECT CYISDFAtlasTextSceneNode::GetRectForTextRange ( size_t  startIndex,
size_t  endIndex,
float  horizontalPixelRatio,
float  verticalPixelRatio 

Get the rect surrounding characters from startIndex to endIndex for the cached layout of text that has been rendered.

For bidirectional text, the resulting rect will span the leftmost character, to the rightmost character, potentially also surrounding characters outside of the range of character indices.
If no text has been rendered, by calling RenderText previously, or invalid index values are passed then the rect will be set to 0 for all values.

Reimplemented from CYITextSceneNode.

◆ PrepareToDraw()

virtual void CYISDFAtlasTextSceneNode::PrepareToDraw ( )

Called when the bounds of the text have changed but before the text has been drawn. The work performed in this function is usually work that needs to be done in advance of rendering, such as creating a text mesh.

Implements CYITextSceneNode.

◆ SpecializeTextRenderInfo()

virtual void CYISDFAtlasTextSceneNode::SpecializeTextRenderInfo ( CYITextEngine::RenderInfo pInfo)

Adds implementation-specific data to pInfo.

Reimplemented from CYITextSceneNode.

◆ WorldSurfaceScaleUpdated()

virtual void CYISDFAtlasTextSceneNode::WorldSurfaceScaleUpdated ( )

Called by Update() when the transform update process is complete and only when the world surface scale has changed. Subclasses may overload this function to do post-processing.

The dirty flag will be cleared prior to calling this function to allow new dirty state to be recorded from this function. If querying information about the dirty state of the node, use GetPreviousDirtyFlag().
See also
Overrides must call the base class implementation.
See also

Reimplemented from CYITextSceneNode.

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