public VEnvironmentData(NotuiElement element) { _element = element; TypeCSharpName = element.GetType().GetCSharpName(); element.OnMainLoopEnd += (sender, args) => { Touches.AssignFrom(_element.Touching.Keys); TouchesHitting.AssignFrom(_element.Touching.Values.Select(t => t != null)); TouchingIntersections.AssignFrom(_element.Touching.Values.Where(t => t != null)); HittingTouches.AssignFrom(_element.Hitting.Keys); HittingIntersections.AssignFrom(_element.Hitting.Values); Mice.AssignFrom(_element.Mice.Select(t => t.AttachadMouse)); Children.AssignFrom(_element.Children.Values); Behaviors.AssignFrom(_element.Behaviors); if (_element.Parent == null) { Parent.SliceCount = 0; } else { Parent.SliceCount = 1; Parent[0] = element.Parent; } VDispTr = _element.DisplayMatrix.AsVMatrix4X4(); }; }