示例#1
0
		public CoreTrack(XmlElement e, CoreSkeleton skeleton)
		{
			int boneId = int.Parse(e.GetAttribute("BONEID"));
			bone = skeleton.GetBone(boneId);

			keys = e.SelectElements("./KEYFRAME").Select(
				x => new Pair<float, Transform>(
					float.Parse(x.GetAttribute("TIME")),
					new Transform(
						Util.ReadQuaternion(x.SelectSingleNode("./ROTATION")),
						Util.ReadVector3(x.SelectSingleNode("./TRANSLATION"))))).ToList();
		}
示例#2
0
		public Bone(CoreBone coreBone, Skeleton skeleton)
		{
			this.coreBone = coreBone;
			this.skeleton = skeleton;
			this.transform = coreBone.Transform;
		}
示例#3
0
		internal Bone GetBone(CoreBone bone)
		{
			return bones[bone];
		}
示例#4
0
		internal void AddChild(CoreBone bone)
		{
			children.Add(bone);
		}
示例#5
0
		internal CoreTrack GetTrack(CoreBone bone)
		{
			return tracks.FirstOrDefault(x => x.Bone == bone);
		}