/// <summary> /// Add the Child with the given Index from the List /// </summary> /// <param name="index"></param> /// <returns>True, when the Child was added</returns> public bool AddChild(int index) { for (int i = 0; i < Items.Length; i++) { if (Items[i].ChildNode == index) { return(false); } } TransformNodeItem tni = new TransformNodeItem(); tni.ChildNode = index; items.Add(tni); return(false); }
/// <summary> /// Unserializes a BinaryStream into the Attributes of this Instance /// </summary> /// <param name="reader">The Stream that contains the FileData</param> public override void Unserialize(System.IO.BinaryReader reader) { version = reader.ReadUInt32(); string name = reader.ReadString(); uint myid = reader.ReadUInt32(); ctn.Unserialize(reader); ctn.BlockID = myid; name = reader.ReadString(); myid = reader.ReadUInt32(); ogn.Unserialize(reader); ogn.BlockID = myid; //items = new TransformNodeItem[]; uint count = reader.ReadUInt32(); items.Clear(); for (int i = 0; i < count; i++) { TransformNodeItem tni = new TransformNodeItem(); tni.Unserialize(reader); items.Add(tni); } trans.Order = VectorTransformation.TransformOrder.TranslateRotate; trans.Unserialize(reader); #if DEBUG trans.Name = this.ogn.FileName; #endif //trans.Rotation = Quaternion.FromAxisAngle(trans.Rotation.X, trans.Rotation.Y, trans.Rotation.Z, Quaternion.DegToRad(trans.Rotation.W)); unknown = reader.ReadInt32(); }
/// <summary> /// Checks wether or not the object is already stored in the List /// </summary> /// <param name="item">The Object you are looking for</param> /// <returns>true, if it was found</returns> public bool Contains(TransformNodeItem item) { return(base.Contains(item)); }
/// <summary> /// remove an Element /// </summary> /// <param name="item">The object that should be removed</param> public void Remove(TransformNodeItem item) { base.Remove(item); }
/// <summary> /// insert a new Element /// </summary> /// <param name="index">The Index where the Element should be stored</param> /// <param name="item">The object that should be inserted</param> public void Insert(int index, TransformNodeItem item) { base.Insert(index, item); }
/// <summary> /// add a new Element /// </summary> /// <param name="item">The object you want to add</param> /// <returns>The index it was added on</returns> public int Add(TransformNodeItem item) { return(base.Add(item)); }