BsSkeletonEx.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptResource.h"
  6. #include "BsSkeleton.h"
  7. namespace bs
  8. {
  9. /** @addtogroup ScriptInteropEngine
  10. * @{
  11. */
  12. /** Contains internal information about a single bone in a Skeleton. */
  13. struct BS_SCRIPT_EXPORT(n:BoneInfo,pl:true) SkeletonBoneInfoEx
  14. {
  15. /** Unique name of the bone. */
  16. String name;
  17. /** Index of the parent bone (within the relevant Skeleton object). -1 if root bone. */
  18. int parent;
  19. /** Inverse transform of the pose the skeleton was initially created in. */
  20. Matrix4 invBindPose;
  21. };
  22. /** Extension class for Skeleton, for adding additional functionality for the script version of the class. */
  23. class BS_SCRIPT_EXPORT(e:Skeleton) SkeletonEx
  24. {
  25. public:
  26. /** Returns information about a bone at the provided index.
  27. *
  28. * @param[in] boneIdx Index of the bone to retrieve information for.
  29. * @return Information about the bone at the specified index.
  30. */
  31. BS_SCRIPT_EXPORT(e:Skeleton,n:GetBoneInfo)
  32. static SkeletonBoneInfoEx getBoneInfo(const SPtr<Skeleton>& thisPtr, int boneIdx);
  33. };
  34. /** @} */
  35. }