예제 #1
0
        private void SectorTree_AfterLabelEdit(object sender, NodeLabelEditEventArgs e)
        {
            TreeNode valueNode = SectorTree.SelectedNode;
            TreeNode coordNode = valueNode.Parent;
            coord    coord     = (coord)coordNode.Tag;

            if (e.CancelEdit == true)
            {
                return;
            }
            string newValue = "0";

            if (string.IsNullOrWhiteSpace(e.Label))
            {
                newValue = e.Node.Text;
            }
            else
            {
                newValue = e.Label;
            }
            try
            {
                coord.setValue((string)valueNode.Tag, newValue);
            }
            catch (InvalidCastException)
            {
                Console.WriteLine("hrm, that should have been a string");
            }
        }
예제 #2
0
 public coord clone()
 {
     coord newClone = new coord();
     newClone.X = this.X;
     newClone.Y = this.Y;
     newClone.Z = this.Z;
     newClone.W = this.W;
     newClone.quat = this.quat;
     return newClone;
 }
예제 #3
0
        public coord clone()
        {
            coord newClone = new coord();

            newClone.X    = this.X;
            newClone.Y    = this.Y;
            newClone.Z    = this.Z;
            newClone.W    = this.W;
            newClone.quat = this.quat;
            return(newClone);
        }
예제 #4
0
 public void reOrient(PandO offset_pando, coord offset_min, coord offset_max)
 {
     this.dirty = true;
     foreach (CubeBlock cb in CubeBlocks)
     {
         this.parent_sector.main_form.update_status("Reorientating: " + cb.EntityId);
         cb.PositionAndOrientation.position.offset(offset_pando.position);
         cb.Min.offset(offset_min);
         cb.Max.offset(offset_max);
     }
     this.parent_sector.main_form.update_status("");
 }
예제 #5
0
 public void offset(coord offset_coord)
 {
     this.X = this.X - offset_coord.X;
     this.Y = this.Y - offset_coord.Y;
     this.Z = this.Z - offset_coord.Z;
 }
예제 #6
0
 public void offset(coord offset_coord)
 {
     this.X = this.X - offset_coord.X;
     this.Y = this.Y - offset_coord.Y;
     this.Z = this.Z - offset_coord.Z;
 }
예제 #7
0
 public void reOrient(PandO offset_pando, coord offset_min, coord offset_max)
 {
     this.dirty = true;
     foreach (CubeBlock cb in CubeBlocks)
     {
         this.parent_sector.main_form.update_status("Reorientating: " + cb.EntityId);
         cb.PositionAndOrientation.position.offset(offset_pando.position);
         cb.Min.offset(offset_min);
         cb.Max.offset(offset_max);
     }
     this.parent_sector.main_form.update_status("");
 }