public static AxisAlignedBox FromSpeedTree(TreeBox box)
 {
     return(new AxisAlignedBox(FromSpeedTree(box.min), FromSpeedTree(box.max)));
 }
Beispiel #2
0
		private void UpdateImageIndicesForNode(IScenarioNode scenarioNode, TreeBox.Node node)
		{
			if (scenarioNode.Id == scenarioNode.Scenario.CommonRootNode.Id)
			{
				node.ImageAppearance.ImageIndex = (int) NodeImageIndex.RootCommonNormal;
				return;
			}
			if (scenarioNode.Id == scenarioNode.Scenario.ParticularRootNode.Id)
			{
				node.ImageAppearance.ImageIndex = (int) NodeImageIndex.RootParticularNormal;
				return;
			}
			if (scenarioNode.TopicType == LogicalTopicType.Glossary)
			{
				node.ImageAppearance.ImageIndex = (int) NodeImageIndex.NodeGlossaryNormal;
				return;
			}

			if (scenarioNode.ContainsTemplate)
			{
				node.ImageAppearance.ImageIndex = (int) (scenarioNode.IsAppendix ? NodeImageIndex.NodeLandscapeNormal : NodeImageIndex.NodePortraitNormal);
			}
			else
			{
				node.ImageAppearance.ImageIndex = (int) NodeImageIndex.NodeEmptyNormal;
			}

			node.ImageAppearance.SouthEast = scenarioNode.SourceDatumDeclarationCount > 0;
			node.ImageAppearance.NorthEast = scenarioNode.FormulaDeclarationCount > 0;

//			if (scenarioNode.ContainsTemplate && scenarioNode.SourceDatumDeclarationCount > 0)
//			{
//				node.ImageAppearance. .ImageIndex = (int) (scenarioNode.IsAppendix ? NodeImageIndex.NodeLandscapeSourceDataNormal : NodeImageIndex.NodePortraitSourceDataNormal);
//				return;
//			}
//			if (scenarioNode.ContainsTemplate)
//			{
//				node.ImageAppearance.ImageIndex = (int) (scenarioNode.IsAppendix ? NodeImageIndex.NodeLandscapeNormal : NodeImageIndex.NodePortraitNormal);
//				return;
//			}
//			if (scenarioNode.SourceDatumDeclarationCount > 0)
//			{
//				node.ImageAppearance.ImageIndex = (int) NodeImageIndex.NodeSourceDataNormal;
//				return;
//			}
//			node.ImageAppearance.ImageIndex = (int) NodeImageIndex.NodeEmptyNormal;
		}
 public static AxisAlignedBox FromSpeedTree(TreeBox box)
 {
     return new AxisAlignedBox(FromSpeedTree(box.min), FromSpeedTree(box.max));
 }