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(); }
public Bone(CoreBone coreBone, Skeleton skeleton) { this.coreBone = coreBone; this.skeleton = skeleton; this.transform = coreBone.Transform; }
internal Bone GetBone(CoreBone bone) { return bones[bone]; }
internal void AddChild(CoreBone bone) { children.Add(bone); }
internal CoreTrack GetTrack(CoreBone bone) { return tracks.FirstOrDefault(x => x.Bone == bone); }