Пример #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);
		}