public GeoNode(GeoParent Parent) : base(EnsureParentGetRoot(Parent)) { this.BuiltTransform = Transform.Identity; this.Local = TransformI.Identity; this.LocalCached = TransformI.Identity; this.Outer = (Root == Parent) ? this : (GeoNode)Parent; this.Depth = this.Outer == this ? 0u : (this.Outer.Depth + 1u); if (0 == this.Root.Num++) { this.Next = this; } else { this.Next = this.Root.Last.Next; this.Root.Last.Next = this; } this.Root.Last = this; if (0 == (this.ChildIndex = Parent.NumImmediate++)) { this.Sibling = this; } else { this.Sibling = Parent.LastChild.Sibling; Parent.LastChild.Sibling = this; } Parent.LastChild = this; this.ID = this.Root.IDCounter++; this.ExplicitlyDirty = 0 != Depth; }
private static GeoRoot EnsureParentGetRoot(GeoParent Parent) { if (null == Parent) { throw new ArgumentNullException("Parent"); } if (Parent != Parent.Root && !(Parent is GeoNode)) { throw new ArgumentException("Parent must be either a GeoRoot or GeoNode!", "Parent"); } if (null == Parent.Root) { throw new ArgumentException("Parent does not reference a valid root", "Parent"); } return(Parent.Root); }
public Enumerator(GeoParent Parent) { Remaining = null == Parent ? 0u : Parent.NumImmediate; Active = (Remaining == 0) ? null : Parent.LastChild; }
private ImmediateCollection(GeoParent This) { this.This = This; }
public bool Equals(GeoParent other) { return(This == other); }
private DeepCollection(GeoParent This) { this.This = This; }