Пример #1
0
 public static EditorObject GetObjectFromScreenPoint(Vec2 pt, out Vec3 hitPos, bool includeFrozen, EditorObjectSelection ignore)
 {
     EditorObject result;
     using (PhysEntityVector vector = PhysEntityVector.Create())
     {
         ignore.GetPhysEntities(vector);
         result = new EditorObject(Binding.FCE_ObjectManager_GetObjectFromScreenPoint(pt.X, pt.Y, out hitPos.X, out hitPos.Y, out hitPos.Z, includeFrozen, vector.Pointer));
     }
     return result;
 }
Пример #2
0
 public static bool RayCastPhysics(Vec3 raySrc, Vec3 rayDir, EditorObjectSelection ignore, out Vec3 hitPos, out float hitDist, out Vec3 hitNormal)
 {
     return Binding.FCE_Editor_RayCastPhysics2(raySrc.X, raySrc.Y, raySrc.Z, rayDir.X, rayDir.Y, rayDir.Z, ignore.Pointer, out hitPos.X, out hitPos.Y, out hitPos.Z, out hitDist, out hitNormal.X, out hitNormal.Y, out hitNormal.Z);
 }
Пример #3
0
 public static bool RayCastPhysics(Vec3 raySrc, Vec3 rayDir, EditorObjectSelection ignore, out Vec3 hitPos, out float hitDist)
 {
     Vec3 vec;
     return Editor.RayCastPhysics(raySrc, rayDir, ignore, out hitPos, out hitDist, out vec);
 }
Пример #4
0
 public void AddSelection(EditorObjectSelection selection)
 {
     Binding.FCE_ObjectSelection_AddSelection(this.m_selPtr, selection.Pointer);
 }
Пример #5
0
 public void GetValidObjects(EditorObjectSelection selection)
 {
     Binding.FCE_ObjectSelection_GetValidObjects(this.m_selPtr, selection.Pointer);
 }
Пример #6
0
 public static void GetObjectsFromScreenRect(EditorObjectSelection selection, RectangleF rect, bool includeFrozen)
 {
     Binding.FCE_ObjectManager_GetObjectsFromScreenRect(selection.Pointer, rect.Left, rect.Top, rect.Right, rect.Bottom, includeFrozen);
 }
Пример #7
0
        public static EditorObject GetObjectFromScreenPoint(Vec2 pt, out Vec3 hitPos, bool includeFrozen, EditorObjectSelection ignore)
        {
            EditorObject result;

            using (PhysEntityVector vector = PhysEntityVector.Create())
            {
                ignore.GetPhysEntities(vector);
                result = new EditorObject(Binding.FCE_ObjectManager_GetObjectFromScreenPoint(pt.X, pt.Y, out hitPos.X, out hitPos.Y, out hitPos.Z, includeFrozen, vector.Pointer));
            }
            return(result);
        }
Пример #8
0
 private void SelectObject(EditorObjectSelection selection, EditorObject obj)
 {
     bool flag = (Control.ModifierKeys & Keys.Control) != Keys.None;
     Keys arg_17_0 = Control.ModifierKeys;
     bool flag2 = (Control.ModifierKeys & Keys.Alt) != Keys.None;
     if (this.m_paramMagicWand.Value)
     {
         using (EditorObjectSelection selection2 = EditorObjectSelection.Create())
         {
             ObjectManager.GetObjectsFromMagicWand(selection2, obj);
             if (flag)
             {
                 selection.ToggleSelection(selection2);
             }
             else
             {
                 if (flag2)
                 {
                     selection.RemoveSelection(selection2);
                 }
                 else
                 {
                     selection.AddSelection(selection2);
                 }
             }
         }
         return;
     }
     if (flag)
     {
         selection.ToggleObject(obj);
         return;
     }
     if (flag2)
     {
         selection.RemoveObject(obj);
         return;
     }
     selection.AddObject(obj);
 }
Пример #9
0
 public static void GetObjectsFromMagicWand(EditorObjectSelection selection, EditorObject obj)
 {
     Binding.FCE_ObjectManager_GetObjectsFromMagicWand(selection.Pointer, obj.Pointer);
 }
Пример #10
0
 public static bool RayCastPhysics(Vec3 raySrc, Vec3 rayDir, EditorObjectSelection ignore, out Vec3 hitPos, out float hitDist, out Vec3 hitNormal)
 {
     return(Binding.FCE_Editor_RayCastPhysics2(raySrc.X, raySrc.Y, raySrc.Z, rayDir.X, rayDir.Y, rayDir.Z, ignore.Pointer, out hitPos.X, out hitPos.Y, out hitPos.Z, out hitDist, out hitNormal.X, out hitNormal.Y, out hitNormal.Z));
 }
Пример #11
0
        public static bool RayCastPhysics(Vec3 raySrc, Vec3 rayDir, EditorObjectSelection ignore, out Vec3 hitPos, out float hitDist)
        {
            Vec3 vec;

            return(Editor.RayCastPhysics(raySrc, rayDir, ignore, out hitPos, out hitDist, out vec));
        }
Пример #12
0
 public void ToggleSelection(EditorObjectSelection selection)
 {
     Binding.FCE_ObjectSelection_ToggleSelection(this.m_selPtr, selection.Pointer);
 }
Пример #13
0
 public void MoveTo(Vec3 pos, EditorObjectSelection.MoveMode mode)
 {
     Binding.FCE_ObjectSelection_MoveTo(this.m_selPtr, pos.X, pos.Y, pos.Z, (int)mode);
 }
Пример #14
0
 public void SetSelection(EditorObjectSelection selection, EditorObject gizmoObject)
 {
     this.ClearSelectionState();
     this.m_selection.Dispose();
     this.m_selection = selection;
     this.m_selection.ComputeCenter();
     if (!this.m_selection.Contains(gizmoObject))
     {
         gizmoObject = EditorObject.Null;
     }
     if (!gizmoObject.IsValid && this.m_selection.Count > 0)
     {
         gizmoObject = this.m_selection[0];
     }
     if (gizmoObject.IsValid)
     {
         this.SetupGizmo(gizmoObject);
     }
     else
     {
         this.ClearGizmo();
     }
     this.UpdateSelectionState();
     this.UpdateSelection();
     this.m_paramObjectSelection.Value = -1;
 }
Пример #15
0
 public static void GetObjectsFromScreenRect(EditorObjectSelection selection, RectangleF rect)
 {
     ObjectManager.GetObjectsFromScreenRect(selection, rect, false);
 }
Пример #16
0
 private void CreateSelection()
 {
     this.m_selection = EditorObjectSelection.Create();
     this.UpdateSelection();
 }
Пример #17
0
 public static void GetObjectsFromScreenRect(EditorObjectSelection selection, RectangleF rect, bool includeFrozen)
 {
     Binding.FCE_ObjectManager_GetObjectsFromScreenRect(selection.Pointer, rect.Left, rect.Top, rect.Right, rect.Bottom, includeFrozen);
 }
Пример #18
0
 private void SetNewObject(EditorObjectSelection selection)
 {
     this.ClearNewObject();
     this.m_newObjectPending = true;
     this.m_newObjectValid = false;
     selection.RotateCenter(this.m_newObjectAngle, new Vec3(0f, 0f, 1f));
     foreach (EditorObject current in selection.GetObjects())
     {
         current.Visible = false;
     }
     this.m_context.SetSelection(selection, EditorObject.Null);
     this.m_context.m_selection.SaveState();
     this.UpdateNewObject();
     if (ObjectViewer.Active)
     {
         this.UpdatePreview();
     }
 }
Пример #19
0
 public void GetValidObjects(EditorObjectSelection selection)
 {
     Binding.FCE_ObjectSelection_GetValidObjects(this.m_selPtr, selection.Pointer);
 }
Пример #20
0
 public static void GetObjectsFromScreenRect(EditorObjectSelection selection, RectangleF rect)
 {
     ObjectManager.GetObjectsFromScreenRect(selection, rect, false);
 }
Пример #21
0
 public void Clone(EditorObjectSelection newSelection, bool cloneObjects)
 {
     Binding.FCE_ObjectSelection_Clone(this.m_selPtr, newSelection.Pointer, cloneObjects);
 }
Пример #22
0
 public static void GetObjectsFromMagicWand(EditorObjectSelection selection, EditorObject obj)
 {
     Binding.FCE_ObjectManager_GetObjectsFromMagicWand(selection.Pointer, obj.Pointer);
 }
Пример #23
0
 public void Clone(EditorObjectSelection newSelection, bool cloneObjects)
 {
     Binding.FCE_ObjectSelection_Clone(this.m_selPtr, newSelection.Pointer, cloneObjects);
 }