public HTDraw(HTModel model, HTView view) { drawToHTNodeMap = new Dictionary<HTNode, HTDrawNode>(); this.view = view; this.model = model; HTModelNode root = model.GetRoot(); sOrigin = new HTCoordS(); sMax = new HTCoordS(); ray = new double[4]; ray[0] = model.GetLength(); for (int i = 1; i < ray.Length; i++) { ray[i] = (ray[0] + ray[i - 1]) / (1 + (ray[0] * ray[i - 1])); } if (root.IsLeaf()) { drawRoot = new HTDrawNode(null, root, this); } else { drawRoot = new HTDrawNodeComposite(null, (HTModelNodeComposite)root, this); } return; }
public HTDraw(HTModel model, HTView view) { drawToHTNodeMap = new Dictionary <HTNode, HTDrawNode>(); this.view = view; this.model = model; HTModelNode root = model.GetRoot(); sOrigin = new HTCoordS(); sMax = new HTCoordS(); ray = new double[4]; ray[0] = model.GetLength(); for (int i = 1; i < ray.Length; i++) { ray[i] = (ray[0] + ray[i - 1]) / (1 + (ray[0] * ray[i - 1])); } if (root.IsLeaf()) { drawRoot = new HTDrawNode(null, root, this); } else { drawRoot = new HTDrawNodeComposite(null, (HTModelNodeComposite)root, this); } return; }
public HTModelNode(HTNode node, HTModelNodeComposite parent, HTModel model) { this.node = node; this.parent = parent; this.model = model; model.IncrementNumberOfNodes(); z = new HTCoordE(); }
public SilverlightHTView(HTModel model) { this.model = model; draw = new HTDraw(model, this); action = new HTAction(draw); this.Width = 500; this.Height = 500; StartMouseListening(); }
public SilverlightHTView(HTModel model) { InitializeComponent(); //What does this method do? this.model = model; draw = new HTDraw(model, this); action = new HTAction(draw); this.Width = 500; this.Height = 500; /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap }; * tiptext.Text = toolTipText; * * ToolTipService.SetToolTip(this,tiptext);*/ StartMouseListening(); }
public SilverlightHTView(HTModel model) { InitializeComponent(); //What does this method do? this.model = model; draw = new HTDraw(model, this); action = new HTAction(draw); this.Width = 500; this.Height = 500; /*TextBlock tiptext = new TextBlock() { TextWrapping = TextWrapping.Wrap }; tiptext.Text = toolTipText; ToolTipService.SetToolTip(this,tiptext);*/ StartMouseListening(); }
public HTModelNodeComposite(HTNode node, HTModelNodeComposite parent, HTModel model) : base(node, parent, model) { this.children = new ObservableCollection<HTModelNode>(); HTNode childNode = null; HTModelNode child = null; for (IEnumerator i = node.Children(); i.MoveNext(); ) { childNode = (HTNode)i.Current; if (childNode.IsLeaf()) { child = new HTModelNode(childNode, this, model); //Debug.WriteLine("HTModelNode:" + child); } else { child = new HTModelNodeComposite(childNode, this, model); //Debug.WriteLine("HTModelNodeComposite:" + child); } AddChild(child); } ComputeWeight(); }
public HTModelNodeComposite(HTNode node, HTModelNodeComposite parent, HTModel model) : base(node, parent, model) { this.children = new ObservableCollection <HTModelNode>(); HTNode childNode = null; HTModelNode child = null; for (IEnumerator i = node.Children(); i.MoveNext();) { childNode = (HTNode)i.Current; if (childNode.IsLeaf()) { child = new HTModelNode(childNode, this, model); //Debug.WriteLine("HTModelNode:" + child); } else { child = new HTModelNodeComposite(childNode, this, model); //Debug.WriteLine("HTModelNodeComposite:" + child); } AddChild(child); } ComputeWeight(); }
public HyperTree(HTNode root) { model = new HTModel(root); }
public HTModelNode(HTNode node, HTModel model) : this(node,null,model) { }
public HTModelNodeComposite(HTNode node, HTModel model) : this(node, null, model) { }