You.i Engine
YiSceneNode.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_SCENE_NODE_H_
3 #define _YI_SCENE_NODE_H_
4 
8 #include "animation/YiVariant.h"
9 #include "event/YiEventTarget.h"
11 #include "framework/YiPredef.h"
13 #include "renderer/YiRenderer.h"
14 #include "scenetree/YiAABB.h"
15 #include "scenetree/YiTransform.h"
16 #include "signal/YiSignalHandler.h"
17 
18 #include <glm/gtc/quaternion.hpp>
19 #include <glm/mat4x4.hpp>
20 #include <glm/vec3.hpp>
21 
27 class CYIActionEvent;
29 class CYIAdjustmentLayerSceneNode;
30 class CYIBitmap;
31 class CYIEffect;
32 class CYILayoutConfig;
33 class CYILayoutState;
34 class CYIMask;
35 class CYIMaterial;
36 class CYIMesh;
37 class CYINPatch;
38 class CYIRenderTarget;
39 class CYISceneManager;
40 class CYISceneNode;
42 class CYITimelineTrack;
44 class CYISceneNodeIteratorPriv;
45 class CYISceneNodeProxy;
46 
47 class UnitTestSetupHelper;
48 
100 {
101  friend class CYISceneManager;
102 
103 public:
104  static const float OPACITY_NOT_VISIBLE_EPSILON;
105 
106  class Iterator;
107  typedef std::reverse_iterator<Iterator> ReverseIterator;
108 
114  class Iterator
115  {
116  public:
117  enum class Mode
118  {
123 
127  DepthFirst,
128  };
129 
130  friend class CYISceneNode;
131  typedef std::bidirectional_iterator_tag iterator_category;
133  typedef ptrdiff_t difference_type;
135  typedef CYISceneNode *reference; // This iterator uses the value as the reference, since there is little point in returning a reference to a scene node pointer. The pointer itself suffices.
136 
137  Iterator();
138  Iterator(const Iterator &other);
139 
140  ~Iterator();
141 
142  value_type operator*() const;
143 
144  Iterator &operator=(const Iterator &other);
145  bool operator==(const Iterator &other) const;
146  bool operator!=(const Iterator &other) const;
147 
148  Iterator &operator++();
149  Iterator operator++(int);
150  Iterator &operator--();
151  Iterator operator--(int);
152  Iterator operator+(int n) const;
153  Iterator &operator+=(int n);
154  Iterator operator-(int n) const;
155  Iterator &operator-=(int n);
156 
157  private:
158  std::unique_ptr<CYISceneNodeIteratorPriv> m_pIteratorPriv;
159  };
160 
165  {
166  public:
170  enum class Type
171  {
172  PositionX,
173  PositionY,
174  PositionZ,
175  ScaleX,
176  ScaleY,
177  ScaleZ,
178  RotationX,
179  RotationY,
180  RotationZ,
181  Opacity,
182  SizeX,
183  SizeY,
184  SizeZ,
185  };
186 
190  PropertyAnimation(CYISceneNode *pNode, Type propetyType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator, bool dirtyLayout);
191 
192  virtual ~PropertyAnimation();
193 
197  void Reconfigure(float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator, bool dirtyLayout);
198 
199  std::shared_ptr<CYISceneNodeProxy> m_pNodeProxy;
202  float m_from;
203  float m_to;
206  protected:
210  virtual void OnAnimate(CYIAnimation *pAnim, float dataPosition) override;
211 
215  virtual void OnAnimationEnd(CYIAnimation *pAnim) override;
216 
217  private:
219  };
220 
221  typedef uint16_t DirtyFlag;
222 
226  static constexpr DirtyFlag DirtyClean = 0x0000;
227 
232  static constexpr DirtyFlag DirtySceneGraph = 0x0001;
233 
239  static constexpr DirtyFlag DirtyVisibility = 0x0002;
240 
246  static constexpr DirtyFlag DirtyOpacity = 0x0004;
247 
253  static constexpr DirtyFlag DirtyLocalTransform = 0x0008;
254 
261  static constexpr DirtyFlag DirtyWorldTransform = 0x0010;
262 
267  static constexpr DirtyFlag DirtyUniform = 0x0020;
268 
274  static constexpr DirtyFlag DirtyWorldBoundingBox = 0x0040;
275 
283  static constexpr DirtyFlag DirtyMesh = 0x0080;
284 
290  static constexpr DirtyFlag DirtyWorldSurfaceScale = 0x0100;
291 
297  static constexpr DirtyFlag DirtyWorldScale = 0x0200;
298 
303  static constexpr DirtyFlag DirtyLocalBoundingBox = 0x0400;
304 
308  static constexpr DirtyFlag DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox);
309 
310  enum class LayoutDirtyFlag : uint8_t
311  {
315  Clean,
319  ChildDirty,
323  Dirty
324  };
325 
327  {
331  DoNotLazyInstantiate = 0,
332 
336  LazyInstantiate
337  };
338 
339  enum class MeasureMode
340  {
344  Unspecified,
348  UpTo,
352  Exactly
353  };
354 
358  enum class FetchType
359  {
363  Optional = 0,
367  Mandatory
368  };
369 
373  struct MeasureSpec
374  {
376  : mode(MeasureMode::Unspecified)
377  , size(0.0f)
378  {
379  }
380  MeasureSpec(MeasureMode mode, float size)
381  : mode(mode)
382  , size(size)
383  {
384  }
385 
386  static MeasureSpec CreateExactlySpec(float size);
387  static MeasureSpec CreateUpToSpec(float size);
388  static const MeasureSpec &GetUndefinedSpec();
389  static const MeasureSpec defaultSpec;
390 
392  float size;
393  };
394 
395  CYISceneNode();
396  virtual ~CYISceneNode();
397 
411  virtual bool Init();
412 
420  void ForceDirty();
421 
428  void SetDirtyFlag(DirtyFlag dirtyFlag);
429 
434  DirtyFlag GetDirtyFlag() const;
435 
444  DirtyFlag GetPreviousDirtyFlag() const;
445 
451  const CYIString &GetName() const;
452 
459  CYIString GetUniqueName() const;
460 
468  void SetSceneManager(CYISceneManager *pSceneManager);
469 
476  void SetName(const CYIString &name);
477 
489  int32_t GetID() const;
490 
496  void SetID(int32_t id);
497 
503  uint64_t GetUniqueID() const;
504 
517  bool AddChild(std::unique_ptr<CYISceneNode> pSceneNode);
518 
531  bool AddChild(std::unique_ptr<CYISceneNode>, size_t index);
532 
545  bool InsertChildAfter(CYISceneNode *pRefNode, std::unique_ptr<CYISceneNode> pSceneNode);
546 
552  std::unique_ptr<CYISceneNode> RemoveChild(CYISceneNode *pSceneNode);
553 
567  bool ReorderChild(size_t fromIndex, size_t toIndex);
568 
570  {
571  return m_pTransform.get();
572  }
573 
579  CYISceneNode *GetParent() const;
580 
593  bool ChangeParent(CYISceneNode *pParent);
594 
600  CYISceneNode *GetDrawParent() const;
601 
605  bool IsAncestorOf(const CYISceneNode *pNode) const;
606 
611 
615  size_t GetChildCount() const;
616 
620  uint32_t GetChildCountRecursive() const;
621 
627  CYISceneNode *GetChild(size_t index) const;
628 
633 
638 
642  ReverseIterator rbegin(Iterator::Mode mode = Iterator::Mode::ImmediateChildren) const;
643 
647  ReverseIterator rend(Iterator::Mode mode = Iterator::Mode::ImmediateChildren) const;
648 
654  CYISceneNode *GetChild(const CYIString &name) const;
655 
659  size_t GetDrawChildCount() const;
660 
666  CYISceneNode *GetDrawChild(size_t index) const;
667 
673  CYISceneNode *GetDrawChildByID(int32_t id) const;
674 
684  template<class YI_SCENE_NODE_SUBCLASS>
685  YI_SCENE_NODE_SUBCLASS *GetChild(uint32_t targetMatchedNodeCount = 1) const;
686 
692  template<class YI_SCENE_NODE_SUBCLASS>
693  std::list<YI_SCENE_NODE_SUBCLASS *> GetChildren() const;
694 
700  template<class YI_SCENE_NODE_SUBCLASS>
701  std::list<YI_SCENE_NODE_SUBCLASS *> GetDrawChildren() const;
702 
706  size_t GetIndexOfChild(const CYISceneNode *pSceneNode) const;
707 
713  size_t GetIndexOfDrawChild(const CYISceneNode *pSceneNode) const;
714 
723  void Show();
724 
733  void Hide();
734 
744  void SetVisibility(bool visible);
745 
755  void SetOpacity(float opacity);
756 
760  float GetCompositeOpacity() const;
761 
771  float GetLocalOpacity() const;
772 
781  bool IsVisible() const;
782 
791  bool IsTrulyVisible() const;
792 
799  bool IsPerceptible() const;
800 
810 
818  CYISceneNode *GetNode(CYIStringView name, const CYIRuntimeTypeInfo &enforceClassType);
819 
827  CYISceneNode *GetNode(const CYIRuntimeTypeInfo &enforceClassType);
828 
836  CYISceneNode *GetNodeAfterTarget(const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget);
837 
847  template<class YI_SCENE_NODE_SUBCLASS>
848  YI_SCENE_NODE_SUBCLASS *GetNode(CYIStringView name);
849 
857  CYISceneNode *GetNode(const int32_t id);
858 
866  CYISceneNode *GetNode(const int32_t id, const CYIRuntimeTypeInfo &enforceClassType);
867 
877  CYISceneNode *GetNodeWithUniqueID(uint64_t uniqueID);
878 
888  template<class YI_SCENE_NODE_SUBCLASS>
889  bool FindNode(YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag);
890 
898  std::list<CYISceneNode *> GetNodes(CYIStringView name);
899 
907  std::list<CYISceneNode *> GetNodes(int32_t id);
908 
916  std::list<CYISceneNode *> GetNodes(const CYIRuntimeTypeInfo &enforceClassType);
917 
929  template<class YI_SCENE_NODE_SUBCLASS>
930  const YI_SCENE_NODE_SUBCLASS *GetNode(uint32_t targetMatchedNodeCount = 1) const;
931  template<class YI_SCENE_NODE_SUBCLASS>
932  YI_SCENE_NODE_SUBCLASS *GetNode(uint32_t targetMatchedNodeCount = 1);
933 
937  void SetMesh(const std::shared_ptr<CYIMesh> &pMesh);
938 
942  bool SetNPatchBitmap(const std::shared_ptr<CYIBitmap> &pNPatchBitmap);
943 
947  void ClearNPatch();
948 
952  void SetMaterial(const std::shared_ptr<CYIMaterial> &pMaterial, size_t index = 0);
953 
957  void AddEffect(const std::shared_ptr<CYIEffect> &pEffect);
958 
962  void RemoveEffect(const std::shared_ptr<CYIEffect> &pEffect);
963 
967  size_t GetEffectCount() const;
968 
972  const std::shared_ptr<CYIEffect> &GetEffect(size_t index) const;
973 
979  void ConnectEffectsToTimelines(const CYITimelineTrack *pTrack);
980 
986  void AddMask(std::unique_ptr<CYIMask> pMask);
987 
991  std::unique_ptr<CYIMask> RemoveMask(const CYIMask *pMask);
992 
996  size_t GetMaskCount() const;
997 
1001  const CYIMask *GetMask(size_t index) const;
1002 
1006  CYIMask *GetMask(size_t index);
1007 
1011  const std::shared_ptr<CYIMesh> &GetMesh() const;
1012 
1016  const std::shared_ptr<CYIBitmap> &GetNPatchBitmap() const;
1017 
1021  size_t GetMaterialCount() const;
1022 
1026  const std::shared_ptr<CYIMaterial> &GetMaterial(size_t index = 0) const;
1027 
1031  const std::shared_ptr<IYIUniformBufferObject> &GetShaderUniforms() const;
1032 
1036  void SetMeshTransform(const glm::mat4 &rTransform);
1037 
1042  void DestroyChildren();
1043 
1047  const glm::mat4 &GetLocalTransform() const;
1048 
1052  const glm::mat4 &GetEffectTransform() const;
1053 
1063  const glm::mat4 &GetWorldTransform() const;
1064 
1070  bool Intersects(const CYISceneNode *pNode) const;
1071 
1075  void SetRenderTarget(const std::shared_ptr<CYIRenderTarget> &pRenderTarget);
1076 
1080  const std::shared_ptr<CYIRenderTarget> &GetRenderTarget() const;
1081 
1087  virtual void BuildDrawList(std::vector<IYIRenderer::Command> &drawList, CYIAbstractCameraSceneNode *pCameraToDrawWith = nullptr);
1088 
1092  const CYIAABB &GetWorldAABB() const;
1093 
1097  const CYIAABB &GetLocalAABB() const;
1098 
1107  void SetAnchorPoint(const glm::vec3 &anchorPoint);
1108 
1112  void SetAnchorPoint(float x, float y, float z);
1113 
1117  void SetAnchorPointX(float x);
1118 
1122  void SetAnchorPointY(float y);
1123 
1127  void SetAnchorPointZ(float z);
1128 
1136  void SetPosition(const glm::vec3 &position);
1137 
1141  void SetPosition(float x, float y, float z);
1142 
1146  void SetPositionX(float x);
1147 
1151  void SetPositionY(float y);
1152 
1156  void SetPositionZ(float z);
1157 
1165  void SetRotation(const glm::vec3 &rotation);
1166 
1170  void SetRotation(float pitchDegrees, float yawDegrees, float rollDegrees);
1171 
1175  void SetRotationX(float pitchDegrees);
1176 
1180  void SetRotationY(float yawDegrees);
1181 
1185  void SetRotationZ(float rollDegrees);
1186 
1194  void SetOrientation(float pitchDegrees, float yawDegrees, float rollDegrees);
1195 
1199  void SetOrientation(const glm::quat &orientation);
1200 
1208  void SetScale(const glm::vec3 &scale);
1209 
1213  void SetScale(float factorX, float factorY, float factorZ);
1214 
1218  void SetScaleX(float factor);
1219 
1223  void SetScaleY(float factor);
1224 
1228  void SetScaleZ(float factor);
1229 
1233  const glm::vec3 &GetPosition() const;
1234 
1238  const glm::vec3 &GetScale() const;
1239 
1247  const glm::vec3 &GetWorldScale() const;
1248 
1252  const glm::vec3 &GetWorldSurfaceScale() const;
1253 
1257  const glm::vec3 &GetRotation() const;
1258 
1262  const glm::quat &GetOrientation() const;
1263 
1267  const glm::vec3 &GetAnchorPoint() const;
1268 
1276  virtual void SetSize(const glm::vec3 &size, bool dirtyLayout = true);
1277 
1281  const glm::vec3 &GetSize() const;
1282 
1286  const glm::vec3 &GetInitialSize() const;
1287 
1291  void SetMeasuredSize(const glm::vec3 &measuredSize);
1292 
1296  const glm::vec3 &GetMeasuredSize() const;
1297 
1301  void SetInternalCustomTimelineValue(uint32_t trackID, const CYIVariant &value);
1302 
1306  virtual void SetCustomTimelineValue(uint32_t trackID, const CYIVariant &value);
1307 
1311  void SetClippingOn();
1312 
1316  void SetClippingOff();
1317 
1321  bool GetClipping() const;
1322 
1327  void SetClippingBox(const CYIAABB &rWorldBox);
1328 
1333  const CYIAABB &GetClippingBox() const;
1334 
1340  void StartPropertyAnimation(PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator = nullptr, bool dirtyLayout = true);
1341 
1348 
1352  void UpdateLocalSpaceCollision(CYIActionEvent *pActionEvent);
1353 
1357  virtual bool BroadcastEvent(const std::shared_ptr<CYIEventDispatcher> &pDispatcher, CYIEvent *pEvent);
1358 
1362  void UpdateEventForLocalSpace(CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const;
1363 
1369  bool IsBoundingBoxHit(const CYIRay &rWorldSpaceRay) const;
1370 
1378  bool IsMeshHit(const CYIRay &rWorldSpaceRay) const;
1379 
1386  void DumpTree() const;
1387 
1392 
1397 
1402 
1407 
1411  void StartCapturePointerEvents(uint8_t pointerID);
1412 
1416  void StopCapturePointerEvents(uint8_t pointerID);
1417 
1423  bool DrawBehindChildren(CYISceneNode *pSceneNode, bool *pChanged = nullptr);
1424 
1430  bool DrawInFrontOfChildren(CYISceneNode *pSceneNode, bool *pChanged = nullptr);
1431 
1437  bool DrawBehind(CYISceneNode *pSceneNode, bool *pChanged = nullptr);
1438 
1444  bool DrawInFront(CYISceneNode *pSceneNode, bool *pChanged = nullptr);
1445 
1457  bool IsFocusRoot() const;
1458 
1462  void SetIsFocusRoot(bool isFocusRoot);
1463 
1469  virtual void OnFocusGainedInDescendants();
1470 
1476  virtual void FocusGainedInDescendants();
1477 
1483  virtual void OnFocusLostInDescendants();
1484 
1490  virtual void FocusLostInDescendants();
1491 
1495  virtual void OnFocusChangedInDescendants();
1496 
1502  virtual void FocusChangedInDescendants();
1503 
1509  virtual bool ContainsFocusableDescendant(const CYIFocusSearchOptions &options = CYIFocusSearchOptions()) const;
1510 
1514  void SetUseLocalTransformAndAlpha(bool use);
1515 
1521  static void RegisterAllSceneNodes();
1522 
1523  virtual CYIOptional<CYIStringView> GetProperty(CYIStringView propertyName) const override;
1524 
1530  bool GetProperty(CYIStringView propertyName, CYIString *pValue) const;
1531 
1532  virtual std::map<CYIString, CYIString> GetProperties() const override;
1533 
1534  virtual void ForEachProperty(const std::function<void(const CYIString & /* propertyName */, const CYIString & /* propertyValue */)> &action) const override;
1535 
1536  virtual bool HasProperties() const override;
1537 
1541  void SetProperty(const CYIString &rPropertyName, const CYIString &rPropertyValue);
1542 
1548  std::shared_ptr<CYISceneNodeProxy> GetSceneNodeProxy() const;
1549 
1557  void SetLayoutConfig(std::unique_ptr<CYILayoutConfig> pLayoutConfig);
1558 
1567 
1576 
1584  void SetLayoutState(std::unique_ptr<CYILayoutState> pLayoutState);
1585 
1591  const CYILayoutState *GetLayoutState() const;
1592 
1599 
1603  void RequestLayout();
1604 
1613 
1623  virtual void SetLayoutDirtyFlag(LayoutDirtyFlag flag);
1624 
1640  virtual void Measure(const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec);
1641 
1653  virtual void ApplyMeasurements();
1654 
1660  virtual CYIAbstractCameraSceneNode *FindActiveCamera(const CYISceneNode *pTargetSceneNode = nullptr) const;
1661 
1671 
1678 
1687 
1696  std::unique_ptr<CYIAccessibilityAttributes> TakeAccessibilityAttributes();
1697 
1705  void SetAccessibilityAttributes(std::unique_ptr<CYIAccessibilityAttributes> pAttributes);
1706 
1712  template<typename T>
1713  bool CanCastTo() const;
1714 
1719 
1724 
1725 protected:
1736  void Update();
1737 
1741  virtual void OnUpdateBegin();
1742 
1751  virtual void UpdateBegin();
1752 
1761  virtual void OnUpdateEnd();
1762 
1771  virtual void UpdateEnd();
1772 
1796  virtual void OnDirtyFlagChanged();
1797 
1805  virtual void DirtyFlagChanged();
1806 
1815  virtual void OnTransformUpdated();
1816 
1825  virtual void TransformUpdated();
1826 
1838  virtual void OnWorldScaleUpdated();
1839 
1848  virtual void WorldScaleUpdated();
1849 
1861  virtual void OnWorldSurfaceScaleUpdated();
1862 
1871  virtual void WorldSurfaceScaleUpdated();
1872 
1882  virtual void OnVisibilityUpdated();
1883 
1892  virtual void VisibilityUpdated();
1893 
1905  virtual void OnCompositeOpacityUpdated();
1906 
1915  virtual void CompositeOpacityUpdated();
1916 
1926  virtual void OnWorldBoundingBoxUpdated();
1927 
1936  virtual void WorldBoundingBoxUpdated();
1937 
1947  virtual void OnLocalBoundingBoxUpdated();
1948 
1957  virtual void LocalBoundingBoxUpdated();
1958 
1962  virtual void OnChildAdded(CYISceneNode *pChild);
1963 
1970  virtual void ChildAdded(CYISceneNode *pChild);
1971 
1977  virtual void OnChildRemoved(CYISceneNode *pChild);
1978 
1984  virtual void ChildRemoved(CYISceneNode *pChild);
1985 
1989  virtual void OnSizeChanged();
1990 
1996  virtual void SizeChanged();
1997 
2002  virtual void ChildNeedsLayout();
2003 
2008  virtual void LayoutDirtied();
2009 
2013  virtual void OnChildVisibilityChanged(CYISceneNode *pChild);
2014 
2020  virtual void ChildVisibilityChanged(CYISceneNode *pChild);
2021 
2022  virtual bool ProcessEvent(const std::shared_ptr<CYIEventDispatcher> &pDispatcher, CYIEvent *pEvent) override;
2023 
2030 
2039  virtual CYIString GetDumpTreeString() const;
2040 
2044  void DumpTree(int32_t indentLevel) const;
2045 
2051  virtual void SetCustomUniforms();
2052 
2058  template<class T>
2059  void SetNodeType();
2060 
2066 
2071  virtual CYISceneNode *GetNodeFromChildren(const int32_t id);
2072 
2077  virtual CYISceneNode *GetNodeFromChildren(const CYIRuntimeTypeInfo &enforceClassType);
2078 
2083  CYISceneNode *GetNodeFromChildrenAfterTarget(const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget);
2084 
2088 
2089  std::vector<std::unique_ptr<CYISceneNode>> m_children;
2090  std::vector<CYISceneNode *> m_drawChildren;
2091  std::map<CYIString, CYIString, std::less<>> m_Properties;
2092  std::vector<std::shared_ptr<CYIMaterial>> m_pMaterials;
2093  std::vector<std::unique_ptr<CYIMask>> m_Masks;
2094  std::vector<std::shared_ptr<CYIEffect>> m_Effects;
2095  std::vector<std::unique_ptr<PropertyAnimation>> m_propertyAnimations;
2097  /*
2098  * These members represent the node's effective alpha value,
2099  * m_localOpacity - the base opacity for this node, independent of hierarchy
2100  * m_compositeOpacity - the calculated effective opacity for this node, considering its parent chain
2101  */
2107 
2108  std::unique_ptr<CYITransform> m_pTransform;
2109 
2110  glm::vec3 m_size;
2111  glm::vec3 m_initialSize;
2112  glm::vec3 m_measuredSize;
2115  bool m_clip;
2118  int32_t m_id;
2119  uint64_t m_guid;
2121  std::shared_ptr<CYIRenderTarget> m_pRenderTarget;
2122  std::shared_ptr<CYIMesh> m_pMesh;
2123  std::unique_ptr<CYINPatch> m_pNPatch;
2124  std::shared_ptr<CYIBitmap> m_pNPatchBitmap;
2125  mutable std::shared_ptr<IYIUniformBufferObject> m_pShaderUniforms;
2127 private:
2128  static constexpr uint8_t TypeNode = 0x0001;
2129  static constexpr uint8_t TypeAbstractCamera = 0x0002 | TypeNode;
2130  static constexpr uint8_t TypeAdjustmentLayer = 0x0004 | TypeNode;
2131  static constexpr uint8_t TypeSprite = 0x0008 | TypeNode;
2132  static constexpr uint8_t TypeImage = 0x0010 | TypeNode;
2133  static constexpr uint8_t TypeText = 0x0020 | TypeNode;
2134  static constexpr uint8_t TypeView = 0x0040 | TypeNode;
2135  static constexpr uint8_t TypeStreamableView = 0x0080 | TypeView;
2140  void UpdateShaderUniforms();
2141 
2147  CYISceneNode *GetNodeFromChildrenLogDuplicates(CYIStringView name);
2148 
2152  void UpdateAdjustmentLayerEffects(CYISceneNode *pNode);
2153 
2154  void DirtyLiveChildrenRecursive(DirtyFlag dirtyFlag);
2155  void DirtyLiveParentRecursive(DirtyFlag dirtyFlag);
2157  void GetNodesFromChildren(CYIStringView name, std::list<CYISceneNode *> &list);
2159  void GetNodesFromChildren(const int32_t id, std::list<CYISceneNode *> &list);
2161  void GetNodesFromChildren(const CYIRuntimeTypeInfo &enforceClassType, std::list<CYISceneNode *> &list);
2163  void AssignDefaultLayoutConfig() const;
2171  void SetParent(CYISceneNode *pParent);
2172 
2176  size_t DrawRemove();
2177 
2178  void ClearLiveDirtyFlag(DirtyFlag flag) const;
2179  void SetLiveDirtyFlag(DirtyFlag dirtyFlag);
2180 
2181  virtual void UpdateCompositeOpacity(float *pCompositeOpacity) const;
2182 
2183  void MakeNextLayoutDirtyFlagCurrent();
2184 
2185  void PushStandardRenderActions(std::vector<IYIRenderer::Command> &drawList, bool mask, IYIRenderer::Command::Type pushTargetType);
2186  bool PushEffectRenderActions(std::vector<IYIRenderer::Command> &drawList, bool mask, const std::shared_ptr<CYIEffect> &pEffect);
2187  void PopStandardRenderActions(std::vector<IYIRenderer::Command> &drawList, bool mask);
2188 
2189  void RebuildNPatchMesh();
2190  void SetMeshPriv(const std::shared_ptr<CYIMesh> &pMesh);
2191 
2192  void ClearParentLiveDirtyFlagRecursively(DirtyFlag flag);
2193 
2194  void ParseAccessibilityProperties();
2195 
2196  CYISceneManager *m_pSceneManager;
2197 
2198  mutable CYIAABB m_WorldAABB;
2199  mutable CYIAABB m_LocalAABB;
2200  mutable glm::vec3 m_WorldSurfaceScale;
2201  mutable glm::vec3 m_WorldScale;
2203  mutable float m_compositeOpacity;
2204  mutable bool m_compositeVisibility;
2206  bool m_initCalled;
2207  bool m_destroying;
2208 
2209  bool m_isFocusRoot;
2210  bool m_useLocalTransformAndAlpha;
2211 
2212  CYIAdjustmentLayerSceneNode *m_pLastAdjustmentLayer;
2213 
2214  mutable DirtyFlag m_liveDirtyFlag;
2215  mutable DirtyFlag m_hooksDirtyFlag;
2216  DirtyFlag m_previousDirtyFlag;
2218  uint8_t m_nodeType;
2220  LayoutDirtyFlag m_currentLayoutDirtyFlag;
2221  LayoutDirtyFlag m_nextLayoutDirtyFlag;
2223 
2224  mutable std::unique_ptr<CYILayoutConfig> m_pLayoutConfig;
2225  std::unique_ptr<CYILayoutState> m_pLayoutState;
2226 
2227  std::unique_ptr<CYIAccessibilityAttributes> m_pAccessibilityAttributes;
2228 
2229  // Give access to Unit Test framework to clear global IDs (ID, UniqueID)
2230  // so that generated scene tree is repeatable.
2231  friend class UnitTestSetupHelper;
2232  static void ResetGUIDSeed();
2233 
2236 };
2237 
2240 #include "scenetree/YiSceneNode.inl"
2241 
2242 #endif // _YI_SCENE_NODE_H_
bool operator==(const Iterator &other) const
std::map< CYIString, CYIString, std::less<> > m_Properties
Definition: YiSceneNode.h:2091
void SetRotationX(float pitchDegrees)
void StartCaptureTrackpadEvents()
CYISceneNode * GetNode(CYIStringView name)
void SetRotation(const glm::vec3 &rotation)
void StartCapturePointerEvents(uint8_t pointerID)
virtual void OnChildAdded(CYISceneNode *pChild)
bool FindNode(YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag)
void SetID(int32_t id)
static void RegisterAllSceneNodes()
virtual CYISceneNode * GetNodeFromChildren(CYIStringView name)
virtual void OnFocusChangedInDescendants()
virtual void SetLayoutDirtyFlag(LayoutDirtyFlag flag)
bool IsTrulyVisible() const
bool DrawBehindChildren(CYISceneNode *pSceneNode, bool *pChanged=nullptr)
DirtyFlag GetDirtyFlag() const
virtual void Measure(const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec)
virtual void OnChildVisibilityChanged(CYISceneNode *pChild)
Container for basic interpolator functions.
Definition: YiTimeInterpolator.h:20
virtual bool ContainsFocusableDescendant(const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const
size_t GetEffectCount() const
virtual void TransformUpdated()
virtual std::map< CYIString, CYIString > GetProperties() const override
glm::vec3 m_size
Definition: YiSceneNode.h:2110
LayoutConfigFetchMode
Definition: YiSceneNode.h:326
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:122
int32_t m_id
Definition: YiSceneNode.h:2118
A container class for common data types.
Definition: YiVariant.h:33
void SetVisibility(bool visible)
Definition: YiSceneNode.h:114
std::shared_ptr< IYIUniformBufferObject > m_pShaderUniforms
Definition: YiSceneNode.h:2125
bool m_localVisibility
Definition: YiSceneNode.h:2116
CYISceneNode * GetNodeAfterTarget(const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget)
void StartCaptureKeyboardEvents()
bool CanCastTo() const
A class containing focus search options.
Definition: YiFocusSearchOptions.h:23
CYISceneNode * m_pParent
Definition: YiSceneNode.h:2086
void StopPropertyAnimation(PropertyAnimation::Type propType)
virtual void SizeChanged()
Iterator & operator+=(int n)
const glm::vec3 & GetInitialSize() const
ReverseIterator rend(Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
size_t GetMaterialCount() const
Scene trees composed of CYISceneNode objects are registered with the scene manager in order for them ...
Definition: YiSceneManager.h:75
void UpdateLocalSpaceCollision(CYIActionEvent *pActionEvent)
float GetCompositeOpacity() const
std::vector< std::shared_ptr< CYIEffect > > m_Effects
Definition: YiSceneNode.h:2094
uint64_t GetUniqueID() const
const std::shared_ptr< CYIMesh > & GetMesh() const
const CYILayoutConfig * GetLayoutConfig(LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) const
Base class for events.
Definition: YiEvent.h:27
CYISceneNode * GetDrawParent() const
Class representing an instance of geometry information.
Definition: YiMesh.h:33
void StartPropertyAnimation(PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true)
void UpdateEventForLocalSpace(CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const
Type m_type
Definition: YiSceneNode.h:200
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
bool IsMeshHit(const CYIRay &rWorldSpaceRay) const
virtual CYIOptional< CYIStringView > GetProperty(CYIStringView propertyName) const override
CYISceneNode * GetNodeWithUniqueID(uint64_t uniqueID)
glm::vec3 m_measuredSize
Definition: YiSceneNode.h:2112
Type
Definition: YiSceneNode.h:170
static constexpr DirtyFlag DirtyVisibility
Definition: YiSceneNode.h:239
void SetMesh(const std::shared_ptr< CYIMesh > &pMesh)
Iterator & operator=(const Iterator &other)
std::unique_ptr< CYIAccessibilityAttributes > TakeAccessibilityAttributes()
void SetRotationZ(float rollDegrees)
virtual void OnCompositeOpacityUpdated()
std::vector< std::unique_ptr< CYIMask > > m_Masks
Definition: YiSceneNode.h:2093
virtual bool HasProperties() const override
CYISceneNode * GetNodeFromChildrenAfterTarget(const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget)
CYISceneNode * GetParent() const
static constexpr DirtyFlag DirtyWorldSurfaceScale
Definition: YiSceneNode.h:290
static constexpr DirtyFlag DirtyWorldTransform
Definition: YiSceneNode.h:261
void SetAccessibilityAttributes(std::unique_ptr< CYIAccessibilityAttributes > pAttributes)
void StopCaptureTrackpadEvents()
static constexpr DirtyFlag DirtyLocalBoundingBox
Definition: YiSceneNode.h:303
CYISceneNode * GetChild(size_t index) const
size_t GetMaskCount() const
virtual void OnVisibilityUpdated()
std::vector< std::unique_ptr< PropertyAnimation > > m_propertyAnimations
Definition: YiSceneNode.h:2095
bool operator!=(const Iterator &other) const
Iterator end(Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
bool DrawInFrontOfChildren(CYISceneNode *pSceneNode, bool *pChanged=nullptr)
virtual void BuildDrawList(std::vector< IYIRenderer::Command > &drawList, CYIAbstractCameraSceneNode *pCameraToDrawWith=nullptr)
virtual void ApplyMeasurements()
A representation of a single track of a CYITimeline.
Definition: YiTimelineTrack.h:25
virtual ~CYISceneNode()
Provides a base for the definition of camera objects.
Definition: YiAbstractCameraSceneNode.h:31
virtual CYIAbstractCameraSceneNode * FindActiveCamera(const CYISceneNode *pTargetSceneNode=nullptr) const
const glm::vec3 & GetPosition() const
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
static constexpr DirtyFlag DirtyLocalTransform
Definition: YiSceneNode.h:253
void ConnectEffectsToTimelines(const CYITimelineTrack *pTrack)
const glm::vec3 & GetAnchorPoint() const
virtual void OnUpdateBegin()
bool IsFocusRoot() const
const glm::mat4 & GetWorldTransform() const
size_t GetChildCount() const
virtual void SetSize(const glm::vec3 &size, bool dirtyLayout=true)
bool IsBoundingBoxHit(const CYIRay &rWorldSpaceRay) const
virtual void LocalBoundingBoxUpdated()
CYIMaterial is a place holder for all the drawing parameters required by the renderer to draw a mesh/...
Definition: YiMaterial.h:26
Iterator begin(Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
friend class CYISceneNode
Definition: YiSceneNode.h:130
CYIAnimation m_animation
Definition: YiSceneNode.h:201
virtual void CompositeOpacityUpdated()
void SetAccessible(CYIAccessibilityAttributes::Accessible accessible)
size_t GetIndexOfChild(const CYISceneNode *pSceneNode) const
virtual void OnSizeChanged()
Iterator & operator++()
void StopCaptureKeyboardEvents()
const glm::vec3 & GetRotation() const
Adds a masking effect to a scene node.
Definition: YiMask.h:18
A class used to proxy access to a CYISceneNode.
Definition: YiSceneNodeProxy.h:26
const std::shared_ptr< CYIEffect > & GetEffect(size_t index) const
void SetPosition(const glm::vec3 &position)
std::unique_ptr< CYIMask > RemoveMask(const CYIMask *pMask)
virtual CYIString GetDumpTreeString() const
static constexpr DirtyFlag DirtyMesh
Definition: YiSceneNode.h:283
CYISignal< CYIAccessibilityAttributes::Accessible > AccessibleStateChanged
Emitted when accessible state changed.
Definition: YiSceneNode.h:1723
MeasureSpec()
Definition: YiSceneNode.h:375
const glm::vec3 & GetSize() const
std::list< YI_SCENE_NODE_SUBCLASS * > GetDrawChildren() const
const glm::vec3 & GetWorldSurfaceScale() const
void StopCapturePointerEvents(uint8_t pointerID)
const CYIString & GetName() const
virtual void ChildVisibilityChanged(CYISceneNode *pChild)
virtual bool BroadcastEvent(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent)
CYIAABB m_WSClipBox
Definition: YiSceneNode.h:2104
void SetScale(const glm::vec3 &scale)
float m_to
Definition: YiSceneNode.h:203
void AddMask(std::unique_ptr< CYIMask > pMask)
virtual void FocusLostInDescendants()
size_t GetIndexOfDrawChild(const CYISceneNode *pSceneNode) const
CYIAccessibilityAttributes::Accessible GetAccessible() const
LayoutDirtyFlag GetLayoutDirtyFlag() const
void SetAnchorPointZ(float z)
float GetLocalOpacity() const
void DumpTree() const
const std::shared_ptr< IYIUniformBufferObject > & GetShaderUniforms() const
const glm::vec3 & GetScale() const
CYISceneNode * value_type
Definition: YiSceneNode.h:132
uint32_t GetChildCountRecursive() const
std::shared_ptr< CYISceneNodeProxy > GetSceneNodeProxy() const
const CYIAccessibilityAttributes * GetAccessibilityAttributes() const
static constexpr DirtyFlag DirtySceneGraph
Definition: YiSceneNode.h:232
bool DrawBehind(CYISceneNode *pSceneNode, bool *pChanged=nullptr)
static constexpr DirtyFlag DirtyClean
Definition: YiSceneNode.h:226
void SetPositionX(float x)
void SetAnchorPoint(const glm::vec3 &anchorPoint)
uint16_t DirtyFlag
Definition: YiSceneNode.h:221
Encapsulates the origin and direction points of a ray.
Definition: YiRay.h:32
void SetOpacity(float opacity)
CYITransform * GetTransform()
Definition: YiSceneNode.h:569
virtual void OnWorldBoundingBoxUpdated()
std::shared_ptr< CYIMesh > m_pMesh
Definition: YiSceneNode.h:2122
CYIString m_name
Definition: YiSceneNode.h:2085
virtual void UpdateBegin()
virtual void OnWorldScaleUpdated()
void SetInternalCustomTimelineValue(uint32_t trackID, const CYIVariant &value)
int32_t GetID() const
glm::vec3 m_initialSize
Definition: YiSceneNode.h:2111
const glm::mat4 & GetEffectTransform() const
void SetAnchorPointY(float y)
const CYIMask * GetMask(size_t index) const
void RemoveEffect(const std::shared_ptr< CYIEffect > &pEffect)
Represents an event target of type CYIEventTarget::SpecialEventTargetType.
Definition: YiEventTarget.h:25
virtual void OnFocusGainedInDescendants()
MeasureMode mode
Definition: YiSceneNode.h:391
FetchType
Definition: YiSceneNode.h:358
CYISceneNode * GetDrawChild(size_t index) const
virtual void UpdateEnd()
std::shared_ptr< CYIRenderTarget > m_pRenderTarget
Definition: YiSceneNode.h:2121
glm::mat4 m_EffectTransform
Definition: YiSceneNode.h:2106
std::unique_ptr< CYITransform > m_pTransform
Definition: YiSceneNode.h:2108
virtual bool Init()
A container class that either contains a value or &#39;nothing&#39;.
Definition: YiOptional.h:58
virtual void OnDirtyFlagChanged()
CYISignal DescendantsChangedFocus
Emitted when focus has changed within this tree.
Definition: YiSceneNode.h:1722
Defines a target for the rendering results to be sent to.
Definition: YiRenderTarget.h:51
bool GetClipping() const
virtual void DirtyFlagChanged()
float m_from
Definition: YiSceneNode.h:202
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:99
Definition: YiSceneNode.h:373
void SetIsFocusRoot(bool isFocusRoot)
Iterator operator+(int n) const
void SetOrientation(float pitchDegrees, float yawDegrees, float rollDegrees)
CYIString GetUniqueName() const
Provides transformation APIs.
Definition: YiTransform.h:19
std::bidirectional_iterator_tag iterator_category
Definition: YiSceneNode.h:131
CYISignal DescendantGainedFocus
Emitted when focus has entered this tree.
Definition: YiSceneNode.h:1720
A class used to hold node-specific layout configuration (such as, for example, Margin).
Definition: YiLayoutConfig.h:25
CYISignal< CYISceneNode *, PropertyAnimation::Type > PropertyAnimationComplete
Definition: YiSceneNode.h:1718
void SetProperty(const CYIString &rPropertyName, const CYIString &rPropertyValue)
void SetDirtyFlag(DirtyFlag dirtyFlag)
std::unique_ptr< CYINPatch > m_pNPatch
Definition: YiSceneNode.h:2123
Class representing a node property animation.
Definition: YiSceneNode.h:164
void SetUseLocalTransformAndAlpha(bool use)
virtual void FocusGainedInDescendants()
Iterator & operator--()
void SetPositionZ(float z)
virtual void SetCustomUniforms()
bool m_clip
Definition: YiSceneNode.h:2115
friend class UnitTestSetupHelper
Definition: YiSceneNode.h:2231
virtual void OnTransformUpdated()
LayoutDirtyFlag
Definition: YiSceneNode.h:310
std::shared_ptr< CYIBitmap > m_pNPatchBitmap
Definition: YiSceneNode.h:2124
std::list< CYISceneNode * > GetNodes(CYIStringView name)
static constexpr DirtyFlag DirtyUniform
Definition: YiSceneNode.h:267
value_type operator*() const
void SetScaleX(float factor)
The abstract runtime representation of a C++ type.
Definition: YiRtti.h:56
MeasureSpec(MeasureMode mode, float size)
Definition: YiSceneNode.h:380
float m_localOpacity
Definition: YiSceneNode.h:2102
virtual void OnUpdateEnd()
virtual void WorldSurfaceScaleUpdated()
virtual bool ProcessEvent(const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override
bool IsPerceptible() const
Definition: YiEffect.h:42
bool m_dirtyLayout
Definition: YiSceneNode.h:204
Definition: YiSignalHandler.h:175
CYISceneNode * m_pDrawParent
Definition: YiSceneNode.h:2087
glm::vec3 m_vlsLastCollision
Definition: YiSceneNode.h:2113
bool InsertChildAfter(CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode)
bool AddChild(std::unique_ptr< CYISceneNode > pSceneNode)
A class used to hold node-specific layout state.
Definition: YiLayoutState.h:16
static constexpr DirtyFlag DirtyWorldBoundingBox
Definition: YiSceneNode.h:274
void SetLayoutState(std::unique_ptr< CYILayoutState > pLayoutState)
std::vector< CYISceneNode * > m_drawChildren
Definition: YiSceneNode.h:2090
void SetClippingOff()
std::vector< std::shared_ptr< CYIMaterial > > m_pMaterials
Definition: YiSceneNode.h:2092
const CYIAABB & GetClippingBox() const
virtual void WorldBoundingBoxUpdated()
size_t GetDrawChildCount() const
virtual void OnLocalBoundingBoxUpdated()
void ClearNPatch()
void ForceDirty()
An interface to a class that provides key-value properties.
Definition: YiPropertiesSource.h:21
virtual void LayoutDirtied()
CYISceneNode * GetDrawChildByID(int32_t id) const
float size
Definition: YiSceneNode.h:392
This class represents an Axis-Aligned Bounding Box.
Definition: YiAABB.h:24
virtual void FocusChangedInDescendants()
CYISceneNode * reference
Definition: YiSceneNode.h:135
uint64_t m_guid
Definition: YiSceneNode.h:2119
DirtyFlag GetPreviousDirtyFlag() const
virtual void ForEachProperty(const std::function< void(const CYIString &, const CYIString &)> &action) const override
std::shared_ptr< CYISceneNodeProxy > m_pNodeProxy
Definition: YiSceneNode.h:199
Type
Definition: YiRenderer.h:42
void SetAnchorPointX(float x)
Iterator operator-(int n) const
void SetSceneManager(CYISceneManager *pSceneManager)
bool Intersects(const CYISceneNode *pNode) const
void SetMeshTransform(const glm::mat4 &rTransform)
An accessibility attributes defines the accessibility related properties of the containing scene node...
Definition: YiAccessibilityAttributes.h:23
const glm::mat4 & GetLocalTransform() const
virtual void ChildAdded(CYISceneNode *pChild)
void SetMeasuredSize(const glm::vec3 &measuredSize)
void SetClippingBox(const CYIAABB &rWorldBox)
Accessible
The accessible type of the CYIAccessibilityAttributes class instance.
Definition: YiAccessibilityAttributes.h:29
void SetName(const CYIString &name)
Used to create animations programatically.
Definition: YiAnimation.h:31
#define YI_TYPE_BASES(CLASS, BASES...)
Definition: YiRtti.h:257
CYISignal DescendantLostFocus
Emitted when focus has left this tree.
Definition: YiSceneNode.h:1721
void SetLayoutConfig(std::unique_ptr< CYILayoutConfig > pLayoutConfig)
LayoutDirtyFlag GetCurrentLayoutDirtyFlag() const
Common interface for shader uniform buffers.
Definition: YiUniformBufferObject.h:16
Iterator & operator-=(int n)
const CYIAABB & GetWorldAABB() const
virtual void VisibilityUpdated()
void SetNodeType()
virtual void OnFocusLostInDescendants()
const std::shared_ptr< CYIMaterial > & GetMaterial(size_t index=0) const
void SetMaterial(const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0)
virtual void ChildNeedsLayout()
virtual void OnChildRemoved(CYISceneNode *pChild)
virtual void OnWorldSurfaceScaleUpdated()
std::vector< std::unique_ptr< CYISceneNode > > m_children
Definition: YiSceneNode.h:2089
virtual void SetCustomTimelineValue(uint32_t trackID, const CYIVariant &value)
Mode
Definition: YiSceneNode.h:117
const glm::quat & GetOrientation() const
bool IsVisible() const
const glm::vec3 & GetMeasuredSize() const
void SetScaleZ(float factor)
std::unique_ptr< CYISceneNode > RemoveChild(CYISceneNode *pSceneNode)
const CYILayoutState * GetLayoutState() const
bool DrawInFront(CYISceneNode *pSceneNode, bool *pChanged=nullptr)
static const MeasureSpec defaultSpec
Definition: YiSceneNode.h:389
const CYIAABB & GetLocalAABB() const
void SetRenderTarget(const std::shared_ptr< CYIRenderTarget > &pRenderTarget)
MeasureMode
Definition: YiSceneNode.h:339
bool SetNPatchBitmap(const std::shared_ptr< CYIBitmap > &pNPatchBitmap)
Base class used to listen to one or more CYIAnimations as they update over time.
Definition: YiAnimation.h:61
void AddEffect(const std::shared_ptr< CYIEffect > &pEffect)
static constexpr DirtyFlag DirtyWorldScale
Definition: YiSceneNode.h:297
bool ChangeParent(CYISceneNode *pParent)
void SetPositionY(float y)
ReverseIterator rbegin(Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const
const std::shared_ptr< CYIRenderTarget > & GetRenderTarget() const
void RequestLayout()
std::reverse_iterator< Iterator > ReverseIterator
Definition: YiSceneNode.h:106
ptrdiff_t difference_type
Definition: YiSceneNode.h:133
CYISceneNode ** pointer
Definition: YiSceneNode.h:134
static const float OPACITY_NOT_VISIBLE_EPSILON
Definition: YiSceneNode.h:104
std::list< YI_SCENE_NODE_SUBCLASS * > GetChildren() const
virtual void WorldScaleUpdated()
CYISceneManager * GetSceneManager() const
Stores data related to a user Action event.
Definition: YiActionEvent.h:18
virtual void ChildRemoved(CYISceneNode *pChild)
void SetClippingOn()
const std::shared_ptr< CYIBitmap > & GetNPatchBitmap() const
void SetRotationY(float yawDegrees)
bool IsAncestorOf(const CYISceneNode *pNode) const
static constexpr DirtyFlag DirtyOpacity
Definition: YiSceneNode.h:246
void SetScaleY(float factor)
bool ReorderChild(size_t fromIndex, size_t toIndex)
static constexpr DirtyFlag DirtyEverything
Definition: YiSceneNode.h:308
A lightweight wrapper around a sequence of Unicode characters.
Definition: YiStringView.h:57
void DestroyChildren()
const glm::vec3 & GetWorldScale() const