BsSkeletonEx.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 "Wrappers/BsScriptResource.h"
  6. #include "Animation/BsSkeleton.h"
  7. namespace bs
  8. {
  9. /** @addtogroup ScriptInteropEngine
  10. * @{
  11. */
  12. /** @cond SCRIPT_EXTENSIONS */
  13. /** Contains internal information about a single bone in a Skeleton. */
  14. struct BS_SCRIPT_EXPORT(n:BoneInfo,pl:true) SkeletonBoneInfoEx
  15. {
  16. /** Unique name of the bone. */
  17. String name;
  18. /** Index of the parent bone (within the relevant Skeleton object). -1 if root bone. */
  19. int parent;
  20. /** Inverse transform of the pose the skeleton was initially created in. */
  21. Matrix4 invBindPose;
  22. };
  23. /** Extension class for Skeleton, for adding additional functionality for the script version of the class. */
  24. class BS_SCRIPT_EXPORT(e:Skeleton) SkeletonEx
  25. {
  26. public:
  27. /** Returns information about a bone at the provided index.
  28. *
  29. * @param[in] boneIdx Index of the bone to retrieve information for.
  30. * @return Information about the bone at the specified index.
  31. */
  32. BS_SCRIPT_EXPORT(e:Skeleton,n:GetBoneInfo)
  33. static SkeletonBoneInfoEx getBoneInfo(const SPtr<Skeleton>& thisPtr, int boneIdx);
  34. };
  35. /** @endcond */
  36. /** @} */
  37. }