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"); } }
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; }
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); }
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(""); }
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; }