Example #1
0
 public BoneWrapper GetBoneSafe(uint index)
 {
     unsafe
     {
         Bone *result = Skeleton_GetBone(handle, index);
         if (result == null)
         {
             return(null);
         }
         return(new BoneWrapper(this, result));
     }
 }
Example #2
0
 public BoneWrapper GetBoneSafe(String name)
 {
     unsafe
     {
         Bone *result = Skeleton_GetBone0(handle, new StringHash(name).Code);
         if (result == null)
         {
             return(null);
         }
         return(new BoneWrapper(this, result));
     }
 }
Example #3
0
 public BoneWrapper GetBoneSafe(uint index)
 {
     Runtime.ValidateObject(this);
     unsafe
     {
         Bone *result = Skeleton_GetBone(handle, index);
         if (result == null)
         {
             return(null);
         }
         return(new BoneWrapper(this, result));
     }
 }
Example #4
0
 public BoneWrapper GetBoneSafe(StringHash nameHash)
 {
     Runtime.ValidateObject(this);
     unsafe
     {
         Bone *result = Skeleton_GetBone0(handle, nameHash.Code);
         if (result == null)
         {
             return(null);
         }
         return(new BoneWrapper(this, result));
     }
 }
Example #5
0
 public BoneWrapper(object objHolder, Bone *bone)
 {
     this.objHolder = objHolder;
     this.b         = bone;
 }
Example #6
0
 /// <summary>
 /// Set start bone. Not supported in node animation mode. Resets any assigned per-bone weights.
 /// </summary>
 private void SetStartBone(Bone *bone)
 {
     Runtime.ValidateRefCounted(this);
     AnimationState_SetStartBone(handle, bone);
 }
Example #7
0
 internal static extern void AnimationState_SetStartBone(IntPtr handle, Bone *bone);
Example #8
0
 /// <summary>
 /// Return parent of the given bone. Return null for root bones.
 /// </summary>
 public Bone *GetBoneParent(Bone *bone)
 {
     Runtime.ValidateObject(this);
     return(Skeleton_GetBoneParent(handle, bone));
 }
Example #9
0
 internal static extern Bone *Skeleton_GetBoneParent(IntPtr handle, Bone *bone);
Example #10
0
 /// <summary>
 /// Return index of the bone by the bone pointer. Return M_MAX_UNSIGNED if not found.
 /// </summary>
 public uint GetBoneIndex(Bone *bone)
 {
     Runtime.ValidateObject(this);
     return(Skeleton_GetBoneIndex0(handle, bone));
 }
Example #11
0
 internal static extern uint Skeleton_GetBoneIndex0(IntPtr handle, Bone *bone);