コード例 #1
0
ファイル: ObjectManager.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: Editor.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: Editor.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: ToolObject.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: ObjectManager.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: ToolObject.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: ObjectManager.cs プロジェクト: Azerothian/fc3editor
 public static void GetObjectsFromScreenRect(EditorObjectSelection selection, RectangleF rect)
 {
     ObjectManager.GetObjectsFromScreenRect(selection, rect, false);
 }
コード例 #16
0
ファイル: ToolObject.cs プロジェクト: Azerothian/fc3editor
 private void CreateSelection()
 {
     this.m_selection = EditorObjectSelection.Create();
     this.UpdateSelection();
 }
コード例 #17
0
ファイル: ObjectManager.cs プロジェクト: Azerothian/fc3editor
 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
ファイル: ToolObject.cs プロジェクト: Azerothian/fc3editor
 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);
 }