//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// using System; using System.Runtime.CompilerServices; namespace BansheeEngine { /** @addtogroup Animation * @{ */ /// /// Contains information about bones required for skeletal animation. /// public class Skeleton : ScriptObject { /// /// Constructor for internal runtime use only. /// private Skeleton() { } /// /// Returns the total number of bones in the skeleton. /// /// Number of bones. public int NumBones { get { return Internal_GetNumBones(mCachedPtr); } } /// /// Returns information about a bone at the provided index. /// /// Index of the bone to retrieve information for. /// Information about the bone, or null if index was out of range. public BoneInfo GetBoneInfo(int boneIdx) { return Internal_GetBoneInfo(mCachedPtr, boneIdx); } [MethodImpl(MethodImplOptions.InternalCall)] private static extern int Internal_GetNumBones(IntPtr thisPtr); [MethodImpl(MethodImplOptions.InternalCall)] private static extern BoneInfo Internal_GetBoneInfo(IntPtr thisPtr, int boneIdx); } /// /// Contains internal information about a single bone in a . /// public class BoneInfo { /// /// Unique name of the bone. /// public string Name; /// /// Index of the parent bone (within the relevant object). -1 if root bone. /// public int Parent; /// /// Inverse transform of the pose the skeleton was initially created in. /// public Matrix4 InvBindPose; } /** @} */ }