You.i Engine
CYISceneNode Class Reference

Detailed Description

A scene node is the base type for all nodes which are used by the scene manager; it is an integral part of You.i Engine and is used extensively by various parts of the framework.

The scene node is the base class for all visual elements in the framework; CYISceneView derives from this class and serves as the base class for all pre-built user interface components.

The CYISceneNode class exposes all the necessary functionality for handling input, signals, animation, and timeline updates. It also provides functions for obtaining information about scene position and size in in both local and world coordinates.

This class is the basis for constructing a scene tree. Given the nature of a node in tree based systems, nodes can be detached and placed anywhere in the scene tree. However, some nodes may have logical or visual dependencies on other nodes in the tree, and care must be taken when placing these nodes in other locations.

Masks and visual effects can be created manually or imported from After Effects; these types can be added to a scene node for use during rendering.

A scene node can also be rendered into a different render target for the purposes of off-screen rendering.

The tree structure describes a transformation stack, properties of parents are inherited into their children. Additionally a drawing order is specified that is usually equivalent to the transformation stack. CYISceneNode::DrawInFrontOfChildren, CYISceneNode::DrawBehindChildren, CYISceneNode::DrawInFront, and CYISceneNode::DrawBehind are used to modify the draw structure. Modifying this structure may be necessary in cases where a node must have its transforms relative to another node, but must not change the order in which it draws to the screen, such as when making use of the parenting feature in After Effects.

A draw list is then created based on this draw structure to represent the order in which the nodes will be drawn. For further information see the documentation provided for the above functions.

The scene tree employs a dirty flag mechanism for tracking changes to nodes during and across frames. However, users can call any getters on the node and rely on the data being correct even if the node is marked as dirty. This is because getters do just-in-time evaluation of properties if they have not already been calculated.

In circumstances where a node must be deleted in response to signals or events, it is advisable to use CYISceneNode::RequestDeletion to ensure that the node is deleted only at the end of the frame when all potential processing on it has completed.

CYISceneNode::RequestDeletion can also be used to delete nodes from another thread, but in general scene tree modifications should be done on the main thread as operations to the scene tree are not generally thread-safe.

Scene Node Specification

Type Labels Property Description
Comment interactive Optional Setting to 'off' prevents the capturing of events on layers
Comment placeholder Optional Setting to 'true' prevents export by the You.i Engine After Effects Plug-in.
Comment accessible Optional Enabling or disabling the accessibility
Comment accessibilityLabel Optional Setting the accessibility label
Comment accessibilityHint Optional Setting the accessibility hint
Comment accessibilityRole Optional Setting the accessibility role

#include <scenetree/YiSceneNode.h>

Inheritance diagram for CYISceneNode:

Classes

class  Iterator
 
struct  MeasureSpec
 
class  PropertyAnimation
 Class representing a node property animation. More...
 

Public Types

enum  LayoutDirtyFlag : uint8_t {
  LayoutDirtyFlag::Clean,
  LayoutDirtyFlag::ChildDirty,
  LayoutDirtyFlag::Dirty
}
 
enum  LayoutConfigFetchMode {
  LayoutConfigFetchMode::DoNotLazyInstantiate = 0,
  LayoutConfigFetchMode::LazyInstantiate
}
 
enum  MeasureMode {
  MeasureMode::Unspecified,
  MeasureMode::UpTo,
  MeasureMode::Exactly
}
 
enum  FetchType {
  FetchType::Optional = 0,
  FetchType::Mandatory
}
 
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 {
  Phase::Bubble,
  Phase::Capture
}
 

Public Member Functions

 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
 
virtual void SetSize (const glm::vec3 &size, bool dirtyLayout=true)
 
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 void Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec)
 
virtual void ApplyMeasurements ()
 
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
 

Static Public Member Functions

static void RegisterAllSceneNodes ()
 

Public Attributes

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

static const float OPACITY_NOT_VISIBLE_EPSILON
 
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)
 

Protected Member Functions

void Update ()
 
virtual void OnUpdateBegin ()
 
virtual void UpdateBegin ()
 
virtual void OnUpdateEnd ()
 
virtual void UpdateEnd ()
 
virtual void OnDirtyFlagChanged ()
 
virtual void DirtyFlagChanged ()
 
virtual void OnTransformUpdated ()
 
virtual void TransformUpdated ()
 
virtual void OnWorldScaleUpdated ()
 
virtual void WorldScaleUpdated ()
 
virtual void OnWorldSurfaceScaleUpdated ()
 
virtual void WorldSurfaceScaleUpdated ()
 
virtual void OnVisibilityUpdated ()
 
virtual void VisibilityUpdated ()
 
virtual void OnCompositeOpacityUpdated ()
 
virtual void CompositeOpacityUpdated ()
 
virtual void OnWorldBoundingBoxUpdated ()
 
virtual void WorldBoundingBoxUpdated ()
 
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
 
virtual CYIString GetDumpTreeString () 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)
 

Protected Attributes

CYIString m_name
 
CYISceneNodem_pParent
 
CYISceneNodem_pDrawParent
 
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
 

Friends

class CYISceneManager
 
class UnitTestSetupHelper
 

Member Typedef Documentation

◆ DirtyFlag

typedef uint16_t CYISceneNode::DirtyFlag

◆ ReverseIterator

typedef std::reverse_iterator<Iterator> CYISceneNode::ReverseIterator

Member Enumeration Documentation

◆ FetchType

Used in CYISceneNode::FindNode or CYISceneView::FindTimeline to specify whether the search target is mandatory (meaning an error will be logged if it is not found), or optional.

Enumerator
Optional 

This node or timeline is optional, no logging occurs if it is not found.

Mandatory 

The node or timeline is mandatory, an error will be logged if it is not found.

◆ LayoutConfigFetchMode

Enumerator
DoNotLazyInstantiate 

Indicates that a CYILayoutConfig object instance should not automatically be created if one does not exist already.

LazyInstantiate 

Indicates that a CYILayoutConfig object instance should automatically be created and assigned if one does not exist already.

◆ LayoutDirtyFlag

enum CYISceneNode::LayoutDirtyFlag : uint8_t
strong
Enumerator
Clean 

Indicates that this node (and all of its children) do not require a re-layout.

ChildDirty 

Indicates that this node does not require a re-layout, but one or more of its children does.

Dirty 

Indicates that this node requires a re-layout.

◆ MeasureMode

Enumerator
Unspecified 

Indicates that the measure size is unspecified (and thus the size can be anything)

UpTo 

Indicates that the size can be up to the provided measure size.

Exactly 

Indicates that the size should be exactly the provided measure size (if possible).

Constructor & Destructor Documentation

◆ CYISceneNode()

CYISceneNode::CYISceneNode ( )

◆ ~CYISceneNode()

virtual CYISceneNode::~CYISceneNode ( )
virtual

Member Function Documentation

◆ AddChild() [1/2]

bool CYISceneNode::AddChild ( std::unique_ptr< CYISceneNode pSceneNode)

Adds a child to this node.

By default the child will be pushed at the end of the child list meaning that it will be drawn over top of its siblings.

The function will return false if the pSceneNode already has a parent or if pSceneNode is this node.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ AddChild() [2/2]

bool CYISceneNode::AddChild ( std::unique_ptr< CYISceneNode ,
size_t  index 
)

Adds a child to this node.

The child will be added at index into the child list.

The function will return false if the pSceneNode already has a parent or if pSceneNode is this node.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ AddEffect()

void CYISceneNode::AddEffect ( const std::shared_ptr< CYIEffect > &  pEffect)

Adds an effect to this node. If pEffect is null it will be ignored. Effects are processed during the construction of the draw list.

◆ AddMask()

void CYISceneNode::AddMask ( std::unique_ptr< CYIMask pMask)

Adds a mask to this node. If pMask is null it will be ignored. Masks are processed during the construction of the draw list.

Note
This node takes ownership of pMask.

◆ ApplyMeasurements()

virtual void CYISceneNode::ApplyMeasurements ( )
virtual

Applies the measured sizes of this node's children.

Note
Typically, if ApplyMeasurements is overridden then Measure must also be overridden.
Measurements should be applied before calculating position for layout.
Warning
Subclasses that override this function must ensure that the ApplyMeasurements function of ALL children of this scene node is called.
Note
Subclasses that override this function should make use of the GetCurrentLayoutDirtyFlag() function (rather than GetLayoutDirtyFlag() ).

Reimplemented in CYIScrollingView, CYITextSceneNode, CYISceneView, CYIImageView, and CYIListView.

◆ begin()

Iterator CYISceneNode::begin ( Iterator::Mode  mode = Iterator::Mode::ImmediateChildren) const

Returns the iterator to the first node in the iteration sequence.

◆ BroadcastEvent()

virtual bool CYISceneNode::BroadcastEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 
)
virtual

Recursively broadcasts an event to the node's children, then offers it to the node itself.

Reimplemented in CYIScrollingView.

◆ CanCastTo()

template<typename T >
bool CYISceneNode::CanCastTo ( ) const

Returns true if this object's type is T or a subtype of T.

Note
This is equivalent to using GetRuntimeTypeInfo().CanCastTo<T>(), but is optimized to run faster with certain built-in types such as scene views and cameras.

◆ ChangeParent()

bool CYISceneNode::ChangeParent ( CYISceneNode pParent)

Changes the pParent of this node and updates the former parent, to remove this node as a child. By default this node will be pushed at the end of the child list of the new parent meaning that it will be drawn over top of its new siblings. Returns true if the node's parent has been changed.

Note
If this node does not currently have a parent, this function has no effect and false is returned.
Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ ChildAdded()

virtual void CYISceneNode::ChildAdded ( CYISceneNode pChild)
protectedvirtual

Called when a scene node is added to this node's children list.

Warning
Overrides must call the base class implementation.
See also
OnChildAdded()

Reimplemented in CYIScrollingView, and CYISceneView.

◆ ChildNeedsLayout()

virtual void CYISceneNode::ChildNeedsLayout ( )
protectedvirtual

Called when a child in this scene node's children hierarchy needs to be laid out.

Warning
Overrides must call the base class implementation.

Reimplemented in CYISceneView.

◆ ChildRemoved()

virtual void CYISceneNode::ChildRemoved ( CYISceneNode pChild)
protectedvirtual

Called when a scene node is removed from this node's children list.

Note
The scene node might be deleted immediately after this function is called (e.g. if a user called CYISceneNode::DestroyChildren )
Warning
Overrides must call the base class implementation.
See also
OnChildRemoved()

Reimplemented in CYIScrollingView, and CYISceneView.

◆ ChildVisibilityChanged()

virtual void CYISceneNode::ChildVisibilityChanged ( CYISceneNode pChild)
protectedvirtual

Called when the visibility of a child of this scene node has been modified.

Warning
Overrides must call the base class implementation.
See also
OnChildVisibilityChanged()

Reimplemented in CYISceneView.

◆ ClearNPatch()

void CYISceneNode::ClearNPatch ( )

Clears the NPatch data for this node.

◆ CompositeOpacityUpdated()

virtual void CYISceneNode::CompositeOpacityUpdated ( )
protectedvirtual

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

Warning
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
GetCompositeOpacity
Warning
Overrides must call the base class implementation.
See also
Update()
OnCompositeOpacityUpdated()

◆ ConnectEffectsToTimelines()

void CYISceneNode::ConnectEffectsToTimelines ( const CYITimelineTrack pTrack)

The provided pTrack will be used to drive the node's effects.

Note
This node does not take ownership of pTrack.

◆ ContainsFocusableDescendant()

virtual bool CYISceneNode::ContainsFocusableDescendant ( const CYIFocusSearchOptions options = CYIFocusSearchOptions()) const
virtual

Returns true if this node contains any descendants which can receive focus.

The default implementation returns true if CYISceneManager::CanBeFocused() returns true for any descendant and if those descendants are valid candidates according to options.

Reimplemented in CYIScrollingView, CYISceneView, and CYIFocusZoneView.

◆ DestroyChildren()

void CYISceneNode::DestroyChildren ( )

Recursively destroys the children of this node. Note that data will be deleted, this is not the same as remove.

◆ DirtyFlagChanged()

virtual void CYISceneNode::DirtyFlagChanged ( )
protectedvirtual

This hook provides subclasses a means to react to dirty state changes. When a node has its dirty flag changed, the callback will be triggered immediately on that node. If any upward or downward recursion is required as a result of the dirty flag change, the callbacks on those nodes will be triggered outward from this node, first in the parent direction then in the child direction.

Considering the following lineage:

A -> B -> C -> D -> E

When C's dirty flag is changed, the sequence of OnDirtyFlagChanged() calls (assuming all flags change) will be

C -> B -> A -> D -> E

Note
This hook is called immediately when the node is dirtied, not during Update().
This hook is not called when a dirty flag is 'cleared'.
Warning
Using SetDirtyFlag() within this function may cause another invocation of this function
See also
SetDirtyFlag(DirtyFlag)
Warning
Overrides must call the base class implementation.
See also
OnDirtyFlagChanged()

◆ DrawBehind()

bool CYISceneNode::DrawBehind ( CYISceneNode pSceneNode,
bool *  pChanged = nullptr 
)

This node is inserted into pSceneNode's parent's draw order behind pSceneNode. An optional bool changed is set to identify when the draw order changed.

Returns false if pSceneNode doesn't exist, if pSceneNode is this node, or if pSceneNode doesn't have a draw parent.

◆ DrawBehindChildren()

bool CYISceneNode::DrawBehindChildren ( CYISceneNode pSceneNode,
bool *  pChanged = nullptr 
)

This node is inserted into the draw order behind the other children of pSceneNode. An optional bool changed is set to identify when the draw order changed.

Returns false if pSceneNode doesn't exist, or if pSceneNode is this node.

◆ DrawInFront()

bool CYISceneNode::DrawInFront ( CYISceneNode pSceneNode,
bool *  pChanged = nullptr 
)

This node is inserted into pSceneNode's parent's draw order in front of pSceneNode. An optional bool changed is set to identify when the draw order changed.

Returns false if pSceneNode doesn't exist, if pSceneNode is this node, or if pSceneNode doesn't have a draw parent.

◆ DrawInFrontOfChildren()

bool CYISceneNode::DrawInFrontOfChildren ( CYISceneNode pSceneNode,
bool *  pChanged = nullptr 
)

This node is inserted into the draw order above the other children of pSceneNode. An optional bool changed is set to identify when the draw order changed.

Returns false if pSceneNode doesn't exist, or if pSceneNode is this node.

◆ DumpTree() [1/2]

void CYISceneNode::DumpTree ( ) const

Dumps an xml-formatted representation of this subtree to the console.

The log tag used is "CYISceneNode::DumpTree" at EYILogLevel::debug level. To see these logs in your application, ensure that debug level logs for this tag are enabled.

◆ DumpTree() [2/2]

void CYISceneNode::DumpTree ( int32_t  indentLevel) const
protected

indentLevel specifies the number of tabs (4 spaces) for this output level. This is a recursive call and indentLevel will be incremented automatically at each level so the output looks like a tree.

◆ end()

Iterator CYISceneNode::end ( Iterator::Mode  mode = Iterator::Mode::ImmediateChildren) const

Returns the position after the last node in the iteration sequence.

◆ FindActiveCamera()

virtual CYIAbstractCameraSceneNode* CYISceneNode::FindActiveCamera ( const CYISceneNode pTargetSceneNode = nullptr) const
virtual

The active camera is the last encountered visible child of this node which is also an enabled camera node. The order the children are encountered in is defined by the draw order.

Note
This method can be overridden to find the active camera based on the child node pTargetSceneNode. Otherwise this argument is not used.
See also
IsVisible()
CYIAbstractCameraSceneNode::IsEnabled()

Reimplemented in CYIScrollingView.

◆ FindNode()

template<class YI_SCENE_NODE_SUBCLASS >
bool CYISceneNode::FindNode ( YI_SCENE_NODE_SUBCLASS *&  pNode,
CYIStringView  nodeName,
FetchType  type,
const CYIString tag 
)

The node's descendants will be searched to locate a pNode with nodeName matching YI_SCENE_NODE_SUBCLASS.

Returns false if the node is not found or if it is not of type YI_SCENE_NODE_SUBCLASS.

Logs an error if type is CYISceneNode::FetchType::Mandatory and the node is not found. The provided tag will be used when logging.

See also
GetNode()

◆ FocusChangedInDescendants()

virtual void CYISceneNode::FocusChangedInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has changed within this tree. This function is called only if focus was previously within this tree and focus is now on a different node (but still within this tree).

Note
The base implementation must be called.
See also
OnFocusChangedInDescendants()

Reimplemented in CYIScrollingView, and CYIFocusZoneView.

◆ FocusGainedInDescendants()

virtual void CYISceneNode::FocusGainedInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has entered this tree.

Note
The base implementation must be called.
pPreviousNodeWithFocus may be null.
See also
OnFocusGainedInDescendants()

Reimplemented in CYIScrollingView, CYISceneView, and CYIFocusZoneView.

◆ FocusLostInDescendants()

virtual void CYISceneNode::FocusLostInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has left this tree.

Note
The base implementation must be called.
pPreviousNodeWithFocus may be null.
See also
OnFocusLostInDescendants

◆ ForceDirty()

void CYISceneNode::ForceDirty ( )

Fully dirties the node, triggering an update of its internal state.

All of the node's direct ancestors and descendants will be dirtied also.

Warning
This function is recursive.

◆ ForEachProperty()

virtual void CYISceneNode::ForEachProperty ( const std::function< void(const CYIString &, const CYIString &)> &  action) const
overridevirtual

Executes action for each property held by this object. Each property name and property value pair is passed to action.

Implements IYIPropertiesSource.

Reimplemented in CYISceneView.

◆ GetAccessibilityAttributes()

const CYIAccessibilityAttributes* CYISceneNode::GetAccessibilityAttributes ( ) const

Returns the accessibility attributes for this scene node. Even if there are no attributes available, buttons and text nodes will be treated as accessible nodes by the accessibility event dispatcher.

Note
A valid pointer will be returned only when accessibility attributes have been set, otherwise nullptr will be returned. For the CYIAbstractButton, the accessibility role was already set as the "Button", so it will return a valid pointer.
See also
SetAccessibilityAttributes()

◆ GetAccessible()

CYIAccessibilityAttributes::Accessible CYISceneNode::GetAccessible ( ) const

Returns the accessible state.

Button and Text nodes are accessible by default. CYIAccessibilityAttributes are in effect only when the node is accessible.

See also
SetAccessible()

◆ GetAnchorPoint()

const glm::vec3& CYISceneNode::GetAnchorPoint ( ) const

Get the anchor point for this node in its parent's space.

◆ GetChild() [1/3]

CYISceneNode* CYISceneNode::GetChild ( size_t  index) const

Returns the child of this node at index, or null if the index is invalid.

Note
This node retains ownership of the returned node.

◆ GetChild() [2/3]

CYISceneNode* CYISceneNode::GetChild ( const CYIString name) const

Returns the first encountered child named name or null if no such child exists.

Note
This node retains ownership of the returned node.

◆ GetChild() [3/3]

template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS* CYISceneNode::GetChild ( uint32_t  targetMatchedNodeCount = 1) const

If the node contains no children of type YI_SCENE_NODE_SUBCLASS, returns null.

If the node contains at least targetMatchedNodeCount children of type YI_SCENE_NODE_SUBCLASS, returns the child of that type who, in order of being encountered, matches targetMatchedNodeCount.

If the node contains fewer than targetMatchedNodeCount children of type YI_SCENE_NODE_SUBCLASS, returns the last encountered child.

Note
This node retains ownership of the returned node.

◆ GetChildCount()

size_t CYISceneNode::GetChildCount ( ) const

Returns the number of children.

◆ GetChildCountRecursive()

uint32_t CYISceneNode::GetChildCountRecursive ( ) const

Returns the total number of descendants of this node, including itself.

◆ GetChildren()

template<class YI_SCENE_NODE_SUBCLASS >
std::list<YI_SCENE_NODE_SUBCLASS *> CYISceneNode::GetChildren ( ) const

Returns a list of all children of type YI_SCENE_NODE_SUBCLASS.

Note
This node retains ownership of the returned nodes.

◆ GetClipping()

bool CYISceneNode::GetClipping ( ) const

Returns true if the node has clipping enabled, false otherwise.

◆ GetClippingBox()

const CYIAABB& CYISceneNode::GetClippingBox ( ) const

Returns the clipping volume for this node. The volume is specified in 3-dimensional world space but the clipping will be done in screen-space.

◆ GetCompositeOpacity()

float CYISceneNode::GetCompositeOpacity ( ) const

Returns the effective opacity for this node. A value of 0.0 means not visible, and a value of 1.0 means fully visible. This may differ from the value set by SetOpacity() if a parent of this node has transparency.

◆ GetCurrentLayoutDirtyFlag()

LayoutDirtyFlag CYISceneNode::GetCurrentLayoutDirtyFlag ( ) const
protected

Returns the (current) layout dirty flag for this scene node.

See also
GetLayoutDirtyFlag()

◆ GetDirtyFlag()

DirtyFlag CYISceneNode::GetDirtyFlag ( ) const

Returns the current dirty state of the node. Will return CYIScenNode::DirtyClean if the node is clean. This is the 'frame dirty' state, which is cleared only during the node's Update call.

◆ GetDrawChild()

CYISceneNode* CYISceneNode::GetDrawChild ( size_t  index) const

Returns the child, in the draw order, at index index.

Note
The caller does not obtain ownership of the returned node.

◆ GetDrawChildByID()

CYISceneNode* CYISceneNode::GetDrawChildByID ( int32_t  id) const

Returns the first child node in the draw order with the specified id, or null if no such child exists.

Note
The caller does not obtain ownership of the returned node.

◆ GetDrawChildCount()

size_t CYISceneNode::GetDrawChildCount ( ) const

Returns the total number of draw children of this node. Draw children are nodes, possibly parented to nodes other than this one, which are drawn when this node is drawn.

◆ GetDrawChildren()

template<class YI_SCENE_NODE_SUBCLASS >
std::list<YI_SCENE_NODE_SUBCLASS *> CYISceneNode::GetDrawChildren ( ) const

Returns a list of all children, in the draw order, of type YI_SCENE_NODE_SUBCLASS.

Note
This node retains ownership of the returned nodes.

◆ GetDrawParent()

CYISceneNode* CYISceneNode::GetDrawParent ( ) const

Returns the parent of this node, in the draw order. Returns null if this node is a draw root.

Note
The caller does not obtain ownership of the returned node.

◆ GetDumpTreeString()

virtual CYIString CYISceneNode::GetDumpTreeString ( ) const
protectedvirtual

Returns a string containing useful information about this node, displayed by DumpTree

Subclasses can implement this method to specify different or additional information. Appending to the default string is recommended.

See also
DumpTree()

Reimplemented in CYITextSceneNode, CYIAbstractCameraSceneNode, CYIPerspectiveCameraSceneNode, and CYIOrthographicCameraSceneNode.

◆ GetEffect()

const std::shared_ptr<CYIEffect>& CYISceneNode::GetEffect ( size_t  index) const

Returns the effect at index.

◆ GetEffectCount()

size_t CYISceneNode::GetEffectCount ( ) const

Returns the number of effects applied to this node.

◆ GetID()

int32_t CYISceneNode::GetID ( ) const

Returns the ID of this node.

IDs are more likely than names to uniquely identify nodes as they are configured during import. Names can be duplicated within a single view template, but IDs are uniquely assigned from the template.

It is always best practice to do scene tree search operations like GetNode from the most immediate ancestor of your likely candidate pool.

Warning
This ID is not globally unique to this node. For a globally unique ID, use GetUniqueID().
See also
GetUniqueID()

◆ GetIndexOfChild()

size_t CYISceneNode::GetIndexOfChild ( const CYISceneNode pSceneNode) const

Returns the index of pSceneNode if it is a child of this node, otherwise returns std::numeric_limits<size_t>::max().

◆ GetIndexOfDrawChild()

size_t CYISceneNode::GetIndexOfDrawChild ( const CYISceneNode pSceneNode) const

Returns the draw index of pSceneNode if it is a child of this node, otherwise returns std::numeric_limits<size_t>::max().

Note
A lower index will be drawn before a higher index.

◆ GetInitialSize()

const glm::vec3& CYISceneNode::GetInitialSize ( ) const

Returns the size that this node had at initialization.

◆ GetLastAdjustmentLayer()

CYIAdjustmentLayerSceneNode* CYISceneNode::GetLastAdjustmentLayer ( ) const

Returns the adjustment layer child that is last drawn, or null.

◆ GetLayoutConfig() [1/2]

const CYILayoutConfig* CYISceneNode::GetLayoutConfig ( LayoutConfigFetchMode  fetchMode = LayoutConfigFetchMode::LazyInstantiate) const

Returns the layout config object assigned to this node. May be null.

Note
If fetchMode is CYISceneNode::LayoutConfigFetchMode::LazyInstantiate and no layout config object is currently assigned to this scene node, a new instance of CYILayoutConfig will be created, assigned to this object, and returned.
This node retains ownership of the returned layout config.

◆ GetLayoutConfig() [2/2]

CYILayoutConfig* CYISceneNode::GetLayoutConfig ( LayoutConfigFetchMode  fetchMode = LayoutConfigFetchMode::LazyInstantiate)

Returns the layout config object assigned to this node. May be null.

Note
If fetchMode is CYISceneNode::LayoutConfigFetchMode::LazyInstantiate and no layout config object is currently assigned to this scene node, a new instance of CYILayoutConfig will be created, assigned to this object, and returned.
This node retains ownership of the returned layout config.

◆ GetLayoutDirtyFlag()

LayoutDirtyFlag CYISceneNode::GetLayoutDirtyFlag ( ) const

Returns the (future) layout dirty flag for this scene node.

Note
Dirtying the layout affects the next layout pass. If this function is called during a layout pass, the dirty state is only updated for the following layout pass.
See also
GetCurrentLayoutDirtyFlag()

◆ GetLayoutState() [1/2]

const CYILayoutState* CYISceneNode::GetLayoutState ( ) const

Returns the layout state object assigned to this node. May be null.

Note
This node retains ownership of the returned layout config.

◆ GetLayoutState() [2/2]

CYILayoutState* CYISceneNode::GetLayoutState ( )

Returns the layout state object assigned to this node. May be null.

Note
This node retains ownership of the returned layout config.

◆ GetLocalAABB()

const CYIAABB& CYISceneNode::GetLocalAABB ( ) const

Returns the local axis-aligned bounding box for this node, encapsulating all of its children.

◆ GetLocalOpacity()

float CYISceneNode::GetLocalOpacity ( ) const

Returns the local opacity for this node. A value of 0.0 means not visible, and a value of 1.0 means fully visible.

Note that the effective opacity will be influenced by any ancestors of this node, this setting is for the local opacity of the node.

See also
GetCompositeOpacity()

◆ GetLocalTransform()

glm::mat4 CYISceneNode::GetLocalTransform ( ) const

Returns a matrix representing this node's local transform.

◆ GetMask() [1/2]

const CYIMask* CYISceneNode::GetMask ( size_t  index) const

Returns the mask at index.

◆ GetMask() [2/2]

CYIMask* CYISceneNode::GetMask ( size_t  index)

Returns a mutable mask effect.

◆ GetMaskCount()

size_t CYISceneNode::GetMaskCount ( ) const

Returns the number of masks on this node.

◆ GetMaterial()

const std::shared_ptr<CYIMaterial>& CYISceneNode::GetMaterial ( size_t  index = 0) const

Returns the material of this node at index.

◆ GetMaterialCount()

size_t CYISceneNode::GetMaterialCount ( ) const

Returns the number of materials on this node.

◆ GetMeasuredSize()

const glm::vec3& CYISceneNode::GetMeasuredSize ( ) const

Returns the measured size of this node. The measured size of a scene node is calculated and stored by the Measure function. It is then used by the ApplyMeasurements function to set the size of the scene node. This is part of the layout system.

◆ GetMesh()

const std::shared_ptr<CYIMesh>& CYISceneNode::GetMesh ( ) const

Returns the node's mesh.

◆ GetName()

const CYIString& CYISceneNode::GetName ( ) const

Returns the name of this node.

See also
SetName

◆ GetNode() [1/8]

CYISceneNode* CYISceneNode::GetNode ( CYIStringView  name)

Recursively searches this subtree to find the first node matching the provided name. Does not include 'this.' When running in debug mode, the search continues after a match is found in order to log duplicate names.

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [2/8]

CYISceneNode* CYISceneNode::GetNode ( CYIStringView  name,
const CYIRuntimeTypeInfo enforceClassType 
)

Recursively searches this subtree to find the first node matching the provided name and enforces the provided enforceClassType. Does not include 'this.'

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [3/8]

CYISceneNode* CYISceneNode::GetNode ( const CYIRuntimeTypeInfo enforceClassType)

Recursively searches this subtree to find the first node matching the class type provided.

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [4/8]

template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS* CYISceneNode::GetNode ( CYIStringView  name)

Recursively searches this subtree to find the first encountered node of name matching YI_SCENE_NODE_SUBCLASS. Does not include 'this.'

If the node contains no descendants of type YI_SCENE_NODE_SUBCLASS, returns null.

If the node contains no descendants with name name, returns null.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [5/8]

CYISceneNode* CYISceneNode::GetNode ( const int32_t  id)

Recursively searches this subtree to find the first encountered node with the provided id.

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [6/8]

CYISceneNode* CYISceneNode::GetNode ( const int32_t  id,
const CYIRuntimeTypeInfo enforceClassType 
)

Recursively searches this subtree to find the first encountered node with the provided id.

Returns null if the node does not match the provided enforceClassType, or is not present in this subtree.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [7/8]

template<class YI_SCENE_NODE_SUBCLASS >
const YI_SCENE_NODE_SUBCLASS* CYISceneNode::GetNode ( uint32_t  targetMatchedNodeCount = 1) const

Recursively searches this subtree, not including 'this.'

If the node contains no descendants of type YI_SCENE_NODE_SUBCLASS, returns null.

If the node contains at least targetMatchedNodeCount descendants of type YI_SCENE_NODE_SUBCLASS, returns the descendant of that type who, in order of being encountered, matches targetMatchedNodeCount.

If the node contains fewer than targetMatchedNodeCount descendants of type YI_SCENE_NODE_SUBCLASS, returns null.

Note
The caller does not obtain ownership of the returned node.

◆ GetNode() [8/8]

template<class YI_SCENE_NODE_SUBCLASS >
YI_SCENE_NODE_SUBCLASS* CYISceneNode::GetNode ( uint32_t  targetMatchedNodeCount = 1)

◆ GetNodeAfterTarget()

CYISceneNode* CYISceneNode::GetNodeAfterTarget ( const CYIRuntimeTypeInfo enforceClassType,
CYISceneNode pStartAfterTarget 
)

Recursively searches this subtree to find the first node matching the class type provided.

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.

◆ GetNodeFromChildren() [1/3]

virtual CYISceneNode* CYISceneNode::GetNodeFromChildren ( CYIStringView  name)
protectedvirtual

Finds and returns the node with the provided name, searching the children of this node using a modified pre-order depth-first algorithm. All children are searched before their own children are searched. This node isn't checked.

◆ GetNodeFromChildren() [2/3]

virtual CYISceneNode* CYISceneNode::GetNodeFromChildren ( const int32_t  id)
protectedvirtual

Finds and returns the node with the provided ID, searching the children of this node using a modified pre-order depth-first algorithm. All children are searched before their own children are searched. This node isn't checked.

◆ GetNodeFromChildren() [3/3]

virtual CYISceneNode* CYISceneNode::GetNodeFromChildren ( const CYIRuntimeTypeInfo enforceClassType)
protectedvirtual

Finds and returns the node with the provided class type, searching the children of this node using a modified pre-order depth-first algorithm. All children are searched before their own children are searched. This node isn't checked.

◆ GetNodeFromChildrenAfterTarget()

CYISceneNode* CYISceneNode::GetNodeFromChildrenAfterTarget ( const CYIRuntimeTypeInfo enforceClassType,
bool *  pTargetReached,
CYISceneNode pStartAfterTarget 
)
protected

Finds and returns the node with the provided class type, searching the children of this node using a modified pre-order depth-first algorithm. All children are searched before their own children are searched. This node isn't checked. The node returned will be the first node encountered after pStartAfterTarget, or null if no candidates exist after the target.

◆ GetNodes() [1/3]

std::list<CYISceneNode *> CYISceneNode::GetNodes ( CYIStringView  name)

Recursively searches this subtree to return a list of nodes matching the provided name. Does not include 'this.'

Returns an empty list if none found.

Note
The caller does not obtain ownership of the returned nodes.

◆ GetNodes() [2/3]

std::list<CYISceneNode *> CYISceneNode::GetNodes ( int32_t  id)

Recursively searches this subtree to return a list of nodes matching the provided id. Does not include 'this.'

Returns an empty list if none found.

Note
The caller does not obtain ownership of the returned nodes.

◆ GetNodes() [3/3]

std::list<CYISceneNode *> CYISceneNode::GetNodes ( const CYIRuntimeTypeInfo enforceClassType)

Recursively searches this subtree to return a list of nodes matching the provided enforceClassType. Does not include 'this.'

Returns an empty list if none found.

Note
The caller does not obtain ownership of the returned nodes.

◆ GetNodeWithUniqueID()

CYISceneNode* CYISceneNode::GetNodeWithUniqueID ( uint64_t  uniqueID)

Recursively searches this subtree to find the first encountered node with the provided uniqueID.

Returns null if none found.

Note
The caller does not obtain ownership of the returned node.
See also
GetUniqueID()

◆ GetNPatchBitmap()

const std::shared_ptr<CYIBitmap>& CYISceneNode::GetNPatchBitmap ( ) const

Returns the node's NPatch bitmap. This should match a bitmap in the material of the node.

◆ GetOrientation()

const glm::quat& CYISceneNode::GetOrientation ( ) const

Get the orientation for this node, represented as a quaternion, in its parent's space.

◆ GetParent()

CYISceneNode* CYISceneNode::GetParent ( ) const

Returns the parent of this node, or null if this node is a root.

Note
The caller does not obtain ownership of the returned node.

◆ GetPosition()

const glm::vec3& CYISceneNode::GetPosition ( ) const

Returns the position of the node in its parent's space.

◆ GetPreviousDirtyFlag()

DirtyFlag CYISceneNode::GetPreviousDirtyFlag ( ) const

Returns the previous dirty state of the node before update is called.

At the start of an update, the current dirty flag will be reset in order to record new dirty information from any user callback.

See also
CYISceneNode::Update()

◆ GetProperties()

virtual std::map<CYIString, CYIString> CYISceneNode::GetProperties ( ) const
overridevirtual

Returns the map of all available properties.

Implements IYIPropertiesSource.

Reimplemented in CYISceneView.

◆ GetProperty() [1/2]

virtual CYIOptional<CYIStringView> CYISceneNode::GetProperty ( CYIStringView  propertyName) const
overridevirtual

Returns the value of the property identified by propertyName, or an empty optional if the property does not exist.

Note
The returned string view may become invalid if new properties are subsequently added to (or removed from) the properties source.

Implements IYIPropertiesSource.

Reimplemented in CYISceneView.

◆ GetProperty() [2/2]

bool CYISceneNode::GetProperty ( CYIStringView  propertyName,
CYIString pValue 
) const
Deprecated:
This function is deprecated and may be removed in a future release. IYIPropertiesSource::GetProperty(CYIStringView) const should be used instead.

Stores the value of a property specified by propertyName into pValue. Returns false if the property cannot be found.

◆ GetRenderable()

const CYIRenderable* CYISceneNode::GetRenderable ( ) const

Gets the CYIRenderable associated with this node.

See also
CYIRenderable

◆ GetRenderTarget()

const std::shared_ptr<CYIRenderTarget>& CYISceneNode::GetRenderTarget ( ) const

Returns the render target for this node.

◆ GetRotation()

const glm::vec3& CYISceneNode::GetRotation ( ) const

Returns the rotation of the node in its parent's space in degrees.

◆ GetScale()

const glm::vec3& CYISceneNode::GetScale ( ) const

Get the scale of the node in its parent's space.

◆ GetSceneManager()

CYISceneManager* CYISceneNode::GetSceneManager ( ) const

Returns the scene manager associated with this node.

◆ GetSceneNodeProxy()

std::shared_ptr<CYISceneNodeProxy> CYISceneNode::GetSceneNodeProxy ( ) const

Returns the scene node's proxy tracking object. If the scene node is deleted, the proxy will turn into a no-op to prevent a segmentation fault.

See also
CYIEventTarget::GetProxy

◆ GetShaderUniforms()

const std::shared_ptr<IYIUniformBufferObject>& CYISceneNode::GetShaderUniforms ( ) const

Returns the shader uniforms that will be used for rendering this node.

◆ GetSize()

const glm::vec3& CYISceneNode::GetSize ( ) const

Returns the size of this node.

◆ GetTransform()

CYITransform* CYISceneNode::GetTransform ( )
inline

◆ GetUniqueID()

uint64_t CYISceneNode::GetUniqueID ( ) const

Returns the unique ID of this node.

This ID is globally unique but won't persist over multiple sessions. It is independent from the timeline unique ID, accessed through CYIAbstractTimeline::GetUniqueID. A scene node and timeline may have the same unique ID, but these are unrelated.

◆ GetUniqueName()

CYIString CYISceneNode::GetUniqueName ( ) const

Returns a globally unique name for this node. This is a concatenation of the node's name and unique ID ('<name>-<unique id>').

See also
GetName
GetUniqueID

◆ GetWorldAABB()

const CYIAABB& CYISceneNode::GetWorldAABB ( ) const

Returns the world axis-aligned bounding box for this node, encapsulating all of its children.

◆ GetWorldScale()

const glm::vec3& CYISceneNode::GetWorldScale ( ) const

Returns the world scale of the node. This is the combined scales of this node and all of its ancestors.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ GetWorldSurfaceScale()

const glm::vec3& CYISceneNode::GetWorldSurfaceScale ( ) const

Returns the world surface scale of the node. This is the node's world scale multiplied by the render target's pixel ratios.

◆ GetWorldTransform()

glm::mat4 CYISceneNode::GetWorldTransform ( ) const

Returns a matrix representing this node's world transform. The world transform is a concatenation of the node's local transform with the local transforms of all of its ancestors.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ HasProperties()

virtual bool CYISceneNode::HasProperties ( ) const
overridevirtual

Returns true if this source contains at least one property.

Implements IYIPropertiesSource.

Reimplemented in CYISceneView.

◆ Hide()

void CYISceneNode::Hide ( )

Hides the node.

Note
Does not affect the local or composite opacity of the node.
See also
IsVisible()
SetVisibility(bool)

◆ Init()

virtual bool CYISceneNode::Init ( )
virtual

Initializes the scene node. Children of the scene node are also recursively initialized.

Subclasses must call CYISceneNode::Init.

Note
A CYISceneManager must be set on the node using SetSceneManager before the node can be initialized.
Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

Reimplemented in CYIScrollingView, CYIImageView, CYISceneView, CYITextEditView, CYIDrawerView, CYIEpgGridView, CYIListView, CYIImageSceneNode, CYIScrollBarView, CYIAbstractButtonView, CYIToggleButtonView, CYIFocusZoneView, CYIPageIndicatorView, CYIScrollingTextView, CYIVideoSurfaceView, CYIDecoratedView, CYIAbstractCameraSceneNode, CYIPlayerPreviewThumbnailView, CYIWebView, CYIPlatformView, CYIPushButtonView, CYIActivityIndicatorView, CYIPlayerTimePopupView, CYIProgressBarView, CYIStackView, CYIRadioGroupView, and CYIContentOverlay.

◆ InsertChildAfter()

bool CYISceneNode::InsertChildAfter ( CYISceneNode pRefNode,
std::unique_ptr< CYISceneNode pSceneNode 
)

Adds a child to this node. The pSceneNode will be added after pRefNode, if pRefNode is a child of this node.

The function will return false if the pSceneNode already has a parent, if pSceneNode is this node, or if pRefNode isn't a child of this node. If pRefNode isn't a child of this node, pSceneNode will be deleted.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ Intersects()

bool CYISceneNode::Intersects ( const CYISceneNode pNode) const

Returns true if this node's bounding box intersects the bounding box of the provided pNode. The bounding box comparisons are done in world space. If the provided pNode is not a member of the same scene as this node then the comparison is undefined.

◆ IsAncestorOf()

bool CYISceneNode::IsAncestorOf ( const CYISceneNode pNode) const

Returns whether this node is an ancestor of the specified node.

◆ IsBoundingBoxHit()

bool CYISceneNode::IsBoundingBoxHit ( const CYIRay worldSpaceRay) const

Checks whether the ray, specified in world space, will collide with our bounding box

Will also return false if the node is invisible due to opacity or visibility settings

◆ IsFocusRoot()

bool CYISceneNode::IsFocusRoot ( ) const

Returns true if this node is a focus root.

When focus enters a focus root, focus will be constrained to its descendants until: it is deleted, becomes hidden, is detached from the main tree, or if there are no focus candidates among its descendents.

When focus leaves a focus root focus returns to the last view that had focus in the parent focus root. If that view is no longer focusable another view in the parent focus root will be given focus. If no views in the parent focus root are focusable focus will leave that focus root. If there are no focusable views focus will be cleared.

By default the root of the scene tree is a focus root.

Warning
Configuring a node to be a focus root when one of its descendants already has focus may have undesirable effects. To avoid this focus roots should be configured at initialization with SetIsFocusRoot().

◆ IsInitialized()

bool CYISceneNode::IsInitialized ( ) const

Returns true if the scene node was initialized.

See also
Init

◆ IsMeshHit()

bool CYISceneNode::IsMeshHit ( const CYIRay worldSpaceRay) const

Checks whether the ray, specified in world space, will collide with our mesh

Will also return false if the node is invisible due to opacity or visibility settings

See also
CYIMesh

◆ IsPerceptible()

bool CYISceneNode::IsPerceptible ( ) const

Returns whether this node is perceptible, meaning that it IsTrulyVisible and it has a perceptible amount of composite opacity.

See also
IsTrulyVisible()
GetCompositeOpacity()

◆ IsTrulyVisible()

bool CYISceneNode::IsTrulyVisible ( ) const

Returns whether this node is truly visible, meaning that all of its ancestors and the node itself are visible.

Note
This does not consider the local or composite opacity of the node.
See also
IsVisible()
IsPerceptible()

◆ IsVisible()

bool CYISceneNode::IsVisible ( ) const

Returns true if this node is set to be visible. The node may return true but still be effectively invisible if one of its ancestors is hidden.

Note
This does not consider the local or composite opacity of the node.
See also
IsTrulyVisible()

◆ LayoutDirtied()

virtual void CYISceneNode::LayoutDirtied ( )
protectedvirtual

Called when the layout dirty flag of this scene node has been set to CYISceneNode::LayoutDirtyFlag::Dirty.

Warning
Overrides must call the base class implementation.

Reimplemented in CYISceneView.

◆ LocalBoundingBoxUpdated()

virtual void CYISceneNode::LocalBoundingBoxUpdated ( )
protectedvirtual

Called by Update() when the local bounding box update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().
Overrides must call the base class implementation.
See also
Update()
OnLocalBoundingBoxUpdated()

◆ Measure()

virtual void CYISceneNode::Measure ( const MeasureSpec widthSpec,
const MeasureSpec heightSpec,
const MeasureSpec depthSpec 
)
virtual

Measures this scene node, considering the layout configuration constraints (if available) and the provided measure specifications. The Measure function is used by the layout system to determine the 'desired' size of elements in a container. The result of calls to this function can be accessed through the GetMeasuredSize() function.

Note
The Measure function may be called multiple times on a single scene node during a layout pass.
The measure specs passed in must take in consideration the node's scale. For example, if a node is calling the Measure function on one of its children and that child has a scale of glm::vec3(1, 3, 1), then the size of heightSpec must be divided by 3.
The measured values may exceed the provided measure specifications if the specifications cannot be met given the constraints placed on this scene node. In other words, the constraints placed on this node have a higher priority than the provided measure specifications.
Warning
Subclasses that override this function must ensure that the Measure function of ALL children of this scene node is called at least once, even if those children are hidden.
Note
Typically, if Measure is overridden then ApplyMeasurements must also be overridden.
Subclasses that override this function should make use of the GetCurrentLayoutDirtyFlag() function (rather than GetLayoutDirtyFlag() ).

Reimplemented in CYIScrollingView, CYITextSceneNode, CYISceneView, CYIImageView, and CYIImageSceneNode.

◆ OnChildAdded()

virtual void CYISceneNode::OnChildAdded ( CYISceneNode pChild)
protectedvirtual

Called when a scene node is added to this node's children list.

◆ OnChildRemoved()

virtual void CYISceneNode::OnChildRemoved ( CYISceneNode pChild)
protectedvirtual

Called when a scene node is removed from this node's children list.

Note
The scene node might be deleted immediately after this function is called (e.g. if a user called CYISceneNode::DestroyChildren )

◆ OnChildVisibilityChanged()

virtual void CYISceneNode::OnChildVisibilityChanged ( CYISceneNode pChild)
protectedvirtual

Called when the visibility of a child of this scene node has been modified.

◆ OnCompositeOpacityUpdated()

virtual void CYISceneNode::OnCompositeOpacityUpdated ( )
protectedvirtual

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

Warning
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
GetCompositeOpacity

◆ OnDirtyFlagChanged()

virtual void CYISceneNode::OnDirtyFlagChanged ( )
protectedvirtual

This hook provides subclasses a means to react to dirty state changes. When a node has its dirty flag changed, the callback will be triggered immediately on that node. If any upward or downward recursion is required as a result of the dirty flag change, the callbacks on those nodes will be triggered outward from this node, first in the parent direction then in the child direction.

Considering the following lineage:

A -> B -> C -> D -> E

When C's dirty flag is changed, the sequence of OnDirtyFlagChanged() calls (assuming all flags change) will be

C -> B -> A -> D -> E

Note
This hook is called immediately when the node is dirtied, not during Update().
This hook is not called when a dirty flag is 'cleared'.
Warning
Using SetDirtyFlag() within this function may cause another invocation of this function
See also
SetDirtyFlag(DirtyFlag)

◆ OnDrawOrderChanged()

virtual void CYISceneNode::OnDrawOrderChanged ( )
protectedvirtual

Called when this scene node's draw order has been modified.

Reimplemented in CYIVideoSurfaceView.

◆ OnFocusChangedInDescendants()

virtual void CYISceneNode::OnFocusChangedInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has changed within this tree. This function is called only if focus was previously within this tree and focus is now on a different node (but still within this tree).

◆ OnFocusGainedInDescendants()

virtual void CYISceneNode::OnFocusGainedInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has entered this tree.

Note
pPreviousNodeWithFocus may be null.
See also
DescendantGainedFocus

◆ OnFocusLostInDescendants()

virtual void CYISceneNode::OnFocusLostInDescendants ( CYISceneNode pNewNodeWithFocus,
CYISceneNode pPreviousNodeWithFocus 
)
virtual

Called when focus has left this tree.

Note
pPreviousNodeWithFocus may be null.
See also
DescendantLostFocus

◆ OnLocalBoundingBoxUpdated()

virtual void CYISceneNode::OnLocalBoundingBoxUpdated ( )
protectedvirtual

Called by Update() when the local bounding box update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().

◆ OnPostBuildDrawList()

virtual void CYISceneNode::OnPostBuildDrawList ( std::vector< IYIRenderer::Command > *  pDrawList)
virtual

Optional method to allow subclasses to do operations after CYIRenderListBuilder::BuildDrawList.

This is called after CYIRenderListBuilder::BuildDrawList.

◆ OnPreBuildDrawList()

virtual void CYISceneNode::OnPreBuildDrawList ( std::vector< IYIRenderer::Command > *  pDrawList,
std::vector< CYIAbstractCameraSceneNode *> *  pDrawWithCameraList 
)
virtual

Optional method to allow subclasses to do operations prior to CYIRenderListBuilder::BuildDrawList. pDrawWithCameraList can be used to specify which camera(s) should be used for rendering.

This is called before CYIRenderListBuilder::BuildDrawList.

Reimplemented in CYIScrollingView.

◆ OnSizeChanged()

virtual void CYISceneNode::OnSizeChanged ( )
protectedvirtual

Called when the size of this scene node has been changed.

◆ OnTransformUpdated()

virtual void CYISceneNode::OnTransformUpdated ( )
protectedvirtual

Called by Update() when the transform update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().

◆ OnUpdateBegin()

virtual void CYISceneNode::OnUpdateBegin ( )
protectedvirtual

This hook provides subclasses a means to do operations prior to update. Any changes that dirty this node are applied immediately after this function returns.

◆ OnUpdateEnd()

virtual void CYISceneNode::OnUpdateEnd ( )
protectedvirtual

This hook provides subclasses a means to do operations subsequent to update. This hook is called after all children of the current node have been updated, and after all other update hooks have been called.

Warning
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().

◆ OnVisibilityUpdated()

virtual void CYISceneNode::OnVisibilityUpdated ( )
protectedvirtual

Called by Update() when the composite visibility of a class has been calculated. Subclasses may overload this function to do post-processing.

Warning
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().

◆ OnWorldBoundingBoxUpdated()

virtual void CYISceneNode::OnWorldBoundingBoxUpdated ( )
protectedvirtual

Called by Update() when the world bounding box update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().

◆ OnWorldScaleUpdated()

virtual void CYISceneNode::OnWorldScaleUpdated ( )
protectedvirtual

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

Warning
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
GetWorldScale

◆ OnWorldSurfaceScaleUpdated()

virtual void CYISceneNode::OnWorldSurfaceScaleUpdated ( )
protectedvirtual

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.

Warning
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
GetWorldSurfaceScale

◆ ProcessEvent()

virtual bool CYISceneNode::ProcessEvent ( const std::shared_ptr< CYIEventDispatcher > &  pDispatcher,
CYIEvent pEvent 
)
overrideprotectedvirtual

Notifies this event target of an incoming event. Calls all the relevant listeners based on event type and phase. Returns true if any of the listeners' handleEvent() function returned true.

Reimplemented from CYIEventTarget.

Reimplemented in CYISceneView.

◆ rbegin()

ReverseIterator CYISceneNode::rbegin ( Iterator::Mode  mode = Iterator::Mode::ImmediateChildren) const

Returns the reverse iterator to the last node in the iteration sequence.

◆ RegisterAllSceneNodes()

static void CYISceneNode::RegisterAllSceneNodes ( )
static

Called once by the framework to register all RTTI classes with the linker.

Should not be called.

◆ RemoveChild()

std::unique_ptr<CYISceneNode> CYISceneNode::RemoveChild ( CYISceneNode pSceneNode)

Removes the child from this node.

Will return null if the node is not a child of this node.

◆ RemoveEffect()

void CYISceneNode::RemoveEffect ( const std::shared_ptr< CYIEffect > &  pEffect)

Removes an effect from this node.

◆ RemoveMask()

std::unique_ptr<CYIMask> CYISceneNode::RemoveMask ( const CYIMask pMask)

Remove a mask from this node.

◆ rend()

Returns the reverse iterator to the position before the first node in the iteration sequence.

◆ ReorderChild()

bool CYISceneNode::ReorderChild ( size_t  fromIndex,
size_t  toIndex 
)

Moves the child present at index fromIndex to index toIndex.

Note
The toIndex parameter must represent an index within a children list where the item at index fromIndex has been removed. For example, given the children list 'A, B, C, D', if 'ReorderChid(0, 1) is called then the new children list would be 'B, A, C, D'.

Will return false if fromIndex or toIndex are not valid indices.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ RequestLayout()

void CYISceneNode::RequestLayout ( )

Marks this scene node as needing to be laid out. This is a convenience function equivalent to SetLayoutDirtyFlag(CYISceneNode::LayoutDirty).

◆ SetAccessibilityAttributes()

void CYISceneNode::SetAccessibilityAttributes ( std::unique_ptr< CYIAccessibilityAttributes pAttributes)

Sets the accessibility attributes for this scene node. It will be set when a node contains accessibility label, hint, and/or actions.

Note
Even if an accessibility attributes were set, the node will not be accessible until m_accessible is set to CYIAccessibilityAttributes::Accessible::Enabled.
See also
GetAccessibilityAttributes()

◆ SetAccessible()

void CYISceneNode::SetAccessible ( CYIAccessibilityAttributes::Accessible  accessible)

Sets the accessible state. It will emit the signal AccessibleStateChanged.

See also
GetAccessible()

◆ SetAnchorPoint() [1/2]

void CYISceneNode::SetAnchorPoint ( const glm::vec3 &  anchorPoint)

Sets the anchor point for this node. The anchor point is the point around which transformations will take place. The default anchor point is (0, 0, 0).

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ SetAnchorPoint() [2/2]

void CYISceneNode::SetAnchorPoint ( float  x,
float  y,
float  z 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetAnchorPointX()

void CYISceneNode::SetAnchorPointX ( float  x)

Sets the x-coordinate value for the anchor point.

◆ SetAnchorPointY()

void CYISceneNode::SetAnchorPointY ( float  y)

Sets the y-coordinate value for the anchor point.

◆ SetAnchorPointZ()

void CYISceneNode::SetAnchorPointZ ( float  z)

Sets the z-coordinate value for the anchor point.

◆ SetClippingBox()

void CYISceneNode::SetClippingBox ( const CYIAABB worldBox)

Sets the clipping volume for this node. The volume is specified in 3-dimensional world space but the clipping will be done in screen-space.

◆ SetClippingOff()

void CYISceneNode::SetClippingOff ( )

Disables 2D clipping for this node. Clipping is calculated based on the screen-space axis-aligned bounding box of this node.

◆ SetClippingOn()

void CYISceneNode::SetClippingOn ( )

Enables 2D clipping for this node. Clipping is calculated based on the screen-space axis-aligned bounding box of this node.

◆ SetCustomTimelineValue()

virtual void CYISceneNode::SetCustomTimelineValue ( uint32_t  trackID,
const CYIVariant value 
)
virtual

This function can be overridden to provide access for custom values when a timeline track is desired for controlling features other than internal existing functions in a scene node.

◆ SetCustomUniforms()

virtual void CYISceneNode::SetCustomUniforms ( )
protectedvirtual

Called by You.i Engine to prompt the scene node to configure any custom uniforms that a user would like to configure for their custom rendering pipeline. This should be overloaded in subclasses which wish to make use of custom shaders.

◆ SetDirtyFlag()

void CYISceneNode::SetDirtyFlag ( DirtyFlag  dirtyFlag)

This node's dirty flag will be set to dirtyFlag, and depending on the dirtyFlag the node's ancestors or descendants may also be dirtied.

Warning
This function can be recursive.

◆ SetID()

void CYISceneNode::SetID ( int32_t  id)

Sets the ID of this node.

See also
GetID()

◆ SetInternalCustomTimelineValue()

void CYISceneNode::SetInternalCustomTimelineValue ( uint32_t  trackID,
const CYIVariant value 
)

Allows custom values for effects or other internal expansions when a timeline track is desired for controlling features other than internal existing functions in a scene node.

◆ SetIsFocusRoot()

void CYISceneNode::SetIsFocusRoot ( bool  isFocusRoot)
See also
IsFocusRoot()

◆ SetLayoutConfig()

void CYISceneNode::SetLayoutConfig ( std::unique_ptr< CYILayoutConfig pLayoutConfig)

Sets the layout config of this scene node to pLayoutConfig.

If a layout config object had already been assigned, it will be deleted.

Note
Call with nullptr to remove an already-assigned layout config object.

◆ SetLayoutDirtyFlag()

virtual void CYISceneNode::SetLayoutDirtyFlag ( LayoutDirtyFlag  flag)
virtual

Sets the (future) layout dirty flag of this scene node to flag.

The 'layout dirty' flag may propagate up to the parent of this scene node. If flag is LayoutClean, only this node's flag is set. If flag is LayoutDirtyFlag::ChildDirty, the layout dirty flag of the parent node will be set to LayoutDirtyFlag::ChildDirty if it was previously LayoutClean. If flag is LayoutDirtyFlag::Dirty, the OnChildNeedsLayout function of the parent will be called (which itself may change the layout dirty flag of the parent)

The purpose of this relatively complex process is to implement this behaviour: if a node is being set as 'layout dirty', then its parent should also be 'layout dirty' if a layout is assigned to the parent. Otherwise, the parent should just be 'layout child dirty'.

Note
This function sets the layout dirty flag for the next layout pass. If this function is called during a layout pass, the layout dirty flag is set for the following layout pass.

◆ SetLayoutState()

void CYISceneNode::SetLayoutState ( std::unique_ptr< CYILayoutState pLayoutState)

Sets the layout state of this scene node to pLayoutState.

If a layout state object had already been assigned, it will be deleted.

Note
Call with nullptr to remove an already-assigned layout state object.

◆ SetMaterial()

void CYISceneNode::SetMaterial ( const std::shared_ptr< CYIMaterial > &  pMaterial,
size_t  index = 0 
)

Assigns a material to this node.

◆ SetMeasuredSize()

void CYISceneNode::SetMeasuredSize ( const glm::vec3 &  measuredSize)

Sets the measured size to measuredSize. The measured size is used by the ApplyMeasurements function to set the size of a scene node. This is part of the layout system.

◆ SetMesh()

void CYISceneNode::SetMesh ( const std::shared_ptr< CYIMesh > &  pMesh)

Assigns a mesh to this node.

◆ SetMeshTransform()

void CYISceneNode::SetMeshTransform ( const glm::mat4 &  transform)

Equivalent to GetMesh()->SetTransform().

◆ SetName()

void CYISceneNode::SetName ( const CYIString name)

Sets the name of this node. Nodes can be unnamed, and names can be re-used, so IDs should be used for situations in which confidence and control are required.

See also
GetID()

◆ SetNodeType()

template<class T >
void CYISceneNode::SetNodeType ( )
protected

Used to set the runtime type of this object to T.

Note
This function is for internal use only and will assert if called in user code.

◆ SetNPatchBitmap()

bool CYISceneNode::SetNPatchBitmap ( const std::shared_ptr< CYIBitmap > &  pNPatchBitmap)

Assigns an NPatch bitmap to this node. Returns false if pNPatchBitmap is not a valid NPatch bitmap.

◆ SetOpacity()

void CYISceneNode::SetOpacity ( float  opacity)

Sets the opacity for this node. A value of 0.0 means not visible, and a value of 1.0 means fully visible.

Note that the effective opacity will be influenced by any ancestors of this node, this setting is for the local opacity of the node.

See also
GetCompositeOpacity()
GetLocalOpacity()

◆ SetOrientation() [1/2]

void CYISceneNode::SetOrientation ( float  pitchDegrees,
float  yawDegrees,
float  rollDegrees 
)

Sets the orientation for this node as a set of euler angles (pitch, yaw, roll) in degrees.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ SetOrientation() [2/2]

void CYISceneNode::SetOrientation ( const glm::quat &  orientation)

Sets the orientation for this node as a quaternion.

◆ SetPosition() [1/2]

void CYISceneNode::SetPosition ( const glm::vec3 &  position)

Sets the position for this node. This position is relative to its parent.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ SetPosition() [2/2]

void CYISceneNode::SetPosition ( float  x,
float  y,
float  z 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetPositionX()

void CYISceneNode::SetPositionX ( float  x)

Sets the X position for this node. This position is relative to its parent.

◆ SetPositionY()

void CYISceneNode::SetPositionY ( float  y)

Sets the Y position for this node. This position is relative to its parent.

◆ SetPositionZ()

void CYISceneNode::SetPositionZ ( float  z)

Sets the Z position for this node. This position is relative to its parent.

◆ SetProperty()

void CYISceneNode::SetProperty ( const CYIString propertyName,
const CYIString propertyValue 
)

Sets a property value, given a name. If the property does not exist, it is added. If it exists, the value is replaced.

◆ SetRenderTarget()

void CYISceneNode::SetRenderTarget ( const std::shared_ptr< CYIRenderTarget > &  pRenderTarget)

Sets the render target for this node. This is the destination to which the node and all of its descendants will be rendered.

◆ SetRotation() [1/2]

void CYISceneNode::SetRotation ( const glm::vec3 &  rotation)

Sets the rotation for this node. The three components of the vector correspond to pitch, yaw, and roll, or rotations about the x, y and z axes in Euler degrees. Rotations are expressed clockwise.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ SetRotation() [2/2]

void CYISceneNode::SetRotation ( float  pitchDegrees,
float  yawDegrees,
float  rollDegrees 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetRotationX()

void CYISceneNode::SetRotationX ( float  pitchDegrees)

Sets the pitch for this node, in degrees.

◆ SetRotationY()

void CYISceneNode::SetRotationY ( float  yawDegrees)

Sets the yaw for this node, in degrees.

◆ SetRotationZ()

void CYISceneNode::SetRotationZ ( float  rollDegrees)

Sets the roll for this node, in degrees.

◆ SetScale() [1/2]

void CYISceneNode::SetScale ( const glm::vec3 &  scale)

Sets the scaling factor on all three axes.

Warning
The node must have an assigned CYISceneManager before this function can be called.
See also
SetSceneManager

◆ SetScale() [2/2]

void CYISceneNode::SetScale ( float  factorX,
float  factorY,
float  factorZ 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ SetScaleX()

void CYISceneNode::SetScaleX ( float  factor)

Sets the scaling factor on the x axis.

◆ SetScaleY()

void CYISceneNode::SetScaleY ( float  factor)

Sets the scaling factor on the y axis.

◆ SetScaleZ()

void CYISceneNode::SetScaleZ ( float  factor)

Sets the scaling factor on the z axis.

◆ SetSceneManager()

void CYISceneNode::SetSceneManager ( CYISceneManager pSceneManager)

Sets the node's scene manager.

Note
This node does not take ownership of pSceneManager.
Warning
CYISceneNodes must have an assigned CYISceneManager before use.

◆ SetSize()

virtual void CYISceneNode::SetSize ( const glm::vec3 &  size,
bool  dirtyLayout = true 
)
virtual

Sets the size of this node to size.

Note
Changing the size of a node may affect other properties of the node (such as the mesh size or the node's scale)
Subclasses that override this function must call the OnSizeChanged function if the size changed. Subclasses that override this function should dirty the layout if the size changed and dirtyLayout is true.

Reimplemented in CYITextSceneNode, CYIImageSceneNode, and CYIBitmapTextSceneNode.

◆ SetUseLocalTransformAndAlpha()

void CYISceneNode::SetUseLocalTransformAndAlpha ( bool  use)

If enabled, this node will use its local transform and local opacity when rendering. This is used for certain effects.

◆ SetVisibility()

void CYISceneNode::SetVisibility ( bool  visible)

Sets the node's visibility to visible.

Note
Does not affect the local or composite opacity of the node.
See also
IsVisible()
Show()
Hide()

◆ Show()

void CYISceneNode::Show ( )

Shows the node.

Note
Does not affect the local or composite opacity of the node.
See also
IsVisible()
SetVisibility(bool)

◆ SizeChanged()

virtual void CYISceneNode::SizeChanged ( )
protectedvirtual

Called when the size of this scene node has been changed.

Warning
Overrides must call the base class implementation.
See also
OnSizeChanged()

Reimplemented in CYIScrollingView, CYISceneView, and CYIVectorCanvasNode.

◆ StartCaptureKeyboardEvents()

void CYISceneNode::StartCaptureKeyboardEvents ( )

Starts capturing keyboard events. All incoming keyboard events will subsequently be sent to this node

◆ StartCapturePointerEvents()

void CYISceneNode::StartCapturePointerEvents ( uint8_t  pointerID)

Starts capturing pointer events. All incoming pointer events will subsequently be sent to this node, regardless of their location.

◆ StartCaptureTrackpadEvents()

void CYISceneNode::StartCaptureTrackpadEvents ( )

Starts capturing trackpad events. All incoming trackpad events will subsequently be sent to this node.

◆ StartPropertyAnimation()

void CYISceneNode::StartPropertyAnimation ( PropertyAnimation::Type  propType,
float  from,
float  to,
uint32_t  durMs,
CYITimeInterpolator pTimeInterpolator = nullptr,
bool  dirtyLayout = true 
)

Starts a property animation on this node.

See also
CYISceneNode::PropertyAnimation

◆ StopCaptureKeyboardEvents()

void CYISceneNode::StopCaptureKeyboardEvents ( )

Stops capturing keyboard events.

◆ StopCapturePointerEvents()

void CYISceneNode::StopCapturePointerEvents ( uint8_t  pointerID)

Stops capturing pointer events.

◆ StopCaptureTrackpadEvents()

void CYISceneNode::StopCaptureTrackpadEvents ( )

Stops capturing trackpad events.

◆ StopPropertyAnimation()

void CYISceneNode::StopPropertyAnimation ( PropertyAnimation::Type  propType)

Stops the property animation for property propType on this node.

See also
CYISceneNode::PropertyAnimation

◆ TakeAccessibilityAttributes()

std::unique_ptr<CYIAccessibilityAttributes> CYISceneNode::TakeAccessibilityAttributes ( )

Returns the accessibility attributes for this scene node and transfers ownership.

Note
This clears the CYIAccessibilityAttributes on the node but does not modify the CYIAccessibilityAttributes::Accessible state.
See also
SetAccessibilityAttributes()
SetAccessible()

◆ TransformUpdated()

virtual void CYISceneNode::TransformUpdated ( )
protectedvirtual

Called by Update() when the transform update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().
Overrides must call the base class implementation.
See also
Update()
OnTransformUpdated()

Reimplemented in CYIPerspectiveCameraSceneNode, and CYIDecoratedView.

◆ Update()

void CYISceneNode::Update ( )
protected

Recursively updates the node and its children.

This function is typically invoked by the scene manager on each frame, if and only if the scene graph is dirty.

See also
GetDirtyFlag()
GetPreviousDirtyFlag()
ForceDirty();
SetDirtyFlag(DirtyFlag dirtyFlag);

◆ UpdateBegin()

virtual void CYISceneNode::UpdateBegin ( )
protectedvirtual

This hook provides subclasses a means to do operations prior to update. Any changes that dirty this node are applied immediately after this function returns.

Warning
Overrides must call the base class implementation.
See also
Update()
OnUpdateBegin()

Reimplemented in CYITextEditView, CYIVectorCanvasNode, and CYIDecoratedView.

◆ UpdateEnd()

virtual void CYISceneNode::UpdateEnd ( )
protectedvirtual

This hook provides subclasses a means to do operations subsequent to update. This hook is called after all children of the current node have been updated, and after all other update hooks have been called.

Warning
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().
Overrides must call the base class implementation.
See also
Update()
OnUpdateEnd()

Reimplemented in CYIScrollingView, CYITextSceneNode, CYITextEditView, CYIAbstractCameraSceneNode, and CYIScrollBarView.

◆ UpdateEventForLocalSpace()

void CYISceneNode::UpdateEventForLocalSpace ( CYIActionEvent pActionEvent,
glm::vec3 &  rayOrigin,
glm::vec3 &  rayNonOriginPoint 
) const

Update the event's ray for the local space of this node. This transforms the provided event such that its ray is in the local space of this scene node, taking the node's world transform and cameras into consideration.

◆ UpdateLocalSpaceCollision()

void CYISceneNode::UpdateLocalSpaceCollision ( CYIActionEvent pActionEvent)

The provided pActionEvent is used to update the node's internal local space collision.

◆ VisibilityUpdated()

virtual void CYISceneNode::VisibilityUpdated ( )
protectedvirtual

Called by Update() when the composite visibility of a class has been calculated. Subclasses may overload this function to do post-processing.

Warning
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().
Overrides must call the base class implementation.
See also
Update()
OnVisibilityUpdated()

◆ WorldBoundingBoxUpdated()

virtual void CYISceneNode::WorldBoundingBoxUpdated ( )
protectedvirtual

Called by Update() when the world bounding box update process is complete. Subclasses may overload this function to do post-processing.

Warning
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().
Overrides must call the base class implementation.
See also
Update()
OnWorldBoundingBoxUpdated()

Reimplemented in CYIScrollingView, CYITextSceneNode, CYISceneView, and CYIListView.

◆ WorldScaleUpdated()

virtual void CYISceneNode::WorldScaleUpdated ( )
protectedvirtual

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

Warning
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
GetWorldScale
Warning
Overrides must call the base class implementation.
See also
Update()
OnWorldScaleUpdated()

Reimplemented in CYISceneView.

◆ WorldSurfaceScaleUpdated()

virtual void CYISceneNode::WorldSurfaceScaleUpdated ( )
protectedvirtual

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.

Warning
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
GetWorldSurfaceScale
Warning
Overrides must call the base class implementation.
See also
Update()
OnWorldSurfaceScaleUpdated()

Reimplemented in CYITextSceneNode, CYITextEditView, and CYISDFAtlasTextSceneNode.

Friends And Related Function Documentation

◆ CYISceneManager

friend class CYISceneManager
friend

◆ UnitTestSetupHelper

friend class UnitTestSetupHelper
friend

Member Data Documentation

◆ AccessibleStateChanged

CYISignal<CYIAccessibilityAttributes::Accessible> CYISceneNode::AccessibleStateChanged

Emitted when accessible state changed.

◆ DescendantGainedFocus

CYISignal<CYISceneNode * , 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.

◆ DescendantLostFocus

CYISignal<CYISceneNode * , 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.

◆ DescendantsChangedFocus

CYISignal<CYISceneNode * , 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.

◆ DirtyClean

constexpr DirtyFlag CYISceneNode::DirtyClean = 0x0000
static

Indicates the the scene graph is clean.

◆ DirtyEverything

Dirties everything except DirtyMesh. DirtyMesh is a placeholder flag that only represents its side effects. This is the flag used by ForceDirty().

◆ DirtyLocalBoundingBox

constexpr DirtyFlag CYISceneNode::DirtyLocalBoundingBox = 0x0400
static

Indicates that the local bounding box needs to be re-calculated. This flag automatically recurses through all ancestors. DirtyWorldBoundingBox will also be set on the node and all ancestors, and DirtySceneGraph will be set on all ancestors.

◆ DirtyLocalTransform

constexpr DirtyFlag CYISceneNode::DirtyLocalTransform = 0x0008
static

Indicates that the local transform of the node needs to be recalculated. This dirty flag will also automatically emit DirtyWorldTransform to all children, DirtyWorldBoundingBox to all children and ancestors, DirtySceneGraph to all ancestors, and DirtyLocalBoundingBox to all ancestors.

◆ DirtyMesh

constexpr DirtyFlag CYISceneNode::DirtyMesh = 0x0080
static

Indiates that a new mesh was set on the node. Will automatically emit DirtyUniform on the node and DirtyWorldBoundingBox recursively to all ancestors. Will also emit DirtySceneGraph through all ancestors. DirtyLocalBoundingBox will also be set on the node and all ancestors.

This is a placeholder flag that only represents its side effects. It will never be directly reflected in the dirty flags.

◆ DirtyOpacity

constexpr DirtyFlag CYISceneNode::DirtyOpacity = 0x0004
static

Indicates that the opacity of the node changed, and that the composite opacity of the node needs to be re-calculated. Setting this flag recurses automatically through all children and will emit a DirtySceneGraph recursively to all ancestors

◆ DirtySceneGraph

constexpr DirtyFlag CYISceneNode::DirtySceneGraph = 0x0001
static

Indicates that the scene graph is dirty and requires an update pass. Setting this flag recurses automatically through all ancestors.

◆ DirtyUniform

constexpr DirtyFlag CYISceneNode::DirtyUniform = 0x0020
static

Indicates that a uniform buffer needs to be re-uploaded to the GPU. This flag is non-recursive, but will recursively emit DirtySceneGraph to all ancestors.

◆ DirtyVisibility

constexpr DirtyFlag CYISceneNode::DirtyVisibility = 0x0002
static

Indicates that the visibility of the node changed, and that the absolute visibility of the node needs to be re-calculated. Setting this flag recurses automatically through all children and will emit a DirtySceneGraph recursively to all ancestors

◆ DirtyWorldBoundingBox

constexpr DirtyFlag CYISceneNode::DirtyWorldBoundingBox = 0x0040
static

Indicates that the world bounding box needs to be re-calculated. Like DirtySceneGraph, this flag automatically recurses through all ancestors. Will also emit DirtySceneGraph through all ancestors.

◆ DirtyWorldScale

constexpr DirtyFlag CYISceneNode::DirtyWorldScale = 0x0200
static

Indicates that the scale of the node or its parent changed, and that the world scaling factor of the node needs to be re-calculated. Setting this flag recurses automatically through all children and will emit DirtyWorldScale recursively to all ancestors.

◆ DirtyWorldSurfaceScale

constexpr DirtyFlag CYISceneNode::DirtyWorldSurfaceScale = 0x0100
static

Indicates that the scale of the node or its parent or its nearest render target's scaling factor changed, and that the world surface scaling factor of the node needs to be re-calculated. Setting this flag recurses automatically through all children and will emit DirtyWorldSurfaceScale recursively to all ancestors.

◆ DirtyWorldTransform

constexpr DirtyFlag CYISceneNode::DirtyWorldTransform = 0x0010
static

Indicates that the world transform needs to be re-calculated. This flag is normally emitted automatically when using DirtyLocalTransform, and should normally not be called directly. This will automatically recurse to all children and ancestors, and will also recursively set DirtyWorldBoundingBox to all children and ancestors, and DirtySceneGraph to all the ancestors.

◆ m_children

std::vector<std::unique_ptr<CYISceneNode> > CYISceneNode::m_children
protected

◆ m_clip

bool CYISceneNode::m_clip
protected

Clip enable flag

◆ m_drawChildren

std::vector<CYISceneNode *> CYISceneNode::m_drawChildren
protected

◆ m_Effects

std::vector<std::shared_ptr<CYIEffect> > CYISceneNode::m_Effects
protected

The node's list of active effects

◆ m_guid

uint64_t CYISceneNode::m_guid
protected

The unique id of this node

◆ m_id

int32_t CYISceneNode::m_id
protected

The id of this node

◆ m_initialSize

glm::vec3 CYISceneNode::m_initialSize
protected

The size of this node at initialization

◆ m_localOpacity

float CYISceneNode::m_localOpacity
protected

The local opacity for this node

◆ m_localVisibility

bool CYISceneNode::m_localVisibility
protected

The local node visibility flag

◆ m_measuredSize

glm::vec3 CYISceneNode::m_measuredSize
protected

The measured size of this node (used by the layout system)

◆ m_name

CYIString CYISceneNode::m_name
protected

◆ m_pDrawParent

CYISceneNode* CYISceneNode::m_pDrawParent
protected

◆ m_pNPatch

std::unique_ptr<CYINPatch> CYISceneNode::m_pNPatch
protected

The node's N Patch, if any

◆ m_pNPatchBitmap

std::shared_ptr<CYIBitmap> CYISceneNode::m_pNPatchBitmap
protected

The node's mesh, if any

◆ m_pParent

CYISceneNode* CYISceneNode::m_pParent
protected

◆ m_pRenderable

std::shared_ptr<CYIRenderable> CYISceneNode::m_pRenderable
protected

The node's renderable

◆ m_Properties

std::map<CYIString, CYIString, std::less<void> > CYISceneNode::m_Properties
protected

◆ m_propertyAnimations

std::vector<std::unique_ptr<PropertyAnimation> > CYISceneNode::m_propertyAnimations
protected

The node property animations for this node

◆ m_pTransform

std::unique_ptr<CYITransform> CYISceneNode::m_pTransform
protected

◆ m_size

glm::vec3 CYISceneNode::m_size
protected

The size of this node

◆ m_vlsLastCollision

glm::vec3 CYISceneNode::m_vlsLastCollision
protected

The last ray collision with the node in local space

◆ OPACITY_NOT_VISIBLE_EPSILON

const float CYISceneNode::OPACITY_NOT_VISIBLE_EPSILON
static

◆ PropertyAnimationComplete

CYISignal<CYISceneNode *, PropertyAnimation::Type> CYISceneNode::PropertyAnimationComplete

Emitted when a node property animation is completed.


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