Beispiel #1
0
        private void MoveHeldObjects(object sender, ChangeMatrixEventArgs e)
        {
            if (HeldObjects.Count == 0)
            {
                return;
            }

            var change = e.NewMatrix * e.OldMatrix.Inversed();

            var linked = new List <Vertex>();

            foreach (var obj in HeldObjects)
            {
                if (obj is Vertex vert)
                {
                    if (linked.Contains(vert))
                    {
                        continue;
                    }

                    if (vert.Parent is BezierSurfaceC0 surf && surf.LinkedVertices.ContainsKey(vert))
                    {
                        linked.Add(surf.LinkedVertices[vert]);
                    }
                }

                obj.GlobalMatrix *= change;
            }
        }
Beispiel #2
0
 private void SceneObject_MatrixChange(object sender, ChangeMatrixEventArgs e)
 {
     foreach (var child in Children)
     {
         child.NotifyMatrixChange();
         child.NotifyAllChanges();
     }
     foreach (var child in HiddenChildren)
     {
         child.NotifyMatrixChange();
         child.NotifyAllChanges();
     }
 }
Beispiel #3
0
 private void UpdateCursorScreenPosition(object sender, ChangeMatrixEventArgs e)
 {
     _scene.Cursor.ScreenPosition = _rayCaster.GetScreenPositionOf(_scene.Cursor);
 }
 private void ListenerMsg(Object sender, ChangeMatrixEventArgs eventArgs)
 {
     Console.WriteLine("Change occurred : [{0},{1}]", eventArgs.IndexRow, eventArgs.IndexColumn);
 }