Node.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. namespace EMotionFX
  9. {
  10. class Actor;
  11. class Skeleton;
  12. class NodeAttribute;
  13. class Node
  14. {
  15. friend class Actor;
  16. public:
  17. enum
  18. {
  19. TYPE_ID = 0x00000001
  20. };
  21. static Node* Create(const char* name, Skeleton* skeleton);
  22. static Node* Create(uint32 nameID, Skeleton* skeleton);
  23. MOCK_CONST_METHOD1(Clone, Node*(Skeleton* skeleton));
  24. MOCK_METHOD1(SetParentIndex, void(size_t parentNodeIndex));
  25. MOCK_CONST_METHOD0(GetParentIndex, size_t());
  26. MOCK_CONST_METHOD0(GetParentNode, Node*());
  27. MOCK_CONST_METHOD2(RecursiveCollectParents, void(AZStd::vector<size_t>& parents, bool clearParentsArray));
  28. MOCK_METHOD1(SetName, void(const char* name));
  29. MOCK_CONST_METHOD0(GetName, const char*());
  30. MOCK_CONST_METHOD0(GetNameString, const AZStd::string&());
  31. MOCK_METHOD1(SetSemanticName, void(const char* name));
  32. MOCK_CONST_METHOD0(GetSemanticName, const char*());
  33. MOCK_CONST_METHOD0(GetSemanticNameString, const AZStd::string&());
  34. MOCK_CONST_METHOD0(GetID, uint32());
  35. MOCK_CONST_METHOD0(GetSemanticID, uint32());
  36. MOCK_CONST_METHOD0(GetNumChildNodes, size_t());
  37. MOCK_CONST_METHOD0(GetNumChildNodesRecursive, size_t());
  38. MOCK_CONST_METHOD1(GetChildIndex, size_t(size_t nr));
  39. MOCK_CONST_METHOD1(CheckIfIsChildNode, bool(size_t nodeIndex));
  40. MOCK_METHOD1(AddChild, void(size_t nodeIndex));
  41. MOCK_METHOD2(SetChild, void(size_t childNr, size_t childNodeIndex));
  42. MOCK_METHOD1(SetNumChildNodes, void(size_t numChildNodes));
  43. MOCK_METHOD1(PreAllocNumChildNodes, void(size_t numChildNodes));
  44. MOCK_METHOD1(RemoveChild, void(size_t nodeIndex));
  45. MOCK_METHOD0(RemoveAllChildNodes, void());
  46. MOCK_CONST_METHOD0(GetIsRootNode, bool());
  47. MOCK_CONST_METHOD0(GetHasChildNodes, bool());
  48. MOCK_CONST_METHOD0(FindRoot, Node*());
  49. MOCK_METHOD1(AddAttribute, void(NodeAttribute* attribute));
  50. MOCK_CONST_METHOD0(GetNumAttributes, size_t());
  51. MOCK_METHOD1(GetAttribute, NodeAttribute*(size_t attributeNr));
  52. MOCK_METHOD1(GetAttributeByType, NodeAttribute*(uint32 attributeType));
  53. MOCK_CONST_METHOD1(FindAttributeNumber, size_t(uint32 attributeTypeID));
  54. MOCK_METHOD0(RemoveAllAttributes, void());
  55. MOCK_METHOD1(RemoveAttribute, void(size_t index));
  56. MOCK_METHOD2(RemoveAttributeByType, void(uint32 attributeTypeID, size_t occurrence));
  57. MOCK_METHOD1(RemoveAllAttributesByType, size_t(uint32 attributeTypeID));
  58. MOCK_METHOD1(SetNodeIndex, void(size_t index));
  59. MOCK_CONST_METHOD0(GetNodeIndex, size_t());
  60. MOCK_METHOD1(SetSkeletalLODLevelBits, void(uint32 bitValues));
  61. MOCK_METHOD2(SetSkeletalLODStatus, void(size_t lodLevel, bool enabled));
  62. MOCK_CONST_METHOD1(GetSkeletalLODStatus, bool(size_t lodLevel));
  63. MOCK_CONST_METHOD0(GetIncludeInBoundsCalc, bool());
  64. MOCK_METHOD1(SetIncludeInBoundsCalc, void(bool includeThisNode));
  65. MOCK_CONST_METHOD0(GetIsAttachmentNode, bool());
  66. MOCK_METHOD1(SetIsAttachmentNode, void(bool isAttachmentNode));
  67. };
  68. } // namespace EMotionFX