Properties Panel & Load Testing

Properties panel elements now have dynamic layout
Added console command to spawn lots of entities for load testing
This commit is contained in:
hyperion51 2020-06-04 01:36:55 +01:00
commit b0d7fa4904
69 changed files with 5299 additions and 3229 deletions

View file

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 7661950293812596459}
- component: {fileID: 7661950293812596461}
- component: {fileID: 7661950293812596460}
- component: {fileID: 398370157}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -35,7 +36,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7661950293812596461
CanvasRenderer:
@ -72,6 +73,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &398370157
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950293812596458}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &7661950293931311386
GameObject:
m_ObjectHideFlags: 0
@ -81,9 +102,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 7661950293931311387}
- component: {fileID: 7661950293931311391}
- component: {fileID: 7661950293931311389}
- component: {fileID: 7661950293931311388}
- component: {fileID: 4828684769873383795}
m_Layer: 5
m_Name: Bool Field
m_TagString: Untagged
@ -98,7 +119,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950293931311386}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -113,26 +134,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7661950293931311391
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950293931311386}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 32
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!222 &7661950293931311389
CanvasRenderer:
m_ObjectHideFlags: 0
@ -155,6 +156,29 @@ MonoBehaviour:
m_EditorClassIdentifier:
Label: {fileID: 7661950295498381398}
Toggle: {fileID: 7661950294707789148}
--- !u!114 &4828684769873383795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950293931311386}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &7661950294137596688
GameObject:
m_ObjectHideFlags: 0
@ -240,6 +264,7 @@ GameObject:
- component: {fileID: 7661950294707789146}
- component: {fileID: 7661950294707789148}
- component: {fileID: 7661950294707789147}
- component: {fileID: 4623191057634594966}
m_Layer: 5
m_Name: Toggle
m_TagString: Untagged
@ -262,10 +287,10 @@ RectTransform:
m_Father: {fileID: 7661950293931311387}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 8, y: 0}
m_SizeDelta: {x: 0, y: 2}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 459, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &7661950294707789148
MonoBehaviour:
@ -325,6 +350,26 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_AspectMode: 2
m_AspectRatio: 1
--- !u!114 &4623191057634594966
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950294707789145}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &7661950294981437067
GameObject:
m_ObjectHideFlags: 0
@ -429,10 +474,10 @@ RectTransform:
m_Father: {fileID: 7661950294137596689}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchorMin: {x: 0.2, y: 0.2}
m_AnchorMax: {x: 0.8, y: 0.8}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7661950295217243556
CanvasRenderer:
@ -480,6 +525,7 @@ GameObject:
- component: {fileID: 7661950295498381397}
- component: {fileID: 7661950295498381399}
- component: {fileID: 7661950295498381398}
- component: {fileID: 398370159}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -502,9 +548,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7661950295498381399
CanvasRenderer:
@ -532,7 +578,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Dolor
m_text: Dolor with very long name that forces expand
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
@ -602,12 +648,12 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 7661950295498381398}
characterCount: 5
characterCount: 44
spriteCount: 0
spaceCount: 0
wordCount: 1
spaceCount: 7
wordCount: 8
linkCount: 0
lineCount: 1
lineCount: 2
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
@ -625,3 +671,23 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &398370159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7661950295498381396}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -92,8 +92,8 @@ MonoBehaviour:
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontSize: 18
m_fontSizeBase: 18
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
@ -168,6 +168,7 @@ GameObject:
- component: {fileID: 790814198576895814}
- component: {fileID: 790814198576895813}
- component: {fileID: 790814198576895812}
- component: {fileID: 226212841}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
@ -191,10 +192,10 @@ RectTransform:
m_Father: {fileID: 6566784227922820063}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 4.0000076, y: 0}
m_SizeDelta: {x: 8, y: 2}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &790814198576895814
CanvasRenderer:
@ -251,6 +252,27 @@ MonoBehaviour:
SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355}
HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.5019608}
ClickColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 1}
DisabledColor: {r: 0, g: 0, b: 0, a: 0}
--- !u!114 &226212841
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 790814198576895810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 28
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &790814198754792691
GameObject:
m_ObjectHideFlags: 0
@ -334,6 +356,7 @@ GameObject:
- component: {fileID: 3391258965138102790}
- component: {fileID: 1727340882891331310}
- component: {fileID: 1262479968588482621}
- component: {fileID: 226212838}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -358,7 +381,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1727340882891331310
CanvasRenderer:
@ -395,6 +418,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &226212838
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2152774904542180253}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &6566784227922820056
GameObject:
m_ObjectHideFlags: 0
@ -407,6 +450,7 @@ GameObject:
- component: {fileID: 6566784227922820061}
- component: {fileID: 1185277543755028150}
- component: {fileID: 6566784227922820057}
- component: {fileID: 226212844}
m_Layer: 5
m_Name: Button Field
m_TagString: Untagged
@ -421,7 +465,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6566784227922820056}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -479,6 +523,29 @@ MonoBehaviour:
Label: {fileID: 6566784228232816308}
ButtonLabel: {fileID: 790814197411605234}
Button: {fileID: 790814198576895812}
--- !u!114 &226212844
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6566784227922820056}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &6566784228232816310
GameObject:
m_ObjectHideFlags: 0
@ -490,6 +557,7 @@ GameObject:
- component: {fileID: 6566784228232816309}
- component: {fileID: 6566784228232816315}
- component: {fileID: 6566784228232816308}
- component: {fileID: 226212842}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -512,9 +580,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6566784228232816315
CanvasRenderer:
@ -635,3 +703,23 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &226212842
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6566784228232816310}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -431,6 +431,7 @@ GameObject:
- component: {fileID: 8066689769109180}
- component: {fileID: 8066689769109181}
- component: {fileID: 8066689769109182}
- component: {fileID: 6127184861051762945}
m_Layer: 5
m_Name: Dropdown
m_TagString: Untagged
@ -456,10 +457,10 @@ RectTransform:
m_Father: {fileID: 8066691333806155}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 8, y: 0}
m_SizeDelta: {x: 8, y: 2}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &8066689769109180
CanvasRenderer:
@ -550,6 +551,26 @@ MonoBehaviour:
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &6127184861051762945
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066689769109176}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 28
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &8066689790862383
GameObject:
m_ObjectHideFlags: 0
@ -659,7 +680,7 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_firstOverflowCharacterIndex: 0
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
@ -717,6 +738,7 @@ GameObject:
- component: {fileID: 8066689821310420}
- component: {fileID: 8066689821310426}
- component: {fileID: 8066689821310427}
- component: {fileID: 7123821791411921912}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -741,7 +763,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8066689821310426
CanvasRenderer:
@ -778,6 +800,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &7123821791411921912
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066689821310421}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &8066689841565611
GameObject:
m_ObjectHideFlags: 0
@ -876,6 +918,7 @@ GameObject:
- component: {fileID: 8066690032161819}
- component: {fileID: 8066690032161817}
- component: {fileID: 8066690032161818}
- component: {fileID: 7587566655188184819}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -898,9 +941,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8066690032161817
CanvasRenderer:
@ -1021,6 +1064,26 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &7587566655188184819
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066690032161812}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &8066690568059332
GameObject:
m_ObjectHideFlags: 0
@ -1569,9 +1632,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 8066691333806155}
- component: {fileID: 8066691333806159}
- component: {fileID: 8066691333806153}
- component: {fileID: 8066691333806154}
- component: {fileID: 6077811951318735372}
m_Layer: 5
m_Name: Enum Field
m_TagString: Untagged
@ -1586,7 +1649,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066691333806148}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -1601,26 +1664,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &8066691333806159
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066691333806148}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 32
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!222 &8066691333806153
CanvasRenderer:
m_ObjectHideFlags: 0
@ -1643,6 +1686,29 @@ MonoBehaviour:
m_EditorClassIdentifier:
Label: {fileID: 8066690032161818}
Dropdown: {fileID: 8066689769109182}
--- !u!114 &6077811951318735372
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8066691333806148}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 4
m_Bottom: 4
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &8066691340653935
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load diff

View file

@ -155,6 +155,7 @@ GameObject:
- component: {fileID: 3301729264647156058}
- component: {fileID: 3301729264647156056}
- component: {fileID: 3301729264647156057}
- component: {fileID: 308454096}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -179,7 +180,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3301729264647156056
CanvasRenderer:
@ -216,6 +217,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &308454096
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301729264647156059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3301729265155698788
GameObject:
m_ObjectHideFlags: 0
@ -228,6 +249,7 @@ GameObject:
- component: {fileID: 3301729265155698799}
- component: {fileID: 3301729265155698785}
- component: {fileID: 256436433275418348}
- component: {fileID: 308454102}
m_Layer: 5
m_Name: Progress Field
m_TagString: Untagged
@ -242,7 +264,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301729265155698788}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -299,6 +321,29 @@ MonoBehaviour:
m_EditorClassIdentifier:
Label: {fileID: 3301729265189646935}
Slider: {fileID: 1245313791973438745}
--- !u!114 &308454102
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301729265155698788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &3301729265189646953
GameObject:
m_ObjectHideFlags: 0
@ -310,6 +355,7 @@ GameObject:
- component: {fileID: 3301729265189646952}
- component: {fileID: 3301729265189646934}
- component: {fileID: 3301729265189646935}
- component: {fileID: 308454100}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -332,9 +378,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3301729265189646934
CanvasRenderer:
@ -455,6 +501,26 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &308454100
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3301729265189646953}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3947597710774014716
GameObject:
m_ObjectHideFlags: 0
@ -573,6 +639,7 @@ GameObject:
m_Component:
- component: {fileID: 8626591645481506733}
- component: {fileID: 1245313791973438745}
- component: {fileID: 308454099}
m_Layer: 5
m_Name: Slider
m_TagString: Untagged
@ -597,10 +664,10 @@ RectTransform:
m_Father: {fileID: 3301729265155698787}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 20}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &1245313791973438745
MonoBehaviour:
@ -649,3 +716,23 @@ MonoBehaviour:
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &308454099
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8579295300066914487}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -93,11 +93,13 @@ MonoBehaviour:
type: 3}
ListPrefab: {fileID: 6914334813923144328, guid: 93e63e3a8b352a04897123288d70f04b,
type: 3}
PropertyPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b,
PropertyPrefab: {fileID: 9159917045172241898, guid: be88722a74d512d45a454fe91327a389,
type: 3}
PropertyLabelPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b,
type: 3}
AttributePrefab: {fileID: 4447025208748278043, guid: 5e3a258a5b91c8246b20962ba6eccb09,
type: 3}
InputField: {fileID: 5557349869958992659, guid: fb49ef180533e3e488fa39d80cc2423a,
InputField: {fileID: 6586910564433979167, guid: fb49ef180533e3e488fa39d80cc2423a,
type: 3}
RangedFloatField: {fileID: 1663396771457720812, guid: c214f62d8f2188140b96ed12798034c8,
type: 3}

View file

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 1613450655044732627}
- component: {fileID: 1613450655044732637}
- component: {fileID: 1613450655044732626}
- component: {fileID: 496207390}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -33,9 +34,9 @@ RectTransform:
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1613450655044732637
CanvasRenderer:
@ -63,7 +64,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: This is a button
m_text: This is a button with a very long name that forces expandddd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
@ -133,12 +134,12 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 1613450655044732626}
characterCount: 16
characterCount: 60
spriteCount: 0
spaceCount: 3
wordCount: 4
spaceCount: 11
wordCount: 12
linkCount: 0
lineCount: 1
lineCount: 2
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
@ -156,6 +157,26 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &496207390
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1613450655044732624}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &1613450655389604798
GameObject:
m_ObjectHideFlags: 0
@ -165,10 +186,10 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1613450655389604793}
- component: {fileID: 1613450655389604795}
- component: {fileID: 6716894550144612048}
- component: {fileID: 9031877687215098194}
- component: {fileID: 1613450655389604799}
- component: {fileID: 496207392}
m_Layer: 5
m_Name: Property Button
m_TagString: Untagged
@ -183,7 +204,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1613450655389604798}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -198,26 +219,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1613450655389604795
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1613450655389604798}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 32
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!222 &6716894550144612048
CanvasRenderer:
m_ObjectHideFlags: 0
@ -246,6 +247,7 @@ MonoBehaviour:
SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355}
HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.5019608}
ClickColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 1}
DisabledColor: {r: 0, g: 0, b: 0, a: 0}
--- !u!114 &1613450655389604799
MonoBehaviour:
m_ObjectHideFlags: 0
@ -260,6 +262,29 @@ MonoBehaviour:
m_EditorClassIdentifier:
Label: {fileID: 1613450655044732626}
Button: {fileID: 9031877687215098194}
--- !u!114 &496207392
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1613450655389604798}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &5151860849690372521
GameObject:
m_ObjectHideFlags: 0
@ -271,6 +296,7 @@ GameObject:
- component: {fileID: 5151860849690372526}
- component: {fileID: 5151860849690372524}
- component: {fileID: 5151860849690372527}
- component: {fileID: 496207387}
m_Layer: 5
m_Name: Outline
m_TagString: Untagged
@ -295,7 +321,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5151860849690372524
CanvasRenderer:
@ -332,6 +358,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &496207387
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5151860849690372521}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5811322450855121915
GameObject:
m_ObjectHideFlags: 0
@ -343,6 +389,7 @@ GameObject:
- component: {fileID: 7085828711539161696}
- component: {fileID: 6538515023904061064}
- component: {fileID: 6683620520386570331}
- component: {fileID: 496207388}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -367,7 +414,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6538515023904061064
CanvasRenderer:
@ -404,3 +451,23 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &496207388
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5811322450855121915}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -0,0 +1,559 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2677123916028371622
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2677123916028371621}
- component: {fileID: 2677123916028371627}
- component: {fileID: 2677123916028371620}
- component: {fileID: 4623451892811290559}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2677123916028371621
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2677123916028371627
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_CullTransparentMesh: 0
--- !u!114 &2677123916028371620
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Dolor very long name with lots of words even longer just keeps going and
going
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_textAlignment: 513
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 2677123916028371620}
characterCount: 78
spriteCount: 0
spaceCount: 14
wordCount: 15
linkCount: 0
lineCount: 3
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &4623451892811290559
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &2677123916507168712
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2677123916507168719}
- component: {fileID: 279061376544739623}
- component: {fileID: 7959015954088891046}
- component: {fileID: 5626264982920981796}
- component: {fileID: 2227437186655761277}
m_Layer: 5
m_Name: Property Label
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2677123916507168719
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5843074710384729622}
- {fileID: 2677123916028371621}
- {fileID: 6602089867192183683}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &279061376544739623
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b403db1d8980f544099fedf5735cf364, type: 3}
m_Name:
m_EditorClassIdentifier:
Name: {fileID: 2677123916028371620}
Value: {fileID: 1120484356114752953}
Button: {fileID: 5626264982920981796}
--- !u!222 &7959015954088891046
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_CullTransparentMesh: 0
--- !u!114 &5626264982920981796
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fafbcd26aa8d175448880b37b7a41b2e, type: 3}
m_Name:
m_EditorClassIdentifier:
StateDamping: 10
Fill: {fileID: 8035498868821314605}
CurrentState: 0
DisableClickWhenSelected: 1
UnselectedColor: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355}
HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.29803923}
ClickColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196}
DisabledColor: {r: 0, g: 0, b: 0, a: 0}
--- !u!114 &2227437186655761277
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 8
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &3567103445860279401
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6602089867192183683}
- component: {fileID: 894355259237647483}
- component: {fileID: 1120484356114752953}
- component: {fileID: 4038861921972693869}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6602089867192183683
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &894355259237647483
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_CullTransparentMesh: 0
--- !u!114 &1120484356114752953
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 123456789
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_textAlignment: 516
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 1120484356114752953}
characterCount: 9
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &4038861921972693869
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &7198678740849276813
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5843074710384729622}
- component: {fileID: 7637636659958895358}
- component: {fileID: 8035498868821314605}
- component: {fileID: 8541841229961981823}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5843074710384729622
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7637636659958895358
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_CullTransparentMesh: 0
--- !u!114 &8035498868821314605
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &8541841229961981823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5b8c5126640066e4fabe6e65b7225b3b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,513 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2088721703192714105
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2088721703192714102}
- component: {fileID: 2088721703192714101}
- component: {fileID: 2088721703192714100}
- component: {fileID: 2088721703192714103}
m_Layer: 5
m_Name: Title
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2088721703192714102
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703192714105}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2088721703295321218}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 32}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &2088721703192714101
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703192714105}
m_CullTransparentMesh: 0
--- !u!114 &2088721703192714100
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703192714105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Resources
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_textAlignment: 513
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 2088721703192714100}
characterCount: 9
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &2088721703192714103
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703192714105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &2088721703295321221
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2088721703295321218}
- component: {fileID: 2088721703295321216}
- component: {fileID: 2088721703295321219}
- component: {fileID: 6914334813923144328}
- component: {fileID: 5436107563273525140}
m_Layer: 5
m_Name: Property List 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2088721703295321218
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703295321221}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6724740944390240338}
- {fileID: 2088721703192714102}
- {fileID: 2118837324186690404}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2088721703295321216
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703295321221}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: 1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &2088721703295321219
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703295321221}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 32
m_Right: 8
m_Top: 40
m_Bottom: -8
m_ChildAlignment: 0
m_Spacing: 8
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!114 &6914334813923144328
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703295321221}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2544c9c8b6358c54ea58c5fb33bb48b7, type: 3}
m_Name:
m_EditorClassIdentifier:
Title: {fileID: 2088721703192714100}
SectionPrefab: {fileID: 1026668114703092140, guid: 3a149ea40b43fbf47b51ec165cb04e5f,
type: 3}
ListPrefab: {fileID: 6914334813923144328, guid: 93e63e3a8b352a04897123288d70f04b,
type: 3}
PropertyPrefab: {fileID: 9159917045172241898, guid: be88722a74d512d45a454fe91327a389,
type: 3}
PropertyLabelPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b,
type: 3}
AttributePrefab: {fileID: 4447025208748278043, guid: 5e3a258a5b91c8246b20962ba6eccb09,
type: 3}
InputField: {fileID: 6586910564433979167, guid: fb49ef180533e3e488fa39d80cc2423a,
type: 3}
RangedFloatField: {fileID: 1663396771457720812, guid: c214f62d8f2188140b96ed12798034c8,
type: 3}
ProgressField: {fileID: 256436433275418348, guid: e6524d59d9bc67545b0eb1304bfb9d4b,
type: 3}
EnumField: {fileID: 8066691333806154, guid: f19a14cd178d48f49ace9ad217bea2ed, type: 3}
BoolField: {fileID: 7661950293931311388, guid: 001ad6a15f0d582458d359c0ae4405ed,
type: 3}
PropertyButton: {fileID: 1613450655389604799, guid: 99bde06e2f0ca504bb95f2a4e3429462,
type: 3}
ButtonField: {fileID: 6566784227922820057, guid: 6db1feb4cda7b8c419384cd42c85a5c4,
type: 3}
FoldoutIcon: {fileID: 6485458701090981364}
FoldoutRotationDamping: 10
Button: {fileID: 5436107563273525140}
LayoutGroup: {fileID: 2088721703295321219}
FoldedPadding: -8
ExpandedPadding: 8
--- !u!114 &5436107563273525140
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2088721703295321221}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fafbcd26aa8d175448880b37b7a41b2e, type: 3}
m_Name:
m_EditorClassIdentifier:
StateDamping: 10
Fill: {fileID: 1992060800398866096}
CurrentState: 0
DisableClickWhenSelected: 1
UnselectedColor: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355}
HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.29803923}
ClickColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196}
DisabledColor: {r: 0, g: 0, b: 0, a: 0}
--- !u!1 &2755672975795187168
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6724740944390240338}
- component: {fileID: 3053647169083004458}
- component: {fileID: 1992060800398866096}
- component: {fileID: 8453645590874671590}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6724740944390240338
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2755672975795187168}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2088721703295321218}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3053647169083004458
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2755672975795187168}
m_CullTransparentMesh: 0
--- !u!114 &1992060800398866096
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2755672975795187168}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &8453645590874671590
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2755672975795187168}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &4248181803077145238
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2118837324186690404}
- component: {fileID: 7097941323566313314}
- component: {fileID: 6485458701090981364}
- component: {fileID: 2754928952561943955}
m_Layer: 5
m_Name: Foldout
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2118837324186690404
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4248181803077145238}
m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2088721703295321218}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -16, y: -16}
m_SizeDelta: {x: 24, y: 24}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7097941323566313314
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4248181803077145238}
m_CullTransparentMesh: 0
--- !u!114 &6485458701090981364
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4248181803077145238}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: ef87bbaa6e6f6824fa1b758cc93393d5, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &2754928952561943955
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4248181803077145238}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ddd907ae814f67a4b8ebe357d4f26e56
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -35,8 +35,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 32}
m_AnchoredPosition: {x: 6, y: 0}
m_SizeDelta: {x: -12, y: 32}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &2088721703192714101
CanvasRenderer:
@ -110,7 +110,7 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: 1
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
@ -139,7 +139,7 @@ MonoBehaviour:
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 9
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
@ -277,18 +277,27 @@ MonoBehaviour:
Title: {fileID: 2088721703192714100}
SectionPrefab: {fileID: 1026668114703092140, guid: 3a149ea40b43fbf47b51ec165cb04e5f,
type: 3}
ListPrefab: {fileID: 6914334813923144328}
PropertyPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b,
ListPrefab: {fileID: 6914334813923144328, guid: ddd907ae814f67a4b8ebe357d4f26e56,
type: 3}
PropertyPrefab: {fileID: 9159917045172241898, guid: be88722a74d512d45a454fe91327a389,
type: 3}
PropertyLabelPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b,
type: 3}
AttributePrefab: {fileID: 4447025208748278043, guid: 5e3a258a5b91c8246b20962ba6eccb09,
type: 3}
InputField: {fileID: 6586910564433979167, guid: fb49ef180533e3e488fa39d80cc2423a,
type: 3}
RangedFloatField: {fileID: 1663396771457720812, guid: c214f62d8f2188140b96ed12798034c8,
type: 3}
ProgressField: {fileID: 256436433275418348, guid: e6524d59d9bc67545b0eb1304bfb9d4b,
type: 3}
EnumField: {fileID: 8066691333806154, guid: f19a14cd178d48f49ace9ad217bea2ed, type: 3}
BoolField: {fileID: 7661950293931311388, guid: 001ad6a15f0d582458d359c0ae4405ed,
type: 3}
AttributePrefab: {fileID: 0}
InputField: {fileID: 0}
RangedFloatField: {fileID: 0}
ProgressField: {fileID: 0}
EnumField: {fileID: 0}
BoolField: {fileID: 0}
PropertyButton: {fileID: 1613450655389604799, guid: 99bde06e2f0ca504bb95f2a4e3429462,
type: 3}
ButtonField: {fileID: 0}
ButtonField: {fileID: 6566784227922820057, guid: 6db1feb4cda7b8c419384cd42c85a5c4,
type: 3}
FoldoutIcon: {fileID: 6485458701090981364}
FoldoutRotationDamping: 10
Button: {fileID: 5436107563273525140}
@ -352,7 +361,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3053647169083004458
CanvasRenderer:
@ -444,7 +453,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -16, y: -16}
m_AnchoredPosition: {x: -20, y: -16}
m_SizeDelta: {x: 24, y: 24}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7097941323566313314

View file

@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2677123916028371622
--- !u!1 &4170128940648566190
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -8,9 +8,103 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2677123916028371621}
- component: {fileID: 2677123916028371627}
- component: {fileID: 2677123916028371620}
- component: {fileID: 805963447834108981}
- component: {fileID: 3731170797659416797}
- component: {fileID: 3871492197986661902}
- component: {fileID: 2733347408023779202}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &805963447834108981
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4170128940648566190}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 9159917045172241900}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3731170797659416797
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4170128940648566190}
m_CullTransparentMesh: 0
--- !u!114 &3871492197986661902
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4170128940648566190}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &2733347408023779202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4170128940648566190}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &9159917045079857285
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9159917045079857286}
- component: {fileID: 9159917045079857288}
- component: {fileID: 9159917045079857287}
- component: {fileID: 7146960633174762155}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -18,40 +112,40 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2677123916028371621
--- !u!224 &9159917045079857286
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_GameObject: {fileID: 9159917045079857285}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_Father: {fileID: 9159917045172241900}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2677123916028371627
--- !u!222 &9159917045079857288
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_GameObject: {fileID: 9159917045079857285}
m_CullTransparentMesh: 0
--- !u!114 &2677123916028371620
--- !u!114 &9159917045079857287
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916028371622}
m_GameObject: {fileID: 9159917045079857285}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
@ -63,7 +157,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Dolor
m_text: This is a button with a very long name that forces expandddddd
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
@ -109,7 +203,7 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
@ -132,13 +226,13 @@ MonoBehaviour:
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 2677123916028371620}
characterCount: 5
textComponent: {fileID: 9159917045079857287}
characterCount: 62
spriteCount: 0
spaceCount: 0
wordCount: 1
spaceCount: 11
wordCount: 12
linkCount: 0
lineCount: 5
lineCount: 2
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
@ -156,55 +250,13 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &2677123916507168712
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2677123916507168719}
- component: {fileID: 2677123916507168717}
- component: {fileID: 279061376544739623}
- component: {fileID: 7959015954088891046}
- component: {fileID: 5626264982920981796}
m_Layer: 5
m_Name: Property
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2677123916507168719
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5843074710384729622}
- {fileID: 2677123916028371621}
- {fileID: 6602089867192183683}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2677123916507168717
--- !u!114 &7146960633174762155
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_GameObject: {fileID: 9159917045079857285}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@ -213,279 +265,115 @@ MonoBehaviour:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 32
m_FlexibleWidth: 1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &279061376544739623
MonoBehaviour:
--- !u!1 &9159917045172241899
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b403db1d8980f544099fedf5735cf364, type: 3}
m_Name:
m_EditorClassIdentifier:
Name: {fileID: 2677123916028371620}
Value: {fileID: 1120484356114752953}
Button: {fileID: 5626264982920981796}
--- !u!222 &7959015954088891046
serializedVersion: 6
m_Component:
- component: {fileID: 9159917045172241900}
- component: {fileID: 3768814520516454533}
- component: {fileID: 1453849250309625607}
- component: {fileID: 9159917045172241898}
- component: {fileID: 7146960633535889349}
m_Layer: 5
m_Name: Property
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9159917045172241900
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9159917045172241899}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 805963447834108981}
- {fileID: 9159917045079857286}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3768814520516454533
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_GameObject: {fileID: 9159917045172241899}
m_CullTransparentMesh: 0
--- !u!114 &5626264982920981796
--- !u!114 &1453849250309625607
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2677123916507168712}
m_GameObject: {fileID: 9159917045172241899}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fafbcd26aa8d175448880b37b7a41b2e, type: 3}
m_Name:
m_EditorClassIdentifier:
StateDamping: 10
Fill: {fileID: 8035498868821314605}
Fill: {fileID: 3871492197986661902}
CurrentState: 0
DisableClickWhenSelected: 1
UnselectedColor: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355}
HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.29803923}
ClickColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196}
--- !u!1 &3567103445860279401
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6602089867192183683}
- component: {fileID: 894355259237647483}
- component: {fileID: 1120484356114752953}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6602089867192183683
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &894355259237647483
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_CullTransparentMesh: 0
--- !u!114 &1120484356114752953
DisabledColor: {r: 0, g: 0, b: 0, a: 0}
--- !u!114 &9159917045172241898
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3567103445860279401}
m_GameObject: {fileID: 9159917045172241899}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Script: {fileID: 11500000, guid: 8c0b005aebd0cd947a04034f1a42e838, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 123456789
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_textAlignment: 516
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: 0
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 1120484356114752953}
characterCount: 9
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 9
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7198678740849276813
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5843074710384729622}
- component: {fileID: 7637636659958895358}
- component: {fileID: 8035498868821314605}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5843074710384729622
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2677123916507168719}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7637636659958895358
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_CullTransparentMesh: 0
--- !u!114 &8035498868821314605
Label: {fileID: 9159917045079857287}
Button: {fileID: 1453849250309625607}
--- !u!114 &7146960633535889349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7198678740849276813}
m_GameObject: {fileID: 9159917045172241899}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5b8c5126640066e4fabe6e65b7225b3b
guid: be88722a74d512d45a454fe91327a389
PrefabImporter:
externalObjects: {}
userData:

View file

@ -227,6 +227,7 @@ GameObject:
- component: {fileID: 3436413162678517982}
- component: {fileID: 3123360186942093854}
- component: {fileID: 3441005906764424621}
- component: {fileID: 959243725711984767}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
@ -252,7 +253,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 0}
m_SizeDelta: {x: 24, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3123360186942093854
CanvasRenderer:
@ -289,6 +290,20 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &959243725711984767
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3491766746367124251}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -1254083943, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 2
m_AspectRatio: 1
--- !u!1 &4127690186169542500
GameObject:
m_ObjectHideFlags: 0
@ -301,6 +316,7 @@ GameObject:
- component: {fileID: 4127690186169542511}
- component: {fileID: 4127690186169542497}
- component: {fileID: 1663396771457720812}
- component: {fileID: 284875493}
m_Layer: 5
m_Name: Ranged Float Field
m_TagString: Untagged
@ -315,7 +331,7 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127690186169542500}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
@ -372,6 +388,29 @@ MonoBehaviour:
m_EditorClassIdentifier:
Label: {fileID: 4127690186274268503}
Slider: {fileID: 419581697200562713}
--- !u!114 &284875493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127690186169542500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 12
m_Right: 4
m_Top: 6
m_Bottom: 6
m_ChildAlignment: 4
m_Spacing: 4
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
--- !u!1 &4127690186274268521
GameObject:
m_ObjectHideFlags: 0
@ -383,6 +422,7 @@ GameObject:
- component: {fileID: 4127690186274268520}
- component: {fileID: 4127690186274268502}
- component: {fileID: 4127690186274268503}
- component: {fileID: 284875491}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
@ -405,9 +445,9 @@ RectTransform:
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 2, y: 0}
m_SizeDelta: {x: -4, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4127690186274268502
CanvasRenderer:
@ -528,6 +568,26 @@ MonoBehaviour:
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &284875491
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127690186274268521}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 3
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &4127690186686703195
GameObject:
m_ObjectHideFlags: 0
@ -539,6 +599,7 @@ GameObject:
- component: {fileID: 4127690186686703194}
- component: {fileID: 4127690186686703192}
- component: {fileID: 4127690186686703193}
- component: {fileID: 284875487}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
@ -563,7 +624,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 16, y: 4}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4127690186686703192
CanvasRenderer:
@ -600,6 +661,26 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &284875487
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127690186686703195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 1
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &5375798165568630635
GameObject:
m_ObjectHideFlags: 0
@ -682,6 +763,7 @@ GameObject:
m_Component:
- component: {fileID: 7146463267720429741}
- component: {fileID: 419581697200562713}
- component: {fileID: 284875490}
m_Layer: 5
m_Name: Slider
m_TagString: Untagged
@ -707,10 +789,10 @@ RectTransform:
m_Father: {fileID: 4127690186169542499}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.6, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 20}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &419581697200562713
MonoBehaviour:
@ -759,6 +841,26 @@ MonoBehaviour:
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &284875490
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7175745493391583159}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 0
m_PreferredHeight: -1
m_FlexibleWidth: 2
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &9025170479900142466
GameObject:
m_ObjectHideFlags: 0

View file

@ -164,7 +164,7 @@ MonoBehaviour:
m_text: Corporation
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 54f472d4b2cd9b84b8d9917ec13a4e94, type: 2}
m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32,
m_sharedMaterial: {fileID: 21096540314249858, guid: 54f472d4b2cd9b84b8d9917ec13a4e94,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
@ -191,12 +191,12 @@ MonoBehaviour:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 28
m_fontSizeBase: 32
m_fontSizeBase: 28
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_fontStyle: 0
m_textAlignment: 514
m_characterSpacing: 0
m_wordSpacing: 0

Binary file not shown.

View file

@ -394,7 +394,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 84.44
value: 81.35
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
@ -6012,7 +6012,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 79.685
value: 76.865005
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
@ -6952,7 +6952,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 88.619995
value: 85.515
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
@ -7675,7 +7675,7 @@ MonoBehaviour:
Tech: {fileID: 586612708}
RadialLink: {fileID: 1417816149}
Arrow: {fileID: 1083812776}
PropertiesPanel: {fileID: 0}
PropertiesPanel: {fileID: 7350752487568396160}
TestMode: 0
TechCount: 500
SeedTechs: 15
@ -13232,7 +13232,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 119.65
value: 114.465
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
@ -20213,7 +20213,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 89.78
value: 86.59
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
@ -22136,13 +22136,23 @@ PrefabInstance:
- target: {fileID: 2378632238049155248, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.000061035156
value: -0.000061035156
objectReference: {fileID: 0}
- target: {fileID: 2378632238049155251, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_ChildForceExpandWidth
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2378632238049155251, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_Padding.m_Left
value: 16
objectReference: {fileID: 0}
- target: {fileID: 2378632238049155251, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_Padding.m_Right
value: 16
objectReference: {fileID: 0}
- target: {fileID: 2378632238144827081, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_AnchorMax.x
@ -22241,7 +22251,7 @@ PrefabInstance:
- target: {fileID: 2378632240158519326, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_SizeDelta.x
value: 500
value: 512
objectReference: {fileID: 0}
- target: {fileID: 2378632240158519326, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
@ -22324,6 +22334,26 @@ PrefabInstance:
value:
objectReference: {fileID: 21423695648544140, guid: f353c922a07f02041bdb1694a3faf9b7,
type: 2}
- target: {fileID: 5116519198747529738, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_fontSize
value: 60
objectReference: {fileID: 0}
- target: {fileID: 5116519198747529738, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_fontSizeBase
value: 60
objectReference: {fileID: 0}
- target: {fileID: 5116519198747529738, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_textInfo.lineCount
value: 2
objectReference: {fileID: 0}
- target: {fileID: 5116519198747529738, guid: 4fca44e21a27a6d48916d2cc4b6e2df0,
type: 3}
propertyPath: m_textAlignment
value: 514
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4fca44e21a27a6d48916d2cc4b6e2df0, type: 3}
--- !u!114 &7350752487568396160 stripped
@ -22397,27 +22427,6 @@ PrefabInstance:
propertyPath: m_subTextObjects.Array.data[1]
value:
objectReference: {fileID: 650897775}
- target: {fileID: 4750078953547169287, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_sharedMaterial
value:
objectReference: {fileID: 21096540314249858, guid: 54f472d4b2cd9b84b8d9917ec13a4e94,
type: 2}
- target: {fileID: 4750078953547169287, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_firstOverflowCharacterIndex
value: -1
objectReference: {fileID: 0}
- target: {fileID: 4750078953547169287, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_textAlignment
value: 514
objectReference: {fileID: 0}
- target: {fileID: 4750078953547169287, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_fontSizeBase
value: 28
objectReference: {fileID: 0}
- target: {fileID: 5318229203699776728, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_LocalPosition.x
@ -22531,7 +22540,7 @@ PrefabInstance:
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 126.31
value: 120.755
objectReference: {fileID: 0}
- target: {fileID: 6493174789768221420, guid: b93e36d73a071274d8e9225e077ce92a,
type: 3}

View file

@ -64,12 +64,12 @@ namespace Microsoft.Msagl.Core.Layout {
}
double margins;
#if DEBUG && TEST_MSAGL
/// <summary>
/// curves to show debug stuff
/// </summary>
public DebugCurve[] DebugCurves;
#endif
// #if DEBUG && TEST_MSAGL
// /// <summary>
// /// curves to show debug stuff
// /// </summary>
// public DebugCurve[] DebugCurves;
// #endif
/// <summary>
/// margins width are equal from the left and from the right; they are given in percents
@ -170,11 +170,11 @@ namespace Microsoft.Msagl.Core.Layout {
node.Transform(matrix);
foreach (var edge in Edges)
edge.Transform(matrix);
#if DEBUG && TEST_MSAGL
if (DebugCurves != null)
foreach (var dc in DebugCurves)
dc.Curve = dc.Curve.Transform(matrix);
#endif
// #if DEBUG && TEST_MSAGL
// if (DebugCurves != null)
// foreach (var dc in DebugCurves)
// dc.Curve = dc.Curve.Transform(matrix);
// #endif
UpdateBoundingBox();
}
@ -237,11 +237,11 @@ namespace Microsoft.Msagl.Core.Layout {
if (c.BoundaryCurve != null)
b.Add(c.BoundaryCurve.BoundingBox);
}
#if DEBUG && TEST_MSAGL
if(DebugCurves!=null)
foreach (var debugCurve in DebugCurves.Where(d => d.Curve != null))
b.Add(debugCurve.Curve.BoundingBox);
#endif
// #if DEBUG && TEST_MSAGL
// if(DebugCurves!=null)
// foreach (var debugCurve in DebugCurves.Where(d => d.Curve != null))
// b.Add(debugCurve.Curve.BoundingBox);
// #endif
}
/// <summary>
@ -303,41 +303,41 @@ namespace Microsoft.Msagl.Core.Layout {
{
return this.Nodes.FirstOrDefault(n => n.UserData.Equals(userData));
}
#if TEST_MSAGL
///<summary>
///</summary>
public void SetDebugIds()
{
int id = 0;
foreach (var node in RootCluster.AllClustersDepthFirst())
node.DebugId = id++;
foreach (var node in Nodes)
if (node.DebugId == null)
node.DebugId = id++;
}
internal void CheckClusterConsistency() {
foreach (var cluster in RootCluster.AllClustersDepthFirst())
CheckClusterConsistency(cluster);
}
static void CheckClusterConsistency(Cluster cluster) {
if (cluster.BoundaryCurve == null)
return;
foreach (var child in cluster.Clusters.Concat(cluster.Nodes)) {
var inside=Curve.CurveIsInsideOther(child.BoundaryCurve, cluster.BoundaryCurve);
#if TEST_MSAGL && DEBUG
// if (!inside)
// LayoutAlgorithmSettings.ShowDebugCurves(new DebugCurve("green", cluster.BoundaryCurve), new DebugCurve("red", child.BoundaryCurve));
#endif
Debug.Assert(inside,
"A child of a cluster has to have the BoundaryCurve inside of the BoundaryCurve of the cluster");
}
}
#endif
// #if TEST_MSAGL
// ///<summary>
// ///</summary>
//
// public void SetDebugIds()
// {
// int id = 0;
// foreach (var node in RootCluster.AllClustersDepthFirst())
// node.DebugId = id++;
//
// foreach (var node in Nodes)
// if (node.DebugId == null)
// node.DebugId = id++;
// }
//
// internal void CheckClusterConsistency() {
// foreach (var cluster in RootCluster.AllClustersDepthFirst())
// CheckClusterConsistency(cluster);
// }
//
// static void CheckClusterConsistency(Cluster cluster) {
// if (cluster.BoundaryCurve == null)
// return;
// foreach (var child in cluster.Clusters.Concat(cluster.Nodes)) {
// var inside=Curve.CurveIsInsideOther(child.BoundaryCurve, cluster.BoundaryCurve);
// #if TEST_MSAGL && DEBUG
// // if (!inside)
// // LayoutAlgorithmSettings.ShowDebugCurves(new DebugCurve("green", cluster.BoundaryCurve), new DebugCurve("red", child.BoundaryCurve));
// #endif
// Debug.Assert(inside,
// "A child of a cluster has to have the BoundaryCurve inside of the BoundaryCurve of the cluster");
// }
//
// }
// #endif
/// <summary>
/// info of layers for large graph browsing
/// </summary>

View file

@ -47,44 +47,44 @@ namespace Microsoft.Msagl.Core.Layout {
#endregion
#region test_msagl
#if TEST_MSAGL
static Show show;
/// <summary>
/// Used for debugging purposes to display all kind of intermediate curves.
/// </summary>
public static Show Show {
get { return show; }
set { show = value; }
}
/// <summary>
/// Used for debugging purposes to display all kind of intermediate curves with widht and color
/// </summary>
public static ShowDebugCurves ShowDebugCurves { get; set; }
/// <summary>
/// Used for debugging purposes to display all kind of intermediate curves with width and color
/// </summary>
public static ShowDebugCurvesEnumeration ShowDebugCurvesEnumeration { get; set; }
static ShowDatabase showDataBase;
/// <summary>
/// used for debugging purposes to display anchors and paths that are kept in the DataBase
/// </summary>
public static ShowDatabase ShowDatabase {
get { return showDataBase; }
set { showDataBase = value; }
}
///<summary>
///</summary>
public static ShowGraph ShowGraph { get; set; }
#endif
// #if TEST_MSAGL
// static Show show;
//
// /// <summary>
// /// Used for debugging purposes to display all kind of intermediate curves.
// /// </summary>
// public static Show Show {
// get { return show; }
// set { show = value; }
// }
//
// /// <summary>
// /// Used for debugging purposes to display all kind of intermediate curves with widht and color
// /// </summary>
// public static ShowDebugCurves ShowDebugCurves { get; set; }
//
//
// /// <summary>
// /// Used for debugging purposes to display all kind of intermediate curves with width and color
// /// </summary>
// public static ShowDebugCurvesEnumeration ShowDebugCurvesEnumeration { get; set; }
//
//
// static ShowDatabase showDataBase;
//
// /// <summary>
// /// used for debugging purposes to display anchors and paths that are kept in the DataBase
// /// </summary>
// public static ShowDatabase ShowDatabase {
// get { return showDataBase; }
// set { showDataBase = value; }
// }
//
// ///<summary>
// ///</summary>
// public static ShowGraph ShowGraph { get; set; }
//
// #endif
#endregion

View file

@ -406,42 +406,42 @@ namespace Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTre
return euclid;
}
#if DEBUG && !SHARPKIT
/// <summary>
/// Shows the current state of the algorithm for debug purposes.
/// </summary>
/// <param name="treeEdges"></param>
/// <param name="proximityEdges"></param>
/// <param name="nodeSizes"></param>
/// <param name="nodePos"></param>
/// <param name="rootId"></param>
void ShowAndMoveBoxesRemoveLater(List<Tuple<int, int, double, double, double>> treeEdges,
List<Tuple<int, int, double, double, double>> proximityEdges, Size[] nodeSizes, Point[] nodePos, int rootId) {
var l = new List<DebugCurve>();
foreach (var tuple in proximityEdges)
l.Add(new DebugCurve(100, 0.5, "black", new LineSegment(nodePos[tuple.Item1], nodePos[tuple.Item2])));
//just for debug
var nodeBoxes = new Rectangle[nodeSizes.Length];
for (int i = 0; i < nodePos.Length; i++)
nodeBoxes[i] = new Rectangle(nodeSizes[i], nodePos[i]);
l.AddRange(nodeBoxes.Select(b => new DebugCurve(100, 0.3, "green", b.Perimeter())));
if (treeEdges != null)
l.AddRange(
treeEdges.Select(
e =>
new DebugCurve(200, GetEdgeWidth(e), "red",
new LineSegment(nodePos[e.Item1], nodePos[e.Item2]))));
if (rootId >= 0)
l.Add(new DebugCurve(100, 10, "blue", CurveFactory.CreateOctagon(30, 30, nodePos[rootId])));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
static double GetEdgeWidth(Tuple<int, int, double, double, double> edge) {
if (edge.Item3 > 1) //overlap
return 6;
return 2;
}
#endif
// #if DEBUG && !SHARPKIT
//
// /// <summary>
// /// Shows the current state of the algorithm for debug purposes.
// /// </summary>
// /// <param name="treeEdges"></param>
// /// <param name="proximityEdges"></param>
// /// <param name="nodeSizes"></param>
// /// <param name="nodePos"></param>
// /// <param name="rootId"></param>
// void ShowAndMoveBoxesRemoveLater(List<Tuple<int, int, double, double, double>> treeEdges,
// List<Tuple<int, int, double, double, double>> proximityEdges, Size[] nodeSizes, Point[] nodePos, int rootId) {
// var l = new List<DebugCurve>();
// foreach (var tuple in proximityEdges)
// l.Add(new DebugCurve(100, 0.5, "black", new LineSegment(nodePos[tuple.Item1], nodePos[tuple.Item2])));
// //just for debug
// var nodeBoxes = new Rectangle[nodeSizes.Length];
// for (int i = 0; i < nodePos.Length; i++)
// nodeBoxes[i] = new Rectangle(nodeSizes[i], nodePos[i]);
// l.AddRange(nodeBoxes.Select(b => new DebugCurve(100, 0.3, "green", b.Perimeter())));
// if (treeEdges != null)
// l.AddRange(
// treeEdges.Select(
// e =>
// new DebugCurve(200, GetEdgeWidth(e), "red",
// new LineSegment(nodePos[e.Item1], nodePos[e.Item2]))));
// if (rootId >= 0)
// l.Add(new DebugCurve(100, 10, "blue", CurveFactory.CreateOctagon(30, 30, nodePos[rootId])));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
// static double GetEdgeWidth(Tuple<int, int, double, double, double> edge) {
// if (edge.Item3 > 1) //overlap
// return 6;
// return 2;
// }
// #endif
/// <summary>
/// Lets the tree grow according to the ideal distances.

View file

@ -78,28 +78,28 @@ namespace Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.MinimumSpanningTre
/// </summary>
public static void Test()
{
#if DEBUG && !SHARPKIT
int count = 100;
var random = new Random(3);
var points = new List<Point>();
for (int i = 0; i < count; i++)
points.Add(20 * new Point(random.NextDouble(), random.NextDouble()));
var cdt = new Cdt(points, null, null);
cdt.Run();
var ret = GetMstOnCdt(cdt, e => (e.lowerSite.Point - e.upperSite.Point).Length);
var l = new List<DebugCurve>();
foreach(var s in cdt.PointsToSites.Values)
foreach (var e in s.Edges)
{
l.Add(new DebugCurve(100, 0.1, "black", new LineSegment(e.lowerSite.Point, e.upperSite.Point)));
}
foreach (var e in ret)
{
l.Add(new DebugCurve(100, 0.12, "red", new LineSegment(e.lowerSite.Point, e.upperSite.Point)));
}
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
#endif
// #if DEBUG && !SHARPKIT
// int count = 100;
// var random = new Random(3);
// var points = new List<Point>();
// for (int i = 0; i < count; i++)
// points.Add(20 * new Point(random.NextDouble(), random.NextDouble()));
//
// var cdt = new Cdt(points, null, null);
// cdt.Run();
// var ret = GetMstOnCdt(cdt, e => (e.lowerSite.Point - e.upperSite.Point).Length);
// var l = new List<DebugCurve>();
// foreach(var s in cdt.PointsToSites.Values)
// foreach (var e in s.Edges)
// {
// l.Add(new DebugCurve(100, 0.1, "black", new LineSegment(e.lowerSite.Point, e.upperSite.Point)));
// }
// foreach (var e in ret)
// {
// l.Add(new DebugCurve(100, 0.12, "red", new LineSegment(e.lowerSite.Point, e.upperSite.Point)));
// }
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// #endif
}
}
}

View file

@ -502,40 +502,40 @@ namespace Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval {
Point[] nodePositions, List<Point> newPositions,
List<Tuple<int, int, double, double>> proximityEdgesWithDistance,
Point[] finalGridVectors) {
#if DEBUG && !SHARPKIT
if (DebugMode && currentIteration%1 == 0) {
List<DebugCurve> curveList = new List<DebugCurve>();
var nodeBoxes = new Rectangle[nodeSizes.Length];
for(int i=0;i<nodeBoxes.Length;i++)
nodeBoxes[i]=new Rectangle(nodeSizes[i], nodePositions[i]);
var nodeCurves =
nodeBoxes.Select(
v =>
new DebugCurve(220, 1, "black", Curve.PolylineAroundClosedCurve(CurveFactory.CreateRectangle(v))));
curveList.AddRange(nodeCurves);
var vectors = nodePositions.Select(
(p, i) =>
new DebugCurve(220, 2, "red", new Polyline(p, newPositions[i]))).ToList();
foreach (Tuple<int, int, double, double> tuple in proximityEdgesWithDistance) {
if (tuple.Item3 > 0) {
curveList.Add(new DebugCurve(220, 1, "gray",
new Polyline(nodePositions[tuple.Item1],
nodePositions[tuple.Item2])));
}
}
curveList.AddRange(vectors);
if (finalGridVectors != null) {
var gridFlowVectors = nodePositions.Select((p, i) =>
new DebugCurve(220, 2, "blue",
new Polyline(p, p + finalGridVectors[i])))
.ToList();
curveList.AddRange(gridFlowVectors);
}
LayoutAlgorithmSettings.ShowDebugCurves(curveList.ToArray());
}
#endif
// #if DEBUG && !SHARPKIT
// if (DebugMode && currentIteration%1 == 0) {
// List<DebugCurve> curveList = new List<DebugCurve>();
// var nodeBoxes = new Rectangle[nodeSizes.Length];
// for(int i=0;i<nodeBoxes.Length;i++)
// nodeBoxes[i]=new Rectangle(nodeSizes[i], nodePositions[i]);
// var nodeCurves =
// nodeBoxes.Select(
// v =>
// new DebugCurve(220, 1, "black", Curve.PolylineAroundClosedCurve(CurveFactory.CreateRectangle(v))));
// curveList.AddRange(nodeCurves);
// var vectors = nodePositions.Select(
// (p, i) =>
// new DebugCurve(220, 2, "red", new Polyline(p, newPositions[i]))).ToList();
//
// foreach (Tuple<int, int, double, double> tuple in proximityEdgesWithDistance) {
// if (tuple.Item3 > 0) {
// curveList.Add(new DebugCurve(220, 1, "gray",
// new Polyline(nodePositions[tuple.Item1],
// nodePositions[tuple.Item2])));
// }
// }
// curveList.AddRange(vectors);
// if (finalGridVectors != null) {
// var gridFlowVectors = nodePositions.Select((p, i) =>
// new DebugCurve(220, 2, "blue",
// new Polyline(p, p + finalGridVectors[i])))
// .ToList();
// curveList.AddRange(gridFlowVectors);
// }
//
// LayoutAlgorithmSettings.ShowDebugCurves(curveList.ToArray());
// }
// #endif
}
int CompleteProximityGraphWithRTree(ref int currentCrossings,

View file

@ -93,9 +93,9 @@ namespace Microsoft.Msagl.Core.Layout.ProximityOverlapRemoval.StressEnergy {
for (int i = 0; i < result.Count; i++) {
graph.Nodes[i].Center = result[i];
}
#if DEBUG && !SHARPKIT
LayoutAlgorithmSettings.ShowGraph(graph);
#endif
// #if DEBUG && !SHARPKIT
// LayoutAlgorithmSettings.ShowGraph(graph);
// #endif
}
}
}

View file

@ -1,188 +1,188 @@
#if TEST_MSAGL
using System;
using Microsoft.Msagl.Core.Geometry.Curves;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
///</summary>
[Serializable]
public class DebugCurve : DebugShape {
/// <summary>
/// color transparency
/// </summary>
public byte Transparency { get; set; }
double width = 1;
///<summary>
///</summary>
public ICurve Curve { get; set; }
///<summary>
///</summary>
public double Width {
get { return width; }
set { width = value; }
}
///<summary>
///</summary>
///<param name="transparency"></param>
///<param name="width"></param>
///<param name="curve"></param>
///<param name="color"></param>
///<param name="id"></param>
public DebugCurve(byte transparency, double width, string color, ICurve curve, object id)
: this(width, color, curve, id) {
Transparency = transparency;
}
///<summary>
///</summary>
///<param name="transparency"></param>
///<param name="width"></param>
///<param name="curve"></param>
///<param name="color"></param>
///<param name="dashArray"></param>
public DebugCurve(byte transparency, double width, string color, ICurve curve, double [] dashArray)
: this(width, color, curve, null) {
Transparency = transparency;
DashArray = dashArray;
}
///<summary>
///</summary>
///<param name="transparency"></param>
///<param name="width"></param>
///<param name="curve"></param>
///<param name="color"></param>
public DebugCurve(byte transparency, double width, string color, ICurve curve)
: this(width, color, curve, null)
{
Transparency = transparency;
}
/// <summary>
/// </summary>
/// <param name="transparency"></param>
/// <param name="width"></param>
/// <param name="color"></param>
/// <param name="fillColor"></param>
/// <param name="curve"></param>
public DebugCurve(byte transparency, double width, string color, string fillColor, ICurve curve)
: this(width, color, fillColor, curve, null) {
Transparency = transparency;
}
///<summary>
///</summary>
///<param name="width"></param>
///<param name="color"></param>
///<param name="curve"></param>
public DebugCurve(double width, string color, ICurve curve):this(width,color,curve,null)
{
}
///<summary>
///</summary>
///<param name="width"></param>
///<param name="color"></param>
///<param name="curve"></param>
///<param name="id"></param>
public DebugCurve(double width, string color, ICurve curve, object id) {
Transparency = 255;
Width = width;
Color = color;
Curve = curve;
Label = id;
}
/// <summary>
/// </summary>
/// <param name="width"></param>
/// <param name="color"></param>
/// <param name="fillColor"></param>
/// <param name="curve"></param>
/// <param name="id"></param>
public DebugCurve(double width, string color,string fillColor, ICurve curve, object id): this(width, color, curve, null) {
FillColor = fillColor;
}
///<summary>
///</summary>
public object Label { get; set; }
///<summary>
///</summary>
///<param name="curve"></param>
///<param name="color"></param>
public DebugCurve(string color, ICurve curve):this(1, color, curve, null){}
///<summary>
///</summary>
///<param name="curve"></param>
///<param name="pen"></param>
public DebugCurve(double pen, ICurve curve) : this(pen, "black", curve, null){}
///<summary>
///</summary>
///<param name="curve"></param>
///<param name="id"></param>
public DebugCurve(ICurve curve, object id) : this(1, "black", curve, id) { }
///<summary>
///</summary>
///<param name="color"></param>
///<param name="curve"></param>
///<param name="id"></param>
public DebugCurve(string color, ICurve curve, object id) : this(1, color, curve, id) { }
///<summary>
///</summary>
///<param name="curve"></param>
public DebugCurve(ICurve curve) : this(1, "black", curve, null) { }
/// <summary>
/// color strings for debugging
/// </summary>
[SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")]
public static readonly string[] Colors = {
"DeepSkyBlue", "IndianRed", "Orange", "Gold", "DarkRed", "Plum",
"Red", "Violet", "Indigo", "Yellow", "OrangeRed", "Tomato", "Purple"
, "SaddleBrown", "Green", "Navy", "Aqua", "Pink", "Bisque", "Black",
"BlanchedAlmond", "Blue", "BlueViolet", "Brown", "Lime", "BurlyWood"
, "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson",
"Cyan", "CadetBlue", "Chartreuse", "DarkBlue", "DarkCyan",
"DarkGoldenrod", "DarkGray", "DarkGreen", "DarkKhaki", "DarkMagenta"
, "DarkOliveGreen", "DarkOrange", "DarkOrchid", "DarkSalmon",
"DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkTurquoise",
"DarkViolet", "DeepPink", "DimGray", "DodgerBlue", "Firebrick",
"FloralWhite", "ForestGreen", "Fuchsia", "CodeAnalysis", "Gainsboro"
, "GhostWhite", "Goldenrod", "Gray", "GreenYellow", "Honeydew",
"HotPink", "Ivory", "Lavender", "LavenderBlush", "LawnGreen",
"LemonChiffon", "LightBlue", "LightCoral", "LightCyan",
"LightGoldenrodYellow", "LightGray", "LightGreen", "LightPink",
"LightSalmon", "LightSeaGreen", "LightSkyBlue", "LightSlateGray",
"LightSteelBlue", "LightYellow", "LimeGreen", "Linen", "Magenta",
"Maroon", "MediumAquamarine", "MediumBlue", "MediumOrchid",
"MediumPurple", "MediumSeaGreen", "MediumSlateBlue",
"MediumSpringGreen", "MediumTurquoise", "MediumVioletRed",
"MidnightBlue", "MintCream", "MistyRose", "Moccasin", "NavajoWhite",
"OldLace", "Olive", "OliveDrab", "Orchid", "PaleGoldenrod",
"PaleGreen", "PaleTurquoise", "PaleVioletRed", "PapayaWhip",
"PeachPuff", "Peru", "PowderBlue", "RosyBrown", "RoyalBlue",
"Salmon", "SandyBrown", "SeaGreen", "CodeAnalysis", "SeaShell",
"Sienna", "Silver", "SkyBlue", "SlateBlue", "SlateGray", "Snow",
"SpringGreen", "SteelBlue", "Tan", "Teal", "Thistle", "Transparent",
"Turquoise", "Aquamarine", "Azure", "Beige", "Wheat", "White",
"WhiteSmoke", "YellowGreen", "Khaki", "AntiqueWhite"
};
///<summary>
/// the pattern of dashes
///</summary>
public double [] DashArray;
}
}
#endif
// #if TEST_MSAGL
// using System;
// using Microsoft.Msagl.Core.Geometry.Curves;
// using System.Diagnostics.CodeAnalysis;
//
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// ///</summary>
// [Serializable]
// public class DebugCurve : DebugShape {
// /// <summary>
// /// color transparency
// /// </summary>
// public byte Transparency { get; set; }
//
// double width = 1;
//
// ///<summary>
// ///</summary>
// public ICurve Curve { get; set; }
//
// ///<summary>
// ///</summary>
// public double Width {
// get { return width; }
// set { width = value; }
// }
//
// ///<summary>
// ///</summary>
// ///<param name="transparency"></param>
// ///<param name="width"></param>
// ///<param name="curve"></param>
// ///<param name="color"></param>
// ///<param name="id"></param>
// public DebugCurve(byte transparency, double width, string color, ICurve curve, object id)
// : this(width, color, curve, id) {
// Transparency = transparency;
// }
//
// ///<summary>
// ///</summary>
// ///<param name="transparency"></param>
// ///<param name="width"></param>
// ///<param name="curve"></param>
// ///<param name="color"></param>
// ///<param name="dashArray"></param>
// public DebugCurve(byte transparency, double width, string color, ICurve curve, double [] dashArray)
// : this(width, color, curve, null) {
// Transparency = transparency;
// DashArray = dashArray;
// }
//
// ///<summary>
// ///</summary>
// ///<param name="transparency"></param>
// ///<param name="width"></param>
// ///<param name="curve"></param>
// ///<param name="color"></param>
// public DebugCurve(byte transparency, double width, string color, ICurve curve)
// : this(width, color, curve, null)
// {
// Transparency = transparency;
// }
// /// <summary>
// /// </summary>
// /// <param name="transparency"></param>
// /// <param name="width"></param>
// /// <param name="color"></param>
// /// <param name="fillColor"></param>
// /// <param name="curve"></param>
// public DebugCurve(byte transparency, double width, string color, string fillColor, ICurve curve)
// : this(width, color, fillColor, curve, null) {
// Transparency = transparency;
// }
//
// ///<summary>
// ///</summary>
// ///<param name="width"></param>
// ///<param name="color"></param>
// ///<param name="curve"></param>
// public DebugCurve(double width, string color, ICurve curve):this(width,color,curve,null)
// {
//
// }
// ///<summary>
// ///</summary>
// ///<param name="width"></param>
// ///<param name="color"></param>
// ///<param name="curve"></param>
// ///<param name="id"></param>
// public DebugCurve(double width, string color, ICurve curve, object id) {
// Transparency = 255;
// Width = width;
// Color = color;
// Curve = curve;
// Label = id;
// }
// /// <summary>
// /// </summary>
// /// <param name="width"></param>
// /// <param name="color"></param>
// /// <param name="fillColor"></param>
// /// <param name="curve"></param>
// /// <param name="id"></param>
// public DebugCurve(double width, string color,string fillColor, ICurve curve, object id): this(width, color, curve, null) {
// FillColor = fillColor;
// }
//
// ///<summary>
// ///</summary>
// public object Label { get; set; }
//
// ///<summary>
// ///</summary>
// ///<param name="curve"></param>
// ///<param name="color"></param>
// public DebugCurve(string color, ICurve curve):this(1, color, curve, null){}
//
// ///<summary>
// ///</summary>
// ///<param name="curve"></param>
// ///<param name="pen"></param>
// public DebugCurve(double pen, ICurve curve) : this(pen, "black", curve, null){}
//
// ///<summary>
// ///</summary>
// ///<param name="curve"></param>
// ///<param name="id"></param>
// public DebugCurve(ICurve curve, object id) : this(1, "black", curve, id) { }
//
// ///<summary>
// ///</summary>
// ///<param name="color"></param>
// ///<param name="curve"></param>
// ///<param name="id"></param>
// public DebugCurve(string color, ICurve curve, object id) : this(1, color, curve, id) { }
//
//
// ///<summary>
// ///</summary>
// ///<param name="curve"></param>
// public DebugCurve(ICurve curve) : this(1, "black", curve, null) { }
//
// /// <summary>
// /// color strings for debugging
// /// </summary>
// [SuppressMessage("Microsoft.Security", "CA2105:ArrayFieldsShouldNotBeReadOnly")]
// public static readonly string[] Colors = {
// "DeepSkyBlue", "IndianRed", "Orange", "Gold", "DarkRed", "Plum",
// "Red", "Violet", "Indigo", "Yellow", "OrangeRed", "Tomato", "Purple"
// , "SaddleBrown", "Green", "Navy", "Aqua", "Pink", "Bisque", "Black",
// "BlanchedAlmond", "Blue", "BlueViolet", "Brown", "Lime", "BurlyWood"
// , "Chocolate", "Coral", "CornflowerBlue", "Cornsilk", "Crimson",
// "Cyan", "CadetBlue", "Chartreuse", "DarkBlue", "DarkCyan",
// "DarkGoldenrod", "DarkGray", "DarkGreen", "DarkKhaki", "DarkMagenta"
// , "DarkOliveGreen", "DarkOrange", "DarkOrchid", "DarkSalmon",
// "DarkSeaGreen", "DarkSlateBlue", "DarkSlateGray", "DarkTurquoise",
// "DarkViolet", "DeepPink", "DimGray", "DodgerBlue", "Firebrick",
// "FloralWhite", "ForestGreen", "Fuchsia", "CodeAnalysis", "Gainsboro"
// , "GhostWhite", "Goldenrod", "Gray", "GreenYellow", "Honeydew",
// "HotPink", "Ivory", "Lavender", "LavenderBlush", "LawnGreen",
// "LemonChiffon", "LightBlue", "LightCoral", "LightCyan",
// "LightGoldenrodYellow", "LightGray", "LightGreen", "LightPink",
// "LightSalmon", "LightSeaGreen", "LightSkyBlue", "LightSlateGray",
// "LightSteelBlue", "LightYellow", "LimeGreen", "Linen", "Magenta",
// "Maroon", "MediumAquamarine", "MediumBlue", "MediumOrchid",
// "MediumPurple", "MediumSeaGreen", "MediumSlateBlue",
// "MediumSpringGreen", "MediumTurquoise", "MediumVioletRed",
// "MidnightBlue", "MintCream", "MistyRose", "Moccasin", "NavajoWhite",
// "OldLace", "Olive", "OliveDrab", "Orchid", "PaleGoldenrod",
// "PaleGreen", "PaleTurquoise", "PaleVioletRed", "PapayaWhip",
// "PeachPuff", "Peru", "PowderBlue", "RosyBrown", "RoyalBlue",
// "Salmon", "SandyBrown", "SeaGreen", "CodeAnalysis", "SeaShell",
// "Sienna", "Silver", "SkyBlue", "SlateBlue", "SlateGray", "Snow",
// "SpringGreen", "SteelBlue", "Tan", "Teal", "Thistle", "Transparent",
// "Turquoise", "Aquamarine", "Azure", "Beige", "Wheat", "White",
// "WhiteSmoke", "YellowGreen", "Khaki", "AntiqueWhite"
// };
//
// ///<summary>
// /// the pattern of dashes
// ///</summary>
// public double [] DashArray;
// }
//
// }
// #endif

View file

@ -1,64 +1,64 @@
#if TEST_MSAGL
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
namespace Microsoft.Msagl.DebugHelpers{
/// <summary>
///
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix"), Serializable]
public class DebugCurveCollection{
/// <summary>
///
/// </summary>
/// <param name="debugCurves"></param>
DebugCurveCollection(IEnumerable<DebugCurve> debugCurves){
DebugCurvesArray = debugCurves.ToArray();
}
/// <summary>
///
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
public DebugCurve[] DebugCurvesArray;
///<summary>
///</summary>
///<param name="debugCurves"></param>
///<param name="fileName"></param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public static void WriteToFile(IEnumerable<DebugCurve> debugCurves, string fileName) {
Stream stream = File.Open(fileName, FileMode.Create);
var bformatter = new BinaryFormatter();
try {
bformatter.Serialize(stream, new DebugCurveCollection(debugCurves));
}
catch (SerializationException e) {
Console.WriteLine(e.ToString());
}
stream.Close();
}
///<summary>
///</summary>
///<param name="fileName"></param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public static IEnumerable<DebugCurve> ReadFromFile(string fileName) {
Stream stream = File.Open(fileName, FileMode.Open);
var bformatter = new BinaryFormatter();
DebugCurveCollection dc = null;
try {
dc = bformatter.Deserialize(stream) as DebugCurveCollection;
}
catch (SerializationException e) {
Console.WriteLine(e.ToString());
}
stream.Close();
return new List<DebugCurve>(dc.DebugCurvesArray);
}
}
}
#endif
// #if TEST_MSAGL
// using System;
// using System.Collections.Generic;
// using System.IO;
// using System.Linq;
// using System.Runtime.Serialization;
// using System.Runtime.Serialization.Formatters.Binary;
//
// namespace Microsoft.Msagl.DebugHelpers{
// /// <summary>
// ///
// /// </summary>
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix"), Serializable]
// public class DebugCurveCollection{
// /// <summary>
// ///
// /// </summary>
// /// <param name="debugCurves"></param>
// DebugCurveCollection(IEnumerable<DebugCurve> debugCurves){
// DebugCurvesArray = debugCurves.ToArray();
// }
// /// <summary>
// ///
// /// </summary>
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")]
// public DebugCurve[] DebugCurvesArray;
//
// ///<summary>
// ///</summary>
// ///<param name="debugCurves"></param>
// ///<param name="fileName"></param>
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
// public static void WriteToFile(IEnumerable<DebugCurve> debugCurves, string fileName) {
// Stream stream = File.Open(fileName, FileMode.Create);
// var bformatter = new BinaryFormatter();
// try {
// bformatter.Serialize(stream, new DebugCurveCollection(debugCurves));
// }
// catch (SerializationException e) {
// Console.WriteLine(e.ToString());
// }
// stream.Close();
// }
//
// ///<summary>
// ///</summary>
// ///<param name="fileName"></param>
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
// public static IEnumerable<DebugCurve> ReadFromFile(string fileName) {
// Stream stream = File.Open(fileName, FileMode.Open);
// var bformatter = new BinaryFormatter();
// DebugCurveCollection dc = null;
// try {
// dc = bformatter.Deserialize(stream) as DebugCurveCollection;
// }
// catch (SerializationException e) {
// Console.WriteLine(e.ToString());
// }
// stream.Close();
// return new List<DebugCurve>(dc.DebugCurvesArray);
// }
// }
// }
// #endif

View file

@ -1,14 +1,14 @@
using Microsoft.Msagl.Core.Geometry.Curves;
#if DEBUG
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
///</summary>
public class DebugEllipse : DebugShape {
/// <summary>
///
/// </summary>
public Ellipse Ellipse { get; set; }
}
}
#endif
// #if DEBUG
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// ///</summary>
// public class DebugEllipse : DebugShape {
// /// <summary>
// ///
// /// </summary>
// public Ellipse Ellipse { get; set; }
// }
// }
// #endif

View file

@ -1,16 +1,16 @@
#if DEBUG && !SHARPKIT
using System.Collections.Generic;
namespace Microsoft.Msagl.DebugHelpers {
class DebugGraphics : IDebugGraphics {
List<DebugShape> shapes = new List<DebugShape>();
public IList<DebugShape> Shapes {
get { return shapes; }
}
public void Clear() {
shapes.Clear();
}
}
}
#endif
// #if DEBUG && !SHARPKIT
// using System.Collections.Generic;
//
// namespace Microsoft.Msagl.DebugHelpers {
// class DebugGraphics : IDebugGraphics {
// List<DebugShape> shapes = new List<DebugShape>();
// public IList<DebugShape> Shapes {
// get { return shapes; }
// }
//
// public void Clear() {
// shapes.Clear();
// }
// }
// }
// #endif

View file

@ -1,14 +1,14 @@
using Microsoft.Msagl.Core.Geometry;
#if DEBUG && !SHARPKIT
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
///</summary>
public class DebugRectangle : DebugShape {
/// <summary>
///
/// </summary>
public Rectangle Rectangle { get; set; }
}
}
#endif
// using Microsoft.Msagl.Core.Geometry;
//
// #if DEBUG && !SHARPKIT
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// ///</summary>
// public class DebugRectangle : DebugShape {
// /// <summary>
// ///
// /// </summary>
// public Rectangle Rectangle { get; set; }
// }
// }
// #endif

View file

@ -1,23 +1,23 @@
#if DEBUG
using System;
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
///</summary>
[Serializable]
public class DebugShape {
///<summary>
///</summary>
public int Pen { get; set; }
///<summary>
///</summary>
public string Color { get; set; }
/// <summary>
/// Filling Color of the Shape.
/// </summary>
public string FillColor { get; set;}
}
}
#endif
// #if DEBUG
// using System;
//
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// ///</summary>
// [Serializable]
//
// public class DebugShape {
// ///<summary>
// ///</summary>
// public int Pen { get; set; }
// ///<summary>
// ///</summary>
// public string Color { get; set; }
// /// <summary>
// /// Filling Color of the Shape.
// /// </summary>
// public string FillColor { get; set;}
//
// }
// }
// #endif

View file

@ -1,18 +1,18 @@
#if DEBUG && !SHARPKIT
using System.Collections.Generic;
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
///</summary>
public interface IDebugGraphics {
/// <summary>
///
/// </summary>
IList<DebugShape> Shapes { get; }
/// <summary>
///
/// </summary>
void Clear();
}
}
#endif
// #if DEBUG && !SHARPKIT
// using System.Collections.Generic;
//
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// ///</summary>
// public interface IDebugGraphics {
// /// <summary>
// ///
// /// </summary>
// IList<DebugShape> Shapes { get; }
// /// <summary>
// ///
// /// </summary>
// void Clear();
// }
// }
// #endif

View file

@ -1,9 +1,9 @@
#if TEST_MSAGL
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
/// shows shapes
///</summary>
///<param name="shapes"></param>
public delegate void ShowDebugCurves(params DebugCurve[] shapes);
}
#endif
// #if TEST_MSAGL
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// /// shows shapes
// ///</summary>
// ///<param name="shapes"></param>
// public delegate void ShowDebugCurves(params DebugCurve[] shapes);
// }
// #endif

View file

@ -1,11 +1,11 @@
#if TEST_MSAGL
using System.Collections.Generic;
namespace Microsoft.Msagl.DebugHelpers {
///<summary>
/// shows shapes
///</summary>
///<param name="shapes"></param>
public delegate void ShowDebugCurvesEnumeration(IEnumerable<DebugCurve> shapes);
}
#endif
// #if TEST_MSAGL
// using System.Collections.Generic;
//
// namespace Microsoft.Msagl.DebugHelpers {
// ///<summary>
// /// shows shapes
// ///</summary>
// ///<param name="shapes"></param>
// public delegate void ShowDebugCurvesEnumeration(IEnumerable<DebugCurve> shapes);
// }
// #endif

View file

@ -50,9 +50,9 @@ namespace Microsoft.Msagl.Layout.Initial {
Func<Cluster, LayoutAlgorithmSettings> clusterSettings) {
ValidateArg.IsNotNull(graph, "graph");
ValidateArg.IsNotNull(clusterSettings, "clusterSettings");
#if TEST_MSAGL
graph.SetDebugIds();
#endif
// #if TEST_MSAGL
// graph.SetDebugIds();
// #endif
this.graph = graph;
this.modifiedNodes = modifiedNodes;
this.clusterSettings = clusterSettings;

View file

@ -61,9 +61,9 @@ namespace Microsoft.Msagl.Layout.Initial {
ValidateArg.IsNotNull(graph, "graph");
ValidateArg.IsNotNull(clusters, "clusters");
ValidateArg.IsNotNull(clusterSettings, "clusterSettings");
#if TEST_MSAGL
graph.SetDebugIds();
#endif
// #if TEST_MSAGL
// graph.SetDebugIds();
// #endif
this.graph = graph;
this.clusters = clusters.ToList();

View file

@ -167,19 +167,19 @@ namespace Microsoft.Msagl.Layout.LargeGraphLayout {
}
}
*/
#if DEBUG && !SHARPKIT
static void ShowDimmedRails(Set<Rail> dimmedRails) {
var l = new List<DebugHelpers.DebugCurve>();
foreach (var r in dimmedRails) {
var s = r.ToString();
string color =
s.StartsWith("15") ? "green" : (s.StartsWith("1384") ? "red" : "blue");
l.Add(new DebugHelpers.DebugCurve(100, 1, color, r.Geometry as ICurve));
}
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
#endif
// #if DEBUG && !SHARPKIT
// static void ShowDimmedRails(Set<Rail> dimmedRails) {
// var l = new List<DebugHelpers.DebugCurve>();
// foreach (var r in dimmedRails) {
// var s = r.ToString();
// string color =
// s.StartsWith("15") ? "green" : (s.StartsWith("1384") ? "red" : "blue");
// l.Add(new DebugHelpers.DebugCurve(100, 1, color, r.Geometry as ICurve));
//
// }
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
// #endif
// void RemoveDimmedRailsFromLowerLevels(Set<Rail> dimmedRails) {
// foreach(var rail in dimmedRails)
// RemoveDimmedRailFromLowerLevels(rail);

View file

@ -3066,29 +3066,29 @@ namespace Microsoft.Msagl.Layout.LargeGraphLayout
static void ShowNodesAndSegmentsForOverlapRemoval(IEnumerable<LgNodeInfo> fixedNodes,
IEnumerable<LgNodeInfo> moveableNodes, SymmetricSegment[] fixedSegments)
{
#if DEBUG && !SHARPKIT
var l = new List<DebugCurve>();
if (fixedNodes != null && fixedNodes.Any())
{
foreach (var node in fixedNodes)
{
l.Add(new DebugCurve(200, 0.1, "red", node.BoundaryCurve));
}
}
if (fixedSegments != null && fixedSegments.Any())
{
foreach (var seg in fixedSegments)
{
var ls = new LineSegment(seg.A, seg.B);
l.Add(new DebugCurve(100, 0.1, "magenta", ls));
}
}
foreach (var node in moveableNodes)
{
l.Add(new DebugCurve(200, 0.1, "green", node.BoundaryCurve));
}
LayoutAlgorithmSettings.ShowDebugCurves(l.ToArray());
#endif
// #if DEBUG && !SHARPKIT
// var l = new List<DebugCurve>();
// if (fixedNodes != null && fixedNodes.Any())
// {
// foreach (var node in fixedNodes)
// {
// l.Add(new DebugCurve(200, 0.1, "red", node.BoundaryCurve));
// }
// }
// if (fixedSegments != null && fixedSegments.Any())
// {
// foreach (var seg in fixedSegments)
// {
// var ls = new LineSegment(seg.A, seg.B);
// l.Add(new DebugCurve(100, 0.1, "magenta", ls));
// }
// }
// foreach (var node in moveableNodes)
// {
// l.Add(new DebugCurve(200, 0.1, "green", node.BoundaryCurve));
// }
// LayoutAlgorithmSettings.ShowDebugCurves(l.ToArray());
// #endif
}
void ClearLevels(int num)
@ -3213,46 +3213,46 @@ namespace Microsoft.Msagl.Layout.LargeGraphLayout
}
#if DEBUG && !SHARPKIT
static void ShowOldNewIntersected(Set<Rail> oldIntersected, Set<Rail> newIntersected, Point a, Point shortcutted,
Point b, LgSkeletonLevel skeletonLevel)
{
var ll = new List<DebugCurve>();
ll.Add(new DebugCurve(new LineSegment(a, shortcutted)));
ll.Add(new DebugCurve(new LineSegment(shortcutted, b)));
ll.AddRange(oldIntersected.Select(r => new DebugCurve(100, 0.1, "blue", LineFromRail(r))));
ll.AddRange(newIntersected.Select(r => new DebugCurve(100, 0.1, "red", LineFromRail(r))));
ll.Add(new DebugCurve(CurveFactory.CreateCircle(3, shortcutted)));
ll.Add(new DebugCurve("red", CurveFactory.CreateCircle(3, a)));
ll.Add(new DebugCurve("green", CurveFactory.CreateCircle(3, b)));
foreach (var rail in newIntersected)
{
var e = FindRailInVisGraph(rail, skeletonLevel);
if (e == null)
{
Console.WriteLine("rail {0} is not found in the vis graph", rail);
}
}
LayoutAlgorithmSettings.ShowDebugCurves(ll.ToArray());
}
#endif
#if DEBUG && !SHARPKIT
private static void ShowOldTrajectories(LgSkeletonLevel skeletonLevel)
{
if (skeletonLevel.ZoomLevel <= 1.0) return;
var segs = skeletonLevel.PathRouter.EdgesOnOldTrajectories();
var ll = new List<DebugCurve>();
foreach (var seg in segs)
{
ll.Add(new DebugCurve(new LineSegment(seg.A, seg.B)));
}
LayoutAlgorithmSettings.ShowDebugCurves(ll.ToArray());
}
#endif
// #if DEBUG && !SHARPKIT
// static void ShowOldNewIntersected(Set<Rail> oldIntersected, Set<Rail> newIntersected, Point a, Point shortcutted,
// Point b, LgSkeletonLevel skeletonLevel)
// {
// var ll = new List<DebugCurve>();
// ll.Add(new DebugCurve(new LineSegment(a, shortcutted)));
// ll.Add(new DebugCurve(new LineSegment(shortcutted, b)));
// ll.AddRange(oldIntersected.Select(r => new DebugCurve(100, 0.1, "blue", LineFromRail(r))));
// ll.AddRange(newIntersected.Select(r => new DebugCurve(100, 0.1, "red", LineFromRail(r))));
// ll.Add(new DebugCurve(CurveFactory.CreateCircle(3, shortcutted)));
// ll.Add(new DebugCurve("red", CurveFactory.CreateCircle(3, a)));
// ll.Add(new DebugCurve("green", CurveFactory.CreateCircle(3, b)));
//
// foreach (var rail in newIntersected)
// {
// var e = FindRailInVisGraph(rail, skeletonLevel);
// if (e == null)
// {
// Console.WriteLine("rail {0} is not found in the vis graph", rail);
// }
// }
//
//
// LayoutAlgorithmSettings.ShowDebugCurves(ll.ToArray());
// }
// #endif
//
// #if DEBUG && !SHARPKIT
// private static void ShowOldTrajectories(LgSkeletonLevel skeletonLevel)
// {
// if (skeletonLevel.ZoomLevel <= 1.0) return;
// var segs = skeletonLevel.PathRouter.EdgesOnOldTrajectories();
// var ll = new List<DebugCurve>();
// foreach (var seg in segs)
// {
// ll.Add(new DebugCurve(new LineSegment(seg.A, seg.B)));
// }
// LayoutAlgorithmSettings.ShowDebugCurves(ll.ToArray());
// }
// #endif
static VisibilityEdge FindRailInVisGraph(Rail rail, LgSkeletonLevel skeletonLevel)
{

View file

@ -98,22 +98,22 @@ namespace Microsoft.Msagl.Layout.LargeGraphLayout {
var visEdgeDump =
new Set<SymmetricSegment>(
PathRouter.VisGraph.Edges.Select(e => new SymmetricSegment(e.SourcePoint, e.TargetPoint)));
#if DEBUG && !SHARPKIT
foreach (var s in routesDump - visEdgeDump)
Console.WriteLine("{0} is in routes but no in vis graph", s);
foreach (var s in visEdgeDump - routesDump)
Console.WriteLine("{0} is in visgraph but no in routes", s);
var routesOutOfVisGraph = routesDump - visEdgeDump;
if (routesOutOfVisGraph.Count > 0) {
SplineRouter.ShowVisGraph(PathRouter.VisGraph, null,null, Ttt(routesOutOfVisGraph));
}
foreach (var s in usedEdges - routesDump)
Console.WriteLine("{0} is in usedEdges but not in routes", s);
foreach (var s in routesDump - usedEdges)
Console.WriteLine("{0} is in routes but not in usedEdges", s);
#endif
// #if DEBUG && !SHARPKIT
// foreach (var s in routesDump - visEdgeDump)
// Console.WriteLine("{0} is in routes but no in vis graph", s);
// foreach (var s in visEdgeDump - routesDump)
// Console.WriteLine("{0} is in visgraph but no in routes", s);
// var routesOutOfVisGraph = routesDump - visEdgeDump;
// if (routesOutOfVisGraph.Count > 0) {
// SplineRouter.ShowVisGraph(PathRouter.VisGraph, null,null, Ttt(routesOutOfVisGraph));
// }
// foreach (var s in usedEdges - routesDump)
// Console.WriteLine("{0} is in usedEdges but not in routes", s);
//
// foreach (var s in routesDump - usedEdges)
// Console.WriteLine("{0} is in routes but not in usedEdges", s);
//
// #endif
return routesDump == visEdgeDump && usedEdges==routesDump;
}

View file

@ -353,21 +353,21 @@ namespace Microsoft.Msagl.Layout.Layered {
LayerArrays.UpdateLayers(yetBestLayers);
}
#if TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledCode")]
void Show() {
SugiyamaLayoutSettings.ShowDatabase(database);
}
#endif
// #if TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledCode")]
// void Show() {
// SugiyamaLayoutSettings.ShowDatabase(database);
// }
// #endif
#if TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.Write(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledCode")]
static void PrintPositions(double[] positions) {
for (int j = 0; j < positions.Length; j++)
Console.Write(" " + positions[j]);
Console.WriteLine();
}
#endif
// #if TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.Write(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledCode")]
// static void PrintPositions(double[] positions) {
// for (int j = 0; j < positions.Length; j++)
// Console.Write(" " + positions[j]);
// Console.WriteLine();
// }
// #endif
void SortLayerBasedOnSolution(int[] layer, ISolverShell solver) {

View file

@ -279,33 +279,33 @@ namespace Microsoft.Msagl.Miscellaneous.ConstrainedSkeleton
new RTree<Point>(_pointsToIndices.Keys.Select(p => new KeyValuePair<Rectangle, Point>(new Rectangle(p), p)));
var badSegs = (from e in _segments let overlaps = GetPointsOverlappingSeg(e, tree, indexToPoints) where overlaps.Count > 2 select e).ToList();
#if TEST_MSAGL
if (badSegs.Any())
ShowInputSegments(badSegs, indexToPoints);
#endif
// #if TEST_MSAGL
// if (badSegs.Any())
// ShowInputSegments(badSegs, indexToPoints);
// #endif
return !badSegs.Any();
}
#if TEST_MSAGL
private void ShowInputSegments(List<SymmetricTuple<int>> badSegs, Point[] indexToPoints) {
var l = new List<DebugCurve>();
foreach (var seg in _segments)
{
var p1 = indexToPoints[seg.A];
var p2 = indexToPoints[seg.B];
var ls = new LineSegment(p1, p2);
string color = badSegs.Contains(seg) ? "red" : "black";
double width = badSegs.Contains(seg) ? 3 : 1;
l.Add(new DebugCurve(100, width, color, ls));
}
//foreach (var p in indexToPoints)
//{
// l.Add(new DebugCurve(200, 0.1, "black", CurveFactory.CreateCircle(0.1, p)));
//}
LayoutAlgorithmSettings.ShowDebugCurves(l.ToArray());
}
#endif
// #if TEST_MSAGL
// private void ShowInputSegments(List<SymmetricTuple<int>> badSegs, Point[] indexToPoints) {
// var l = new List<DebugCurve>();
// foreach (var seg in _segments)
// {
// var p1 = indexToPoints[seg.A];
// var p2 = indexToPoints[seg.B];
// var ls = new LineSegment(p1, p2);
//
// string color = badSegs.Contains(seg) ? "red" : "black";
// double width = badSegs.Contains(seg) ? 3 : 1;
// l.Add(new DebugCurve(100, width, color, ls));
// }
// //foreach (var p in indexToPoints)
// //{
// // l.Add(new DebugCurve(200, 0.1, "black", CurveFactory.CreateCircle(0.1, p)));
// //}
// LayoutAlgorithmSettings.ShowDebugCurves(l.ToArray());
// }
// #endif
/*
void AddSegsHandlingOverlaps(SymmetricTuple<int> seg, RTree<Point> tree, Point[] indexToPoints) {

View file

@ -298,26 +298,26 @@ namespace Microsoft.Msagl.Prototype.LayoutEditing {
relaxedPoint.PolylinePoint.Point = relaxedPoint.OriginalPosition + v;
}
#if TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowPolylineAndObstacles(){
List<ICurve> ls = CreateListWithObstaclesAndPolyline();
SugiyamaLayoutSettings.Show(ls.ToArray());
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
List<ICurve> CreateListWithObstaclesAndPolyline(){
var ls = new List<ICurve>();
foreach (Polyline poly in obstacleCalculator.TightObstacles)
ls.Add(poly);
foreach (Polyline poly in obstacleCalculator.LooseObstacles)
ls.Add(poly);
ls.Add(Polyline);
return ls;
}
#endif
// #if TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowPolylineAndObstacles(){
// List<ICurve> ls = CreateListWithObstaclesAndPolyline();
// SugiyamaLayoutSettings.Show(ls.ToArray());
// }
//
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// List<ICurve> CreateListWithObstaclesAndPolyline(){
// var ls = new List<ICurve>();
// foreach (Polyline poly in obstacleCalculator.TightObstacles)
// ls.Add(poly);
// foreach (Polyline poly in obstacleCalculator.LooseObstacles)
// ls.Add(poly);
//
// ls.Add(Polyline);
// return ls;
// }
// #endif
void SmoothCorners(SmoothedPolyline edgePolyline) {
Site a = edgePolyline.HeadSite; //the corner start

View file

@ -200,67 +200,67 @@ namespace Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation {
return edge.CwTriangle != null || edge.CcwTriangle != null;
}
#if DEBUG && TEST_MSAGL
void ShowFrontWithSite(CdtSite site, params ICurve[] redCurves) {
var ls = new List<DebugCurve>();
if (site.Edges != null)
foreach (var e in site.Edges)
ls.Add(new DebugCurve(100, 0.001, e.Constrained?"pink":"brown", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
ls.Add(new DebugCurve(100,0.01,"brown", new Ellipse(0.5,0.5,site.Point)));
foreach (var t in Triangles) {
for (int i = 0; i < 3; i++) {
var e = t.Edges[i];
ls.Add(new DebugCurve(e.Constrained?(byte)150:(byte)50, e.Constrained?0.002:0.001, e.Constrained? "pink":"navy", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
}
}
foreach (var c in redCurves)
ls.Add(new DebugCurve(100, 0.005, "red", c));
foreach (var frontElement in front)
ls.Add(new DebugCurve(100, 0.005, "green",
new LineSegment(frontElement.Edge.upperSite.Point,
frontElement.Edge.lowerSite.Point)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
}
void ShowFront() {
ShowFront(Triangles, front, null, null);
}
internal static void ShowFront(IEnumerable<CdtTriangle> cdtTriangles, RbTree<CdtFrontElement> cdtFrontElements, IEnumerable<ICurve> redCurves, IEnumerable<ICurve> blueCurves) {
List<DebugCurve> ls = new List<DebugCurve>();
if (redCurves != null)
foreach (var c in redCurves)
ls.Add(new DebugCurve(100, 0.5, "red", c));
if (blueCurves != null)
foreach (var c in blueCurves)
ls.Add(new DebugCurve(100, 2, "blue", c));
if (cdtFrontElements != null)
foreach (var frontElement in cdtFrontElements)
ls.Add(new DebugCurve(100, 0.001, "green",
new LineSegment(frontElement.Edge.upperSite.Point,
frontElement.Edge.lowerSite.Point)));
foreach (var t in cdtTriangles) {
for (int i = 0; i < 3; i++) {
var e = t.Edges[i];
ls.Add(GetDebugCurveOfCdtEdge(e));
}
}
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
}
static DebugCurve GetDebugCurveOfCdtEdge(CdtEdge e) {
if(e.CcwTriangle==null || e.CwTriangle==null)
return new DebugCurve(255, 4, e.Constrained ? "brown" : "blue", new LineSegment(e.upperSite.Point, e.lowerSite.Point));
return new DebugCurve(100, e.Constrained?0.002:0.001, e.Constrained?"pink":"navy", new LineSegment(e.upperSite.Point, e.lowerSite.Point));
}
#endif
// #if DEBUG && TEST_MSAGL
// void ShowFrontWithSite(CdtSite site, params ICurve[] redCurves) {
// var ls = new List<DebugCurve>();
//
//
// if (site.Edges != null)
// foreach (var e in site.Edges)
// ls.Add(new DebugCurve(100, 0.001, e.Constrained?"pink":"brown", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
//
// ls.Add(new DebugCurve(100,0.01,"brown", new Ellipse(0.5,0.5,site.Point)));
//
// foreach (var t in Triangles) {
// for (int i = 0; i < 3; i++) {
// var e = t.Edges[i];
// ls.Add(new DebugCurve(e.Constrained?(byte)150:(byte)50, e.Constrained?0.002:0.001, e.Constrained? "pink":"navy", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
// }
// }
//
// foreach (var c in redCurves)
// ls.Add(new DebugCurve(100, 0.005, "red", c));
//
//
// foreach (var frontElement in front)
// ls.Add(new DebugCurve(100, 0.005, "green",
// new LineSegment(frontElement.Edge.upperSite.Point,
// frontElement.Edge.lowerSite.Point)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// }
// void ShowFront() {
// ShowFront(Triangles, front, null, null);
// }
//
// internal static void ShowFront(IEnumerable<CdtTriangle> cdtTriangles, RbTree<CdtFrontElement> cdtFrontElements, IEnumerable<ICurve> redCurves, IEnumerable<ICurve> blueCurves) {
// List<DebugCurve> ls = new List<DebugCurve>();
// if (redCurves != null)
// foreach (var c in redCurves)
// ls.Add(new DebugCurve(100, 0.5, "red", c));
// if (blueCurves != null)
// foreach (var c in blueCurves)
// ls.Add(new DebugCurve(100, 2, "blue", c));
//
// if (cdtFrontElements != null)
// foreach (var frontElement in cdtFrontElements)
// ls.Add(new DebugCurve(100, 0.001, "green",
// new LineSegment(frontElement.Edge.upperSite.Point,
// frontElement.Edge.lowerSite.Point)));
// foreach (var t in cdtTriangles) {
// for (int i = 0; i < 3; i++) {
// var e = t.Edges[i];
// ls.Add(GetDebugCurveOfCdtEdge(e));
// }
// }
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// }
//
// static DebugCurve GetDebugCurveOfCdtEdge(CdtEdge e) {
// if(e.CcwTriangle==null || e.CwTriangle==null)
// return new DebugCurve(255, 4, e.Constrained ? "brown" : "blue", new LineSegment(e.upperSite.Point, e.lowerSite.Point));
// return new DebugCurve(100, e.Constrained?0.002:0.001, e.Constrained?"pink":"navy", new LineSegment(e.upperSite.Point, e.lowerSite.Point));
// }
// #endif
// int count;
// bool db { get { return count == 147; } }
void PointEvent(CdtSite pi) {
@ -277,46 +277,46 @@ namespace Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation {
TriangulateEmptySpaceToTheLeft(piNode);
}
#if DEBUG && TEST_MSAGL
void TestTriangles() {
var usedSites = new Set<CdtSite>();
foreach(var t in Triangles)
usedSites.InsertRange(t.Sites);
foreach (var triangle in Triangles) {
TestTriangle(triangle, usedSites);
}
}
void TestTriangle(CdtTriangle triangle, Set<CdtSite> usedSites) {
var tsites=triangle.Sites;
foreach (var site in usedSites) {
if (!tsites.Contains(site)) {
if (!SeparatedByConstrainedEdge(triangle, site) && InCircle(site, tsites[0], tsites[1], tsites[2])) {
List<ICurve> redCurves=new List<ICurve>();
redCurves.Add(new Ellipse(2, 2, site.Point));
List<ICurve> blueCurves = new List<ICurve>();
blueCurves.Add(Circumcircle(tsites[0].Point,tsites[1].Point,tsites[2].Point));
ShowFront(Triangles, front, redCurves, blueCurves);
}
}
}
}
static bool SeparatedByConstrainedEdge(CdtTriangle triangle, CdtSite site) {
for (int i = 0; i < 3; i++)
if (SeparatedByEdge(triangle, i, site))
return true;
return false;
}
static bool SeparatedByEdge(CdtTriangle triangle, int i, CdtSite site) {
var e = triangle.Edges[i];
var s = triangle.Sites[i+2];
var a0 = ApproximateComparer.Sign(Point.SignedDoubledTriangleArea(s.Point, e.upperSite.Point, e.lowerSite.Point));
var a1 = ApproximateComparer.Sign(Point.SignedDoubledTriangleArea(site.Point, e.upperSite.Point, e.lowerSite.Point));
return a0 * a1 <= 0;
}
#endif
// #if DEBUG && TEST_MSAGL
// void TestTriangles() {
// var usedSites = new Set<CdtSite>();
// foreach(var t in Triangles)
// usedSites.InsertRange(t.Sites);
// foreach (var triangle in Triangles) {
// TestTriangle(triangle, usedSites);
// }
// }
//
// void TestTriangle(CdtTriangle triangle, Set<CdtSite> usedSites) {
// var tsites=triangle.Sites;
// foreach (var site in usedSites) {
// if (!tsites.Contains(site)) {
// if (!SeparatedByConstrainedEdge(triangle, site) && InCircle(site, tsites[0], tsites[1], tsites[2])) {
// List<ICurve> redCurves=new List<ICurve>();
// redCurves.Add(new Ellipse(2, 2, site.Point));
// List<ICurve> blueCurves = new List<ICurve>();
// blueCurves.Add(Circumcircle(tsites[0].Point,tsites[1].Point,tsites[2].Point));
// ShowFront(Triangles, front, redCurves, blueCurves);
// }
// }
// }
// }
//
// static bool SeparatedByConstrainedEdge(CdtTriangle triangle, CdtSite site) {
// for (int i = 0; i < 3; i++)
// if (SeparatedByEdge(triangle, i, site))
// return true;
// return false;
// }
//
// static bool SeparatedByEdge(CdtTriangle triangle, int i, CdtSite site) {
// var e = triangle.Edges[i];
// var s = triangle.Sites[i+2];
// var a0 = ApproximateComparer.Sign(Point.SignedDoubledTriangleArea(s.Point, e.upperSite.Point, e.lowerSite.Point));
// var a1 = ApproximateComparer.Sign(Point.SignedDoubledTriangleArea(site.Point, e.upperSite.Point, e.lowerSite.Point));
// return a0 * a1 <= 0;
// }
// #endif
CdtSite LeftCase(CdtSite pi, RBNode<CdtFrontElement> hittedFrontElementNode, out CdtSite rightSite) {
//left case
// if(db)ShowFrontWithSite(pi, new LineSegment(pi.Point, hittedFrontElementNode.Item.Edge.upperSite.Point), new LineSegment(pi.Point, hittedFrontElementNode.Item.Edge.lowerSite.Point));
@ -559,28 +559,28 @@ namespace Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation {
}
}
#if DEBUG && TEST_MSAGL
List<DebugCurve> ShowIllegalEdge(CdtEdge edge, CdtSite pi, int i) {
List<DebugCurve> ls = new List<DebugCurve>();
ls.Add(new DebugCurve(new Ellipse(2, 2, pi.Point)));
for (int j = 0; j < 3; j++) {
var ee = edge.CcwTriangle.Edges[j];
ls.Add(new DebugCurve(j == i ? "red" : "blue", new LineSegment(ee.upperSite.Point, ee.lowerSite.Point)));
}
ls.Add(new DebugCurve(100,1, "black", Circumcircle(edge.CcwTriangle.Sites[0].Point,edge.CcwTriangle.Sites[1].Point,edge.CcwTriangle.Sites[2].Point)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
return ls;
}
static Ellipse Circumcircle(Point a, Point b, Point c) {
var mab = 0.5 * (a + b);
var mbc = 0.5 * (c + b);
Point center;
Point.LineLineIntersection(mab, mab + (b - a).Rotate(Math.PI / 2), mbc, mbc + (b - c).Rotate(Math.PI / 2), out center);
var r = (center - a).Length;
return new Ellipse(r,r, center);
}
#endif
// #if DEBUG && TEST_MSAGL
// List<DebugCurve> ShowIllegalEdge(CdtEdge edge, CdtSite pi, int i) {
// List<DebugCurve> ls = new List<DebugCurve>();
// ls.Add(new DebugCurve(new Ellipse(2, 2, pi.Point)));
// for (int j = 0; j < 3; j++) {
// var ee = edge.CcwTriangle.Edges[j];
// ls.Add(new DebugCurve(j == i ? "red" : "blue", new LineSegment(ee.upperSite.Point, ee.lowerSite.Point)));
// }
// ls.Add(new DebugCurve(100,1, "black", Circumcircle(edge.CcwTriangle.Sites[0].Point,edge.CcwTriangle.Sites[1].Point,edge.CcwTriangle.Sites[2].Point)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// return ls;
// }
//
// static Ellipse Circumcircle(Point a, Point b, Point c) {
// var mab = 0.5 * (a + b);
// var mbc = 0.5 * (c + b);
// Point center;
// Point.LineLineIntersection(mab, mab + (b - a).Rotate(Math.PI / 2), mbc, mbc + (b - c).Rotate(Math.PI / 2), out center);
// var r = (center - a).Length;
// return new Ellipse(r,r, center);
// }
// #endif
void LegalizeEdgeForOtherCwTriangle(CdtSite pi, CdtEdge edge) {
var i=edge.CwTriangle.Edges.Index(edge);
@ -606,17 +606,17 @@ namespace Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation {
LegalizeEdge(pi, e.CcwTriangle.OppositeEdge(pi));
}
}
#if DEBUG && TEST_MSAGL
void ShowIllegalEdge(CdtEdge edge, int i, CdtSite pi) {
List<DebugCurve> ls=new List<DebugCurve>();
ls.Add(new DebugCurve(new Ellipse(2, 2, pi.Point)));
for(int j=0;j<3;j++) {
var ee=edge.CwTriangle.Edges[j];
ls.Add(new DebugCurve(j==i?"red":"blue", new LineSegment(ee.upperSite.Point,ee.lowerSite.Point)));
}
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
}
#endif
// #if DEBUG && TEST_MSAGL
// void ShowIllegalEdge(CdtEdge edge, int i, CdtSite pi) {
// List<DebugCurve> ls=new List<DebugCurve>();
// ls.Add(new DebugCurve(new Ellipse(2, 2, pi.Point)));
// for(int j=0;j<3;j++) {
// var ee=edge.CwTriangle.Edges[j];
// ls.Add(new DebugCurve(j==i?"red":"blue", new LineSegment(ee.upperSite.Point,ee.lowerSite.Point)));
// }
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// }
// #endif
static bool IsIllegal(CdtSite pi, CdtSite a, CdtSite b, CdtSite c) {
return InCone(pi, a, b, c) && InCircle(pi, a, b, c);
}
@ -764,23 +764,23 @@ namespace Microsoft.Msagl.Routing.ConstrainedDelaunayTriangulation {
edge.upperSite.Edges.Remove(edge); //forget the edge
return newEdge;
}
#if DEBUG && TEST_MSAGL
static void ShowFlip(CdtSite pi, CdtTriangle t, CdtTriangle ot) {
List<DebugCurve> ls=new List<DebugCurve>();
ls.Add(new DebugCurve(new Ellipse(2,2, pi.Point)));
for(int i=0;i<3;i++) {
var e=t.Edges[i];
ls.Add(new DebugCurve(100, 1, "red", new LineSegment(e.upperSite.Point,e.lowerSite.Point)));
}
for (int i = 0; i < 3; i++)
{
var e = ot.Edges[i];
ls.Add(new DebugCurve(100, 1, "blue", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
}
ls.Add(new DebugCurve(Circumcircle(t.Sites[0].Point, t.Sites[1].Point, t.Sites[2].Point)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
}
#endif
// #if DEBUG && TEST_MSAGL
// static void ShowFlip(CdtSite pi, CdtTriangle t, CdtTriangle ot) {
// List<DebugCurve> ls=new List<DebugCurve>();
// ls.Add(new DebugCurve(new Ellipse(2,2, pi.Point)));
// for(int i=0;i<3;i++) {
// var e=t.Edges[i];
// ls.Add(new DebugCurve(100, 1, "red", new LineSegment(e.upperSite.Point,e.lowerSite.Point)));
// }
// for (int i = 0; i < 3; i++)
// {
// var e = ot.Edges[i];
// ls.Add(new DebugCurve(100, 1, "blue", new LineSegment(e.upperSite.Point, e.lowerSite.Point)));
// }
// ls.Add(new DebugCurve(Circumcircle(t.Sites[0].Point, t.Sites[1].Point, t.Sites[2].Point)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// }
// #endif
static bool CheckTriangle(CdtTriangle t) {
if (Point.GetTriangleOrientationWithNoEpsilon(t.Sites[0].Point, t.Sites[1].Point, t.Sites[2].Point) != TriangleOrientation.Counterclockwise) {

View file

@ -566,45 +566,45 @@ namespace Microsoft.Msagl.Routing {
relaxedPoint.PolylinePoint.Point = relaxedPoint.OriginalPosition + v;
}
#if TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// ReSharper disable UnusedMember.Local
internal void ShowPolylineAndObstacles(params ICurve[] curves)
{
// ReSharper restore UnusedMember.Local
IEnumerable<DebugCurve> ls = GetDebugCurves(curves);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
IEnumerable<DebugCurve> GetDebugCurves(params ICurve[] curves)
{
var ls = CreateListWithObstaclesAndPolyline(curves);
//ls.AddRange(this.VisibilityGraph.Edges.Select(e => new DebugCurve(100,0.1, e is TollFreeVisibilityEdge?"red":"green", new LineSegment(e.SourcePoint, e.TargetPoint))));
if (_sourceVisibilityVertex != null)
ls.Add(new DebugCurve("red", CurveFactory.CreateDiamond(4, 4, _sourceVisibilityVertex.Point)));
if (targetVisibilityVertex != null)
ls.Add(new DebugCurve("purple", new Ellipse(4, 4, targetVisibilityVertex.Point)));
var anywerePort=targetPort as HookUpAnywhereFromInsidePort;
if (anywerePort != null)
ls.Add(new DebugCurve("purple", anywerePort.LoosePolyline));
return ls;
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
List<DebugCurve> CreateListWithObstaclesAndPolyline(params ICurve[] curves)
{
var ls = new List<DebugCurve>(ObstacleCalculator.RootOfLooseHierarchy.GetAllLeaves().Select(e => new DebugCurve(100,0.01, "green", e)));
ls.AddRange(curves.Select(c=>new DebugCurve(100,0.01,"red", c)));
ls.AddRange(ObstacleCalculator.RootOfTightHierarchy.GetAllLeaves().Select(e => new DebugCurve(100, 0.01, "blue", e)));
// ls.AddRange(visibilityGraph.Edges.Select(e => (ICurve) new LineSegment(e.SourcePoint, e.TargetPoint)));
if (_polyline != null)
ls.Add(new DebugCurve(100, 0.03, "blue",_polyline));
return ls;
}
#endif
// #if TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// // ReSharper disable UnusedMember.Local
// internal void ShowPolylineAndObstacles(params ICurve[] curves)
// {
// // ReSharper restore UnusedMember.Local
// IEnumerable<DebugCurve> ls = GetDebugCurves(curves);
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ls);
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// IEnumerable<DebugCurve> GetDebugCurves(params ICurve[] curves)
// {
// var ls = CreateListWithObstaclesAndPolyline(curves);
// //ls.AddRange(this.VisibilityGraph.Edges.Select(e => new DebugCurve(100,0.1, e is TollFreeVisibilityEdge?"red":"green", new LineSegment(e.SourcePoint, e.TargetPoint))));
// if (_sourceVisibilityVertex != null)
// ls.Add(new DebugCurve("red", CurveFactory.CreateDiamond(4, 4, _sourceVisibilityVertex.Point)));
// if (targetVisibilityVertex != null)
// ls.Add(new DebugCurve("purple", new Ellipse(4, 4, targetVisibilityVertex.Point)));
// var anywerePort=targetPort as HookUpAnywhereFromInsidePort;
// if (anywerePort != null)
// ls.Add(new DebugCurve("purple", anywerePort.LoosePolyline));
// return ls;
// }
//
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// List<DebugCurve> CreateListWithObstaclesAndPolyline(params ICurve[] curves)
// {
// var ls = new List<DebugCurve>(ObstacleCalculator.RootOfLooseHierarchy.GetAllLeaves().Select(e => new DebugCurve(100,0.01, "green", e)));
// ls.AddRange(curves.Select(c=>new DebugCurve(100,0.01,"red", c)));
// ls.AddRange(ObstacleCalculator.RootOfTightHierarchy.GetAllLeaves().Select(e => new DebugCurve(100, 0.01, "blue", e)));
//
// // ls.AddRange(visibilityGraph.Edges.Select(e => (ICurve) new LineSegment(e.SourcePoint, e.TargetPoint)));
// if (_polyline != null)
// ls.Add(new DebugCurve(100, 0.03, "blue",_polyline));
// return ls;
// }
// #endif
/// <summary>
/// smoothing the corners of the polyline
@ -795,25 +795,25 @@ namespace Microsoft.Msagl.Routing {
return RemoveCollinearVertices(ret);
}
#if TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void ShowIsPassable(VisibilityVertex sourceVisVertex, VisibilityVertex targetVisVertex)
{
var dd = new List<DebugCurve>(
visibilityGraph.Edges.Select(
e =>
new DebugCurve(100, 0.5, e.IsPassable == null || e.IsPassable() ? "green" : "red",
new LineSegment(e.SourcePoint, e.TargetPoint))));
if(sourceVisVertex!=null)
dd.Add(new DebugCurve(CurveFactory.CreateDiamond(3, 3, sourceVisVertex.Point)));
if(targetVisVertex!=null)
dd.Add(new DebugCurve(CurveFactory.CreateEllipse(3, 3, targetVisVertex.Point)));
if (Obstacles != null)
dd.AddRange(Obstacles.Select(o => new DebugCurve(o)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
}
#endif
// #if TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private void ShowIsPassable(VisibilityVertex sourceVisVertex, VisibilityVertex targetVisVertex)
// {
// var dd = new List<DebugCurve>(
// visibilityGraph.Edges.Select(
// e =>
// new DebugCurve(100, 0.5, e.IsPassable == null || e.IsPassable() ? "green" : "red",
// new LineSegment(e.SourcePoint, e.TargetPoint))));
// if(sourceVisVertex!=null)
// dd.Add(new DebugCurve(CurveFactory.CreateDiamond(3, 3, sourceVisVertex.Point)));
// if(targetVisVertex!=null)
// dd.Add(new DebugCurve(CurveFactory.CreateEllipse(3, 3, targetVisVertex.Point)));
//
// if (Obstacles != null)
// dd.AddRange(Obstacles.Select(o => new DebugCurve(o)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
// }
// #endif
void CleanTheGraphForShortestPath() {
visibilityGraph.ClearPrevEdgesTable();

View file

@ -133,34 +133,34 @@ namespace Microsoft.Msagl.Routing.Rectilinear.Nudging {
rightEdge.TargetPoint.X < leftEdge.SourcePoint.X - ApproximateComparer.DistanceEpsilon);
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void DebShowEdge(AxisEdge edge, Point point){
// ReSharper restore UnusedMember.Local
// if (InterestingEdge(edge))
ShowEdge(edge,point);
}
// ReSharper disable SuggestBaseTypeForParameter
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowEdge(AxisEdge edge, Point point){
// ReSharper restore SuggestBaseTypeForParameter
var dd = GetObstacleBoundaries("black");
var seg = new DebugCurve( 1, "red", new LineSegment(edge.Source.Point, edge.Target.Point));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(
new[]{seg ,new DebugCurve("blue",CurveFactory.CreateEllipse(3, 3, point))}));
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
IEnumerable<DebugCurve> GetObstacleBoundaries(string color){
return Obstacles.Select(p => new DebugCurve(1, color, p));
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void DebShowEdge(AxisEdge edge, Point point){
// // ReSharper restore UnusedMember.Local
// // if (InterestingEdge(edge))
// ShowEdge(edge,point);
// }
//
//
// // ReSharper disable SuggestBaseTypeForParameter
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowEdge(AxisEdge edge, Point point){
// // ReSharper restore SuggestBaseTypeForParameter
//
// var dd = GetObstacleBoundaries("black");
// var seg = new DebugCurve( 1, "red", new LineSegment(edge.Source.Point, edge.Target.Point));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(
// new[]{seg ,new DebugCurve("blue",CurveFactory.CreateEllipse(3, 3, point))}));
//
//
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// IEnumerable<DebugCurve> GetObstacleBoundaries(string color){
// return Obstacles.Select(p => new DebugCurve(1, color, p));
// }
// #endif
/// <summary>
@ -209,118 +209,118 @@ namespace Microsoft.Msagl.Routing.Rectilinear.Nudging {
PointToTheRightOfLineOrOnLineLocal(point, side.Start, side.End));
}
#region debug
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowPointAndEdge(Point point, AxisEdge edge) {
// ReSharper restore UnusedMember.Local
List<ICurve> curves = GetCurves(point, edge);
LayoutAlgorithmSettings.Show(curves.ToArray());
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowPointAndEdgeWithSweepline(Point point, AxisEdge edge) {
// ReSharper restore UnusedMember.Local
List<ICurve> curves = GetCurves(point, edge);
curves.Add(new LineSegment(SweepDirection * Z + 10 * DirectionPerp, SweepDirection * Z - 10 * DirectionPerp));
LayoutAlgorithmSettings.Show(curves.ToArray());
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
List<ICurve> GetCurves(Point point, AxisEdge edge) {
var ellipse = CurveFactory.CreateEllipse(3, 3, point);
var curves = new List<ICurve>(Obstacles.Select(o => o as ICurve)){ellipse,
new LineSegment(edge.Source.Point, edge.Target.Point
)};
if (edge.RightBound < double.PositiveInfinity) {
double rightOffset = edge.RightBound;
var del = DirectionPerp * rightOffset;
curves.Add(new LineSegment(edge.Source.Point + del, edge.Target.Point + del));
}
if (edge.LeftBound > double.NegativeInfinity) {
double leftOffset = edge.LeftBound;
var del = DirectionPerp * leftOffset;
curves.Add(new LineSegment(edge.Source.Point + del, edge.Target.Point + del));
}
curves.AddRange((from e in PathOrders.Keys
let a = e.SourcePoint
let b = e.TargetPoint
select new CubicBezierSegment(a, a*0.8 + b*0.2, a*0.2 + b*0.8, b)).Cast<ICurve>());
return curves;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
List<DebugCurve> GetCurvesTest(Point point){
var ellipse = CurveFactory.CreateEllipse(3, 3, point);
var curves = new List<DebugCurve>(Obstacles.Select(o => new DebugCurve(100, 1, "black", o)))
{new DebugCurve(100, 1, "red", ellipse)};
curves.AddRange(from e in edgeContainersTree
from axisEdge in e
let a = axisEdge.Source.Point
let b = axisEdge.Target.Point
select new DebugCurve(100, 1, "green", new LineSegment(a, b)));
curves.AddRange(RightNeighborsCurvesTest(edgeContainersTree));
return curves;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> RightNeighborsCurvesTest(IEnumerable<AxisEdgesContainer> rbTree) {
foreach (var container in rbTree) {
foreach (var edge in container) {
foreach (var rn in edge.RightNeighbors) {
yield return new DebugCurve(100,1,"brown",new LineSegment(EdgeMidPoint(edge), EdgeMidPoint(rn)));
}
}
}
}
static Point EdgeMidPoint(AxisEdge edge) {
return 0.5*(edge.SourcePoint + edge.TargetPoint);
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowAxisEdges() {
// ReSharper restore UnusedMember.Local
var dd = new List<DebugCurve>(GetObstacleBoundaries("black"));
int i = 0;
foreach (var axisEdge in AxisEdges) {
var color = DebugCurve.Colors[i];
dd.Add(new DebugCurve(200, 1, color,
new LineSegment(axisEdge.Source.Point, axisEdge.Target.Point)));
Point perp = axisEdge.Direction == Directions.East ? new Point(0, 1) : new Point(-1, 0);
if (axisEdge.LeftBound != double.NegativeInfinity) {
dd.Add(new DebugCurve(200, 0.5, color,
new LineSegment(axisEdge.Source.Point + axisEdge.LeftBound * perp, axisEdge.Target.Point + axisEdge.LeftBound * perp)));
}
if (axisEdge.RightBound != double.PositiveInfinity) {
dd.Add(new DebugCurve(200, 0.5, color,
new LineSegment(axisEdge.Source.Point - axisEdge.RightBound * perp, axisEdge.Target.Point - axisEdge.RightBound * perp)));
}
i = (i + 1) % DebugCurve.Colors.Length;
}
DebugCurveCollection.WriteToFile(dd, "c:/tmp/ae");
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowAtPoint(Point point) {
// ReSharper restore UnusedMember.Local
var curves = GetCurvesTest(point);
LayoutAlgorithmSettings.ShowDebugCurves(curves.ToArray());
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowPointAndEdge(Point point, AxisEdge edge) {
// // ReSharper restore UnusedMember.Local
// List<ICurve> curves = GetCurves(point, edge);
//
// LayoutAlgorithmSettings.Show(curves.ToArray());
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowPointAndEdgeWithSweepline(Point point, AxisEdge edge) {
// // ReSharper restore UnusedMember.Local
// List<ICurve> curves = GetCurves(point, edge);
//
// curves.Add(new LineSegment(SweepDirection * Z + 10 * DirectionPerp, SweepDirection * Z - 10 * DirectionPerp));
//
// LayoutAlgorithmSettings.Show(curves.ToArray());
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// List<ICurve> GetCurves(Point point, AxisEdge edge) {
// var ellipse = CurveFactory.CreateEllipse(3, 3, point);
// var curves = new List<ICurve>(Obstacles.Select(o => o as ICurve)){ellipse,
// new LineSegment(edge.Source.Point, edge.Target.Point
// )};
//
// if (edge.RightBound < double.PositiveInfinity) {
// double rightOffset = edge.RightBound;
// var del = DirectionPerp * rightOffset;
// curves.Add(new LineSegment(edge.Source.Point + del, edge.Target.Point + del));
// }
// if (edge.LeftBound > double.NegativeInfinity) {
// double leftOffset = edge.LeftBound;
// var del = DirectionPerp * leftOffset;
// curves.Add(new LineSegment(edge.Source.Point + del, edge.Target.Point + del));
// }
//
// curves.AddRange((from e in PathOrders.Keys
// let a = e.SourcePoint
// let b = e.TargetPoint
// select new CubicBezierSegment(a, a*0.8 + b*0.2, a*0.2 + b*0.8, b)).Cast<ICurve>());
//
// return curves;
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// List<DebugCurve> GetCurvesTest(Point point){
// var ellipse = CurveFactory.CreateEllipse(3, 3, point);
// var curves = new List<DebugCurve>(Obstacles.Select(o => new DebugCurve(100, 1, "black", o)))
// {new DebugCurve(100, 1, "red", ellipse)};
// curves.AddRange(from e in edgeContainersTree
// from axisEdge in e
// let a = axisEdge.Source.Point
// let b = axisEdge.Target.Point
// select new DebugCurve(100, 1, "green", new LineSegment(a, b)));
//
//
// curves.AddRange(RightNeighborsCurvesTest(edgeContainersTree));
//
// return curves;
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> RightNeighborsCurvesTest(IEnumerable<AxisEdgesContainer> rbTree) {
// foreach (var container in rbTree) {
// foreach (var edge in container) {
// foreach (var rn in edge.RightNeighbors) {
// yield return new DebugCurve(100,1,"brown",new LineSegment(EdgeMidPoint(edge), EdgeMidPoint(rn)));
// }
// }
// }
// }
//
// static Point EdgeMidPoint(AxisEdge edge) {
// return 0.5*(edge.SourcePoint + edge.TargetPoint);
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowAxisEdges() {
// // ReSharper restore UnusedMember.Local
// var dd = new List<DebugCurve>(GetObstacleBoundaries("black"));
// int i = 0;
// foreach (var axisEdge in AxisEdges) {
// var color = DebugCurve.Colors[i];
// dd.Add(new DebugCurve(200, 1, color,
// new LineSegment(axisEdge.Source.Point, axisEdge.Target.Point)));
// Point perp = axisEdge.Direction == Directions.East ? new Point(0, 1) : new Point(-1, 0);
// if (axisEdge.LeftBound != double.NegativeInfinity) {
// dd.Add(new DebugCurve(200, 0.5, color,
// new LineSegment(axisEdge.Source.Point + axisEdge.LeftBound * perp, axisEdge.Target.Point + axisEdge.LeftBound * perp)));
// }
// if (axisEdge.RightBound != double.PositiveInfinity) {
// dd.Add(new DebugCurve(200, 0.5, color,
// new LineSegment(axisEdge.Source.Point - axisEdge.RightBound * perp, axisEdge.Target.Point - axisEdge.RightBound * perp)));
// }
// i = (i + 1) % DebugCurve.Colors.Length;
// }
// DebugCurveCollection.WriteToFile(dd, "c:/tmp/ae");
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowAtPoint(Point point) {
// // ReSharper restore UnusedMember.Local
// var curves = GetCurvesTest(point);
// LayoutAlgorithmSettings.ShowDebugCurves(curves.ToArray());
// }
// #endif
#endregion
RBNode<AxisEdgesContainer> GetOrCreateAxisEdgesContainer(AxisEdge edge) {
var source = edge.Source.Point;

View file

@ -289,224 +289,224 @@ namespace Microsoft.Msagl.Routing.Rectilinear.Nudging {
}
#region debug
#if TEST_MSAGL
internal static void ShowPathsFromPoints(IEnumerable<Path> paths, IEnumerable<Polyline> enumerable) {
var dd = new List<DebugCurve>();
if (enumerable != null)
dd.AddRange(GetObstacleBoundaries(enumerable, "grey"));
int i = 0;
foreach (var p in paths)
dd.AddRange(PathDebugCurvesFromPoints(p, DebugCurve.Colors[Math.Min(DebugCurve.Colors.Length, i++)]));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
}
static IEnumerable<DebugCurve> PathDebugCurvesFromPoints(Path path, string color) {
const double startWidth = 0.01;
const double endWidth = 3;
var pts = path.PathPoints.ToArray();
double delta = (endWidth - startWidth) / (pts.Length - 1);
for (int i = 0; i < pts.Length - 1; i++)
yield return new DebugCurve(startWidth + delta * i, color, new LineSegment(pts[i], pts[i + 1]));
}
internal static void ShowParamPaths( Point s, Point e, params Path[] paths ) {
ShowOrderedPaths(null,paths,s,e);
}
// ReSharper disable UnusedMember.Local
internal static void ShowOrderedPaths(IEnumerable<Polyline> obstacles, IEnumerable<Path> paths, Point s, Point e) {
// ReSharper restore UnusedMember.Local
string[] colors = { "red", "green", "blue", "violet", "rose", "black" };
const double startWidth = 0.001;
const double endWidth = 0.1;
var dd = new List<DebugCurve>();
if (obstacles != null)
dd.AddRange(GetObstacleBoundaries(obstacles, "grey"));
int i = 0;
foreach (var path in paths)
dd.AddRange(GetTestPathAsDebugCurve(startWidth, endWidth, colors[Math.Min(colors.Length - 1, i++)], path));
var ell = new DebugCurve(1, "black", new Ellipse(0.01, 0.01, s));
dd.Add(ell);
dd.Add(new DebugCurve(1, "black", new Ellipse(0.02, 0.02, e)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(GetObstacleBoundaries(obstacles, "lightblue")));
}
static IEnumerable<DebugCurve> GetTestPathAsDebugCurve(double startWidth, double endWidth, string color, Path path) {
if (path.PathEdges.Count() > 0) {
int count = path.PathEdges.Count();
double deltaW = count > 1 ? (endWidth - startWidth)/(count - 1) : 1;
//if count ==1 the value of deltaW does not matter
int i = 0;
foreach (var e in path.PathEdges)
yield return
new DebugCurve(150, startWidth + deltaW*(i++), color, new LineSegment(e.Source, e.Target));
}else {
int count = path.PathPoints.Count();
var pts = path.PathPoints.ToArray();
var deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1;
//if count ==1 the value of deltaW does not matter
for (int i = 0; i < count - 1;i++ )
yield return new DebugCurve(150, startWidth+deltaW*i, color, new LineSegment(pts[i], pts[i+1]));
}
}
internal static IEnumerable<DebugCurve> GetTestEdgePathAsDebugCurves(double startWidth, double endWidth, string color, Path path) {
int count = path.PathPoints.Count();
double deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1; //if count ==1 the value of deltaW does not matter
var points = path.PathPoints.ToArray();
for (int i = 0; i < points.Length - 1; i++)
yield return new DebugCurve(125, startWidth + deltaW * i, color, new LineSegment(points[i], points[i + 1]));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> GetEdgePathFromPathEdgesAsDebugCurves(double startWidth, double endWidth, string color, Path path) {
var points = path.PathPoints.ToArray();
int count = points.Length;
double deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1; //if count ==1 the value of deltaW does not matter
for (int i = 0; i < points.Length - 1; i++)
yield return new DebugCurve(120, startWidth + deltaW * i, color, new LineSegment(points[i], points[i + 1]));
}
// ReSharper disable UnusedMember.Local
static internal void ShowEdgePaths(IEnumerable<Polyline> obstacles, IEnumerable<Path> edgePaths) {
// ReSharper restore UnusedMember.Local
List<DebugCurve> debCurves = GetDebCurvesOfPaths(obstacles, edgePaths);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
}
internal static List<DebugCurve> GetDebCurvesOfPaths(IEnumerable<Polyline> enumerable, IEnumerable<Path> edgePaths) {
var debCurves = GetObstacleBoundaries(enumerable, "black");
int i = 0;
foreach (var edgePath in edgePaths)
debCurves.AddRange(GetTestEdgePathAsDebugCurves(0.2, 4, DebugCurve.Colors[(i++) % DebugCurve.Colors.Length], edgePath));
return debCurves;
}
internal static void ShowPathsInLoop(IEnumerable<Polyline> enumerable, IEnumerable<Path> edgePaths, Point point) {
foreach (var edgePath in edgePaths.Where(path=>(path.PathPoints.First()-point).Length<1 ||(path.PathPoints.Last()-point).Length<1 )) {
var debCurves = GetObstacleBoundaries(enumerable, "black");
debCurves.AddRange(GetTestEdgePathAsDebugCurves(0.1, 4, "red", edgePath));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
}
}
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowLongSegsWithIdealPositions(Directions dir) {
// ReSharper restore UnusedMember.Local
var debCurves = GetObstacleBoundaries(Obstacles, "black");
int i = 0;
debCurves.AddRange(LongestNudgedSegs.Select(ls => DebugCurveOfLongSeg(ls, DebugCurve.Colors[i++ % DebugCurve.Colors.Length], dir)));
DebugCurveCollection.WriteToFile(debCurves, "c:/tmp/longSegs");
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
}
static DebugCurve DebugCurveOfLongSeg(LongestNudgedSegment ls, string s, Directions dir) {
return new DebugCurve(1, s, LineSegOfLongestSeg(ls, dir));
}
static ICurve LineSegOfLongestSeg(LongestNudgedSegment ls, Directions dir) {
var projectionToDir = dir == Directions.East ? (PointProjection)(p => p.X) : (p => p.Y);
var min = Double.PositiveInfinity;
var max = Double.NegativeInfinity;
foreach (var edge in ls.Edges) {
UpdateMinMaxWithPoint(ref min, ref max, projectionToDir, edge.Source);
UpdateMinMaxWithPoint(ref min, ref max, projectionToDir, edge.Target);
}
return dir == Directions.East
? new LineSegment(min, -ls.IdealPosition, max, -ls.IdealPosition)
: new LineSegment(ls.IdealPosition, min, ls.IdealPosition, max);
}
static void UpdateMinMaxWithPoint(ref double min, ref double max, PointProjection projectionToDir, Point point) {
double p = projectionToDir(point);
if (min > p)
min = p;
if (max < p)
max = p;
}
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowPathsDebug(IEnumerable<Path> edgePaths) {
var debCurves = GetObstacleBoundaries(Obstacles, "black");
int i = 0;
foreach (var edgePath in edgePaths)
debCurves.AddRange(GetEdgePathFromPathEdgesAsDebugCurves(0.01, 0.4, DebugCurve.Colors[(i++) % DebugCurve.Colors.Length], edgePath));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> PathDebugCurves(Path path, string color) {
var d = path.PathEdges.Select(e => new DebugCurve(70, 0.5, color, new LineSegment(e.Source, e.Target)));
return d.Concat(MarkPathVerts(path));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private static IEnumerable<DebugCurve> MarkPathVerts(Path path) {
bool first = true;
var p = new Point();
foreach (var p0 in path.PathPoints) {
if (first) {
yield return new DebugCurve(200, 1, "violet", CurveFactory.CreateDiamond(5, 5, p0));
first = false;
} else
yield return new DebugCurve(100, 0.5, "brown", CurveFactory.CreateEllipse(1.5, 1.5, p0));
p = p0;
}
yield return new DebugCurve(200, 1, "green", CurveFactory.CreateDiamond(3, 3, p));
}
static internal IEnumerable<DebugCurve> PathDebugCurvesFromPoint(Path path) {
var l = new List<Point>(path.PathPoints);
for (int i = 0; i < l.Count - 1; i++)
yield return new DebugCurve(4, "red", new LineSegment(l[i], l[i + 1]));
}
//
// ReSharper disable UnusedMember.Local
// void ShowEdgesOfEdgePath(Path path){
// ReSharper restore UnusedMember.Local
// string[] colors = {"red", "brown", "purple"};
// const double w0 = 1;
// const double w1 = 3;
// double dw = (w1 - w0)/path.OrientedSubpaths.Count;
// int i = 0;
// var dc = new List<DebugCurve>();
// foreach (var s in path.OrientedSubpaths){
// dc.AddRange(SubpathDebugCurves(w0 + dw*i, colors[Math.Min(i++, colors.Length - 1)], s));
// }
// LayoutAlgorithmSettings.ShowDebugCurves(dc.ToArray());
// }
//
// static IEnumerable<DebugCurve> SubpathDebugCurves(double w, string color, OrientedSubpath subpath){
// return subpath.LinkedPath.Select(e => new DebugCurve(w, color, new LineSegment(e.Source.Point, e.Target.Point)));
// }
static internal List<DebugCurve> GetObstacleBoundaries(IEnumerable<Polyline> obstacles, string color) {
var debugCurves = new List<DebugCurve>();
if (obstacles != null)
debugCurves.AddRange(obstacles.Select(poly => new DebugCurve(50, 0.3, color, poly)));
return debugCurves;
}
#endif
// #if TEST_MSAGL
// internal static void ShowPathsFromPoints(IEnumerable<Path> paths, IEnumerable<Polyline> enumerable) {
// var dd = new List<DebugCurve>();
// if (enumerable != null)
// dd.AddRange(GetObstacleBoundaries(enumerable, "grey"));
// int i = 0;
// foreach (var p in paths)
// dd.AddRange(PathDebugCurvesFromPoints(p, DebugCurve.Colors[Math.Min(DebugCurve.Colors.Length, i++)]));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
// }
//
// static IEnumerable<DebugCurve> PathDebugCurvesFromPoints(Path path, string color) {
// const double startWidth = 0.01;
// const double endWidth = 3;
//
// var pts = path.PathPoints.ToArray();
// double delta = (endWidth - startWidth) / (pts.Length - 1);
// for (int i = 0; i < pts.Length - 1; i++)
// yield return new DebugCurve(startWidth + delta * i, color, new LineSegment(pts[i], pts[i + 1]));
// }
//
// internal static void ShowParamPaths( Point s, Point e, params Path[] paths ) {
// ShowOrderedPaths(null,paths,s,e);
// }
//
// // ReSharper disable UnusedMember.Local
// internal static void ShowOrderedPaths(IEnumerable<Polyline> obstacles, IEnumerable<Path> paths, Point s, Point e) {
// // ReSharper restore UnusedMember.Local
// string[] colors = { "red", "green", "blue", "violet", "rose", "black" };
//
// const double startWidth = 0.001;
// const double endWidth = 0.1;
// var dd = new List<DebugCurve>();
// if (obstacles != null)
// dd.AddRange(GetObstacleBoundaries(obstacles, "grey"));
// int i = 0;
// foreach (var path in paths)
// dd.AddRange(GetTestPathAsDebugCurve(startWidth, endWidth, colors[Math.Min(colors.Length - 1, i++)], path));
//
// var ell = new DebugCurve(1, "black", new Ellipse(0.01, 0.01, s));
// dd.Add(ell);
// dd.Add(new DebugCurve(1, "black", new Ellipse(0.02, 0.02, e)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(GetObstacleBoundaries(obstacles, "lightblue")));
// }
//
// static IEnumerable<DebugCurve> GetTestPathAsDebugCurve(double startWidth, double endWidth, string color, Path path) {
// if (path.PathEdges.Count() > 0) {
// int count = path.PathEdges.Count();
//
// double deltaW = count > 1 ? (endWidth - startWidth)/(count - 1) : 1;
// //if count ==1 the value of deltaW does not matter
// int i = 0;
// foreach (var e in path.PathEdges)
// yield return
// new DebugCurve(150, startWidth + deltaW*(i++), color, new LineSegment(e.Source, e.Target));
// }else {
// int count = path.PathPoints.Count();
// var pts = path.PathPoints.ToArray();
//
// var deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1;
// //if count ==1 the value of deltaW does not matter
// for (int i = 0; i < count - 1;i++ )
// yield return new DebugCurve(150, startWidth+deltaW*i, color, new LineSegment(pts[i], pts[i+1]));
// }
// }
//
// internal static IEnumerable<DebugCurve> GetTestEdgePathAsDebugCurves(double startWidth, double endWidth, string color, Path path) {
// int count = path.PathPoints.Count();
//
// double deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1; //if count ==1 the value of deltaW does not matter
// var points = path.PathPoints.ToArray();
// for (int i = 0; i < points.Length - 1; i++)
// yield return new DebugCurve(125, startWidth + deltaW * i, color, new LineSegment(points[i], points[i + 1]));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> GetEdgePathFromPathEdgesAsDebugCurves(double startWidth, double endWidth, string color, Path path) {
// var points = path.PathPoints.ToArray();
//
// int count = points.Length;
//
// double deltaW = count > 1 ? (endWidth - startWidth) / (count - 1) : 1; //if count ==1 the value of deltaW does not matter
// for (int i = 0; i < points.Length - 1; i++)
// yield return new DebugCurve(120, startWidth + deltaW * i, color, new LineSegment(points[i], points[i + 1]));
// }
// // ReSharper disable UnusedMember.Local
//
// static internal void ShowEdgePaths(IEnumerable<Polyline> obstacles, IEnumerable<Path> edgePaths) {
// // ReSharper restore UnusedMember.Local
// List<DebugCurve> debCurves = GetDebCurvesOfPaths(obstacles, edgePaths);
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
// }
//
// internal static List<DebugCurve> GetDebCurvesOfPaths(IEnumerable<Polyline> enumerable, IEnumerable<Path> edgePaths) {
// var debCurves = GetObstacleBoundaries(enumerable, "black");
// int i = 0;
//
// foreach (var edgePath in edgePaths)
// debCurves.AddRange(GetTestEdgePathAsDebugCurves(0.2, 4, DebugCurve.Colors[(i++) % DebugCurve.Colors.Length], edgePath));
// return debCurves;
// }
//
// internal static void ShowPathsInLoop(IEnumerable<Polyline> enumerable, IEnumerable<Path> edgePaths, Point point) {
// foreach (var edgePath in edgePaths.Where(path=>(path.PathPoints.First()-point).Length<1 ||(path.PathPoints.Last()-point).Length<1 )) {
// var debCurves = GetObstacleBoundaries(enumerable, "black");
// debCurves.AddRange(GetTestEdgePathAsDebugCurves(0.1, 4, "red", edgePath));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
// }
// }
//
//
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowLongSegsWithIdealPositions(Directions dir) {
// // ReSharper restore UnusedMember.Local
// var debCurves = GetObstacleBoundaries(Obstacles, "black");
// int i = 0;
//
// debCurves.AddRange(LongestNudgedSegs.Select(ls => DebugCurveOfLongSeg(ls, DebugCurve.Colors[i++ % DebugCurve.Colors.Length], dir)));
//
// DebugCurveCollection.WriteToFile(debCurves, "c:/tmp/longSegs");
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
// }
//
// static DebugCurve DebugCurveOfLongSeg(LongestNudgedSegment ls, string s, Directions dir) {
// return new DebugCurve(1, s, LineSegOfLongestSeg(ls, dir));
// }
//
// static ICurve LineSegOfLongestSeg(LongestNudgedSegment ls, Directions dir) {
// var projectionToDir = dir == Directions.East ? (PointProjection)(p => p.X) : (p => p.Y);
// var min = Double.PositiveInfinity;
// var max = Double.NegativeInfinity;
// foreach (var edge in ls.Edges) {
// UpdateMinMaxWithPoint(ref min, ref max, projectionToDir, edge.Source);
// UpdateMinMaxWithPoint(ref min, ref max, projectionToDir, edge.Target);
// }
// return dir == Directions.East
// ? new LineSegment(min, -ls.IdealPosition, max, -ls.IdealPosition)
// : new LineSegment(ls.IdealPosition, min, ls.IdealPosition, max);
// }
//
// static void UpdateMinMaxWithPoint(ref double min, ref double max, PointProjection projectionToDir, Point point) {
// double p = projectionToDir(point);
// if (min > p)
// min = p;
// if (max < p)
// max = p;
// }
//
//
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowPathsDebug(IEnumerable<Path> edgePaths) {
// var debCurves = GetObstacleBoundaries(Obstacles, "black");
// int i = 0;
//
// foreach (var edgePath in edgePaths)
// debCurves.AddRange(GetEdgePathFromPathEdgesAsDebugCurves(0.01, 0.4, DebugCurve.Colors[(i++) % DebugCurve.Colors.Length], edgePath));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debCurves);
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> PathDebugCurves(Path path, string color) {
// var d = path.PathEdges.Select(e => new DebugCurve(70, 0.5, color, new LineSegment(e.Source, e.Target)));
// return d.Concat(MarkPathVerts(path));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private static IEnumerable<DebugCurve> MarkPathVerts(Path path) {
// bool first = true;
// var p = new Point();
// foreach (var p0 in path.PathPoints) {
// if (first) {
// yield return new DebugCurve(200, 1, "violet", CurveFactory.CreateDiamond(5, 5, p0));
// first = false;
// } else
// yield return new DebugCurve(100, 0.5, "brown", CurveFactory.CreateEllipse(1.5, 1.5, p0));
// p = p0;
// }
// yield return new DebugCurve(200, 1, "green", CurveFactory.CreateDiamond(3, 3, p));
// }
//
// static internal IEnumerable<DebugCurve> PathDebugCurvesFromPoint(Path path) {
// var l = new List<Point>(path.PathPoints);
// for (int i = 0; i < l.Count - 1; i++)
// yield return new DebugCurve(4, "red", new LineSegment(l[i], l[i + 1]));
// }
// //
// // ReSharper disable UnusedMember.Local
// // void ShowEdgesOfEdgePath(Path path){
// // ReSharper restore UnusedMember.Local
// // string[] colors = {"red", "brown", "purple"};
// // const double w0 = 1;
// // const double w1 = 3;
// // double dw = (w1 - w0)/path.OrientedSubpaths.Count;
// // int i = 0;
// // var dc = new List<DebugCurve>();
// // foreach (var s in path.OrientedSubpaths){
// // dc.AddRange(SubpathDebugCurves(w0 + dw*i, colors[Math.Min(i++, colors.Length - 1)], s));
// // }
// // LayoutAlgorithmSettings.ShowDebugCurves(dc.ToArray());
// // }
// //
// // static IEnumerable<DebugCurve> SubpathDebugCurves(double w, string color, OrientedSubpath subpath){
// // return subpath.LinkedPath.Select(e => new DebugCurve(w, color, new LineSegment(e.Source.Point, e.Target.Point)));
// // }
//
//
// static internal List<DebugCurve> GetObstacleBoundaries(IEnumerable<Polyline> obstacles, string color) {
// var debugCurves = new List<DebugCurve>();
// if (obstacles != null)
// debugCurves.AddRange(obstacles.Select(poly => new DebugCurve(50, 0.3, color, poly)));
// return debugCurves;
// }
// #endif
#endregion
void CreateConstraintsBetweenLongestSegments() {
@ -585,37 +585,37 @@ namespace Microsoft.Msagl.Routing.Rectilinear.Nudging {
return direction == Directions.North ? segment.Start.X : -segment.Start.Y;
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowSegmentBounds(LongestNudgedSegment segment) {
// ReSharper restore UnusedMember.Local
var dd = GetObstacleBoundaries(Obstacles, "black");
var segtop = segment.Edges.Max(e => Math.Max(e.Source.Y, e.Target.Y));
var segbottom = segment.Edges.Min(e => Math.Min(e.Source.Y, e.Target.Y));
var segx = segment.Start.X;
var seg = new DebugCurve(80, 1, "brown", new LineSegment(new Point(segx, segbottom), new Point(segx, segtop)));
var leftbound = new DebugCurve(80, 1.0, "red", new LineSegment(new Point(segment.GetLeftBound(), segbottom),
new Point(segment.GetLeftBound(), segtop)));
var rightbound = new DebugCurve(80, 1, "green", new LineSegment(new Point(segment.GetRightBound(), segbottom),
new Point(segment.GetRightBound(), segtop)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(new[] { seg, leftbound, rightbound }));
}
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowSegment(LongestNudgedSegment segment) {
// ReSharper restore UnusedMember.Local
var dd = GetObstacleBoundaries(Obstacles, "black");
var segtop = segment.Edges.Max(e => Math.Max(e.Source.Y, e.Target.Y));
var segbottom = segment.Edges.Min(e => Math.Min(e.Source.Y, e.Target.Y));
var segx = segment.Start.X;
var seg = new DebugCurve(80, 1, "brown", new LineSegment(new Point(segx, segbottom), new Point(segx, segtop)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(new[] { seg }));
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowSegmentBounds(LongestNudgedSegment segment) {
// // ReSharper restore UnusedMember.Local
// var dd = GetObstacleBoundaries(Obstacles, "black");
// var segtop = segment.Edges.Max(e => Math.Max(e.Source.Y, e.Target.Y));
// var segbottom = segment.Edges.Min(e => Math.Min(e.Source.Y, e.Target.Y));
// var segx = segment.Start.X;
// var seg = new DebugCurve(80, 1, "brown", new LineSegment(new Point(segx, segbottom), new Point(segx, segtop)));
//
// var leftbound = new DebugCurve(80, 1.0, "red", new LineSegment(new Point(segment.GetLeftBound(), segbottom),
// new Point(segment.GetLeftBound(), segtop)));
// var rightbound = new DebugCurve(80, 1, "green", new LineSegment(new Point(segment.GetRightBound(), segbottom),
// new Point(segment.GetRightBound(), segtop)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(new[] { seg, leftbound, rightbound }));
// }
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowSegment(LongestNudgedSegment segment) {
// // ReSharper restore UnusedMember.Local
// var dd = GetObstacleBoundaries(Obstacles, "black");
// var segtop = segment.Edges.Max(e => Math.Max(e.Source.Y, e.Target.Y));
// var segbottom = segment.Edges.Min(e => Math.Min(e.Source.Y, e.Target.Y));
// var segx = segment.Start.X;
// var seg = new DebugCurve(80, 1, "brown", new LineSegment(new Point(segx, segbottom), new Point(segx, segtop)));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd.Concat(new[] { seg }));
//
// }
// #endif
List<LongestNudgedSegment> LongestNudgedSegs { get; set; }

View file

@ -472,14 +472,14 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
}
}
#if TEST_MSAGL
private IEnumerable<DebugCurve> GetGraphDebugCurves() {
List<DebugCurve> l =
VisibilityGraph.Edges.Select(e => new DebugCurve(50, 0.1, "blue", new LineSegment(e.SourcePoint, e.TargetPoint))).ToList();
l.AddRange(Obstacles.Select(o => new DebugCurve(1, "green", o.BoundaryCurve)));
return l;
}
#endif
// #if TEST_MSAGL
// private IEnumerable<DebugCurve> GetGraphDebugCurves() {
// List<DebugCurve> l =
// VisibilityGraph.Edges.Select(e => new DebugCurve(50, 0.1, "blue", new LineSegment(e.SourcePoint, e.TargetPoint))).ToList();
// l.AddRange(Obstacles.Select(o => new DebugCurve(1, "green", o.BoundaryCurve)));
// return l;
// }
// #endif
private static Dictionary<EdgeGeometry, IEnumerable<Path>> SplitEdgeGeomsWithWaypoints(IEnumerable<EdgeGeometry> edgeGeometries) {
var ret = new Dictionary<EdgeGeometry, IEnumerable<Path>>();
@ -541,17 +541,17 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
this.PortManager.RemoveControlPointsFromGraph();
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void ShowEdgePath(Path path) {
// ReSharper restore UnusedMember.Local
List<DebugCurve> dd = Nudger.GetObstacleBoundaries(PaddedObstacles, "black");
dd.AddRange(Nudger.PathDebugCurvesFromPoint(path));
dd.AddRange(VisibilityGraph.Edges.Select(e => new DebugCurve(0.5, "blue", new LineSegment(e.SourcePoint, e.TargetPoint))));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private void ShowEdgePath(Path path) {
// // ReSharper restore UnusedMember.Local
// List<DebugCurve> dd = Nudger.GetObstacleBoundaries(PaddedObstacles, "black");
// dd.AddRange(Nudger.PathDebugCurvesFromPoint(path));
// dd.AddRange(VisibilityGraph.Edges.Select(e => new DebugCurve(0.5, "blue", new LineSegment(e.SourcePoint, e.TargetPoint))));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
// }
// #endif
internal virtual bool GeneratePath(MsmtRectilinearPath shortestPathRouter, Path edgePath, bool lastChance = false) {
var sourceVertices = PortManager.FindVertices(edgePath.EdgeGeometry.SourcePort);
@ -630,27 +630,27 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
}
}
#if TEST_MSAGL && !SILVERLIGHT
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)")]
internal static void ShowPointEnum(IEnumerable<Point> p) {
// ReSharper disable InconsistentNaming
const double w0 = 0.1;
const int w1 = 3;
Point[] arr = p.ToArray();
double d = (w1 - w0)/(arr.Length - 1);
var l = new List<DebugCurve>();
for (int i = 0; i < arr.Length - 1; i++) {
Console.WriteLine(arr[i]);
l.Add(new DebugCurve(100, w0 + i*d, "blue", new LineSegment(arr[i], arr[i + 1])));
}
Console.WriteLine(arr.Last());
Console.WriteLine("================");
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// ReSharper restore InconsistentNaming
}
#endif
// #if TEST_MSAGL && !SILVERLIGHT
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)")]
// internal static void ShowPointEnum(IEnumerable<Point> p) {
// // ReSharper disable InconsistentNaming
// const double w0 = 0.1;
// const int w1 = 3;
// Point[] arr = p.ToArray();
// double d = (w1 - w0)/(arr.Length - 1);
// var l = new List<DebugCurve>();
// for (int i = 0; i < arr.Length - 1; i++) {
// Console.WriteLine(arr[i]);
// l.Add(new DebugCurve(100, w0 + i*d, "blue", new LineSegment(arr[i], arr[i + 1])));
// }
// Console.WriteLine(arr.Last());
// Console.WriteLine("================");
//
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// // ReSharper restore InconsistentNaming
// }
// #endif
internal virtual void NudgePaths(IEnumerable<Path> edgePaths) {
@ -813,9 +813,9 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
internal void GenerateVisibilityGraph() {
if ((null == Obstacles) || !Obstacles.Any()) {
throw new InvalidOperationException(
#if TEST_MSAGL
"No obstacles have been set"
#endif
// #if TEST_MSAGL
// "No obstacles have been set"
// #endif
);
}
@ -826,30 +826,30 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
}
}
#if TEST_MSAGL
internal void ShowPathWithTakenEdgesAndGraph(IEnumerable<VisibilityVertex> path, Set<VisibilityEdge> takenEdges){
var list = new List<VisibilityVertex>(path);
var lines = new List<LineSegment>();
for (int i = 0; i < list.Count - 1; i++)
lines.Add(new LineSegment(list[i].Point, list[i + 1].Point));
// ReSharper disable InconsistentNaming
double w0 = 4;
const double w1 = 8;
double delta = (w1 - w0)/(list.Count - 1);
var dc = new List<DebugCurve>();
foreach (LineSegment line in lines) {
dc.Add(new DebugCurve(50, w0, "red", line));
w0 += delta;
}
dc.AddRange(takenEdges.Select(edge => new DebugCurve(50, 2, "black", new LineSegment(edge.SourcePoint, edge.TargetPoint))));
IEnumerable<DebugCurve> k = GetGraphDebugCurves();
dc.AddRange(k);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dc);
// ReSharper restore InconsistentNaming
}
#endif
// #if TEST_MSAGL
// internal void ShowPathWithTakenEdgesAndGraph(IEnumerable<VisibilityVertex> path, Set<VisibilityEdge> takenEdges){
// var list = new List<VisibilityVertex>(path);
// var lines = new List<LineSegment>();
// for (int i = 0; i < list.Count - 1; i++)
// lines.Add(new LineSegment(list[i].Point, list[i + 1].Point));
//
// // ReSharper disable InconsistentNaming
// double w0 = 4;
// const double w1 = 8;
// double delta = (w1 - w0)/(list.Count - 1);
//
// var dc = new List<DebugCurve>();
// foreach (LineSegment line in lines) {
// dc.Add(new DebugCurve(50, w0, "red", line));
// w0 += delta;
// }
// dc.AddRange(takenEdges.Select(edge => new DebugCurve(50, 2, "black", new LineSegment(edge.SourcePoint, edge.TargetPoint))));
// IEnumerable<DebugCurve> k = GetGraphDebugCurves();
// dc.AddRange(k);
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dc);
// // ReSharper restore InconsistentNaming
// }
// #endif
internal static ICurve FitArcsIntoCorners(double radius, Point[] polyline) {
IEnumerable<Ellipse> ellipses = GetFittedArcSegs(radius, polyline);

View file

@ -185,11 +185,11 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
[Conditional("DEBUG")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
void Assert(bool condition, string message) {
#if TEST_MSAGL
if (!condition) {
Test_DumpScanLine();
}
#endif // TEST
// #if TEST_MSAGL
// if (!condition) {
// Test_DumpScanLine();
// }
// #endif // TEST
Debug.Assert(condition, message);
}
@ -221,51 +221,51 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
#region DebugCurves
#if TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
internal void Test_DumpScanLine() {
DebugCurveCollection.WriteToFile(Test_GetScanLineDebugCurves(), StaticGraphUtility.GetDumpFileName("ScanLine"));
}
#endif // TEST
// #if TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
// internal void Test_DumpScanLine() {
// DebugCurveCollection.WriteToFile(Test_GetScanLineDebugCurves(), StaticGraphUtility.GetDumpFileName("ScanLine"));
// }
// #endif // TEST
#if TEST_MSAGL
internal List<DebugCurve> Test_GetScanLineDebugCurves() {
// ReSharper restore InconsistentNaming
var debugCurves = new List<DebugCurve>();
// Alternate the colors between green and blue, so that any inconsistency will stand out.
// Use red to highlight that.
string[] colors = { "green", "blue" };
int index = 0;
var bbox = new Rectangle();
BasicObstacleSide prevSide = null;
foreach (var currentSide in SideTree) {
string color = colors[index];
index ^= 1;
if (null == prevSide) {
// Create this the first time through; adding to an empty rectangle leaves 0,0.
bbox = new Rectangle(currentSide.Start, currentSide.End);
}
else {
if (-1 != Compare(prevSide, currentSide)) {
// Note: we toggled the index, so the red replaces the colour whose turn it is now
// and will leave the red line bracketed by two sides of the same colour.
color = "red";
}
bbox.Add(currentSide.Start);
bbox.Add(currentSide.End);
}
debugCurves.Add(new DebugCurve(0.1, color, new LineSegment(currentSide.Start, currentSide.End)));
prevSide = currentSide;
}
// Add the sweep line.
Point start = StaticGraphUtility.RectangleBorderIntersect(bbox, this.linePositionAtLastInsertOrRemove, scanDirection.OppositeDirection);
Point end = StaticGraphUtility.RectangleBorderIntersect(bbox, this.linePositionAtLastInsertOrRemove, scanDirection.Direction);
debugCurves.Add(new DebugCurve(0.025, "black", new LineSegment(start, end)));
return debugCurves;
}
#endif // TEST
// #if TEST_MSAGL
// internal List<DebugCurve> Test_GetScanLineDebugCurves() {
// // ReSharper restore InconsistentNaming
// var debugCurves = new List<DebugCurve>();
//
// // Alternate the colors between green and blue, so that any inconsistency will stand out.
// // Use red to highlight that.
// string[] colors = { "green", "blue" };
// int index = 0;
// var bbox = new Rectangle();
// BasicObstacleSide prevSide = null;
// foreach (var currentSide in SideTree) {
// string color = colors[index];
// index ^= 1;
// if (null == prevSide) {
// // Create this the first time through; adding to an empty rectangle leaves 0,0.
// bbox = new Rectangle(currentSide.Start, currentSide.End);
// }
// else {
// if (-1 != Compare(prevSide, currentSide)) {
// // Note: we toggled the index, so the red replaces the colour whose turn it is now
// // and will leave the red line bracketed by two sides of the same colour.
// color = "red";
// }
// bbox.Add(currentSide.Start);
// bbox.Add(currentSide.End);
// }
// debugCurves.Add(new DebugCurve(0.1, color, new LineSegment(currentSide.Start, currentSide.End)));
// prevSide = currentSide;
// }
//
// // Add the sweep line.
// Point start = StaticGraphUtility.RectangleBorderIntersect(bbox, this.linePositionAtLastInsertOrRemove, scanDirection.OppositeDirection);
// Point end = StaticGraphUtility.RectangleBorderIntersect(bbox, this.linePositionAtLastInsertOrRemove, scanDirection.Direction);
// debugCurves.Add(new DebugCurve(0.025, "black", new LineSegment(start, end)));
// return debugCurves;
// }
// #endif // TEST
#endregion // DebugCurves
}
}

View file

@ -280,129 +280,129 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
}
#region TEST_MSAGL
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "len"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "newEntry"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "nbend"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "iters"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "hcost"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "ccost"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "so"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "q"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "edges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void TestShowAllPaths(VisibilityVertex source, VertexEntry mostRecentlyExtendedPath) {
// ReSharper restore UnusedMember.Local
var edges = GetAllEdgesTest(source).Select(e => (ICurve) (new LineSegment(e.SourcePoint, e.TargetPoint))).
Select(c => new DebugCurve(c));
var q = queue.Select(ent => CurveFactory.CreateDiamond(2, 2, ent.Vertex.Point)).Select(c => new DebugCurve(c));
var so = new[] {
new DebugCurve(1, "brown", new Ellipse(3, 3, source.Point)),
new DebugCurve(1, "purple", CurveFactory.CreateDiamond(4, 4, Target.Point)),
new DebugCurve(1, "red", CurveFactory.CreateDiamond(6, 6, mostRecentlyExtendedPath.Vertex.Point))
};
var pathEdges = new List<DebugCurve>();
var newEntries = new List<VertexEntry>();
var count = this.visitedVertices.Count;
for (int ii = 0; ii < count; ++ii) {
var vertex = this.visitedVertices[ii];
if (vertex.VertexEntries == null) {
continue; // this is the source vertex
}
foreach (var entry in vertex.VertexEntries) {
if (entry == null) {
continue;
}
var color = "green";
if (entry.PreviousEntry == mostRecentlyExtendedPath) {
newEntries.Add(entry);
color = "red";
} else if (!entry.IsClosed) {
color = "yellow";
}
pathEdges.Add(new DebugCurve(2, color, new LineSegment(entry.PreviousVertex.Point, vertex.Point)));
}
}
Console.WriteLine("entry {0} seq = {1} len = {2} nbend = {3} ccost = {4} hcost = {5} iters = {6}/{7}", mostRecentlyExtendedPath,
this.lastDequeueTimestamp,
mostRecentlyExtendedPath.Length, mostRecentlyExtendedPath.NumberOfBends,
this.CombinedCost(mostRecentlyExtendedPath.Length, mostRecentlyExtendedPath.NumberOfBends),
this.HeuristicDistanceFromVertexToTarget(mostRecentlyExtendedPath.Vertex.Point, mostRecentlyExtendedPath.Direction),
this.currentIterations, totalIterations);
foreach (var newEntry in newEntries) {
Console.WriteLine(" newEntry {0} len = {1} nbend = {2} ccost = {3} hcost = {4}", newEntry,
newEntry.Length, newEntry.NumberOfBends,
this.CombinedCost(newEntry.Length, newEntry.NumberOfBends),
this.HeuristicDistanceFromVertexToTarget(newEntry.Vertex.Point, newEntry.Direction));
}
DevTraceDisplay(edges.Concat(q).Concat(so).Concat(pathEdges));
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "len"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "nbend"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "iters"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "so"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "pathEdges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "edges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private void TestShowPath(VisibilityVertex source, IEnumerable<Point> pathPoints, double cost, double length, int numberOfBends) {
// ReSharper restore UnusedMember.Local
var edges = GetAllEdgesTest(source).Select(e => (ICurve) (new LineSegment(e.SourcePoint, e.TargetPoint))).
Select(c => new DebugCurve(c));
var so = new[] {
new DebugCurve(1, "brown", new Ellipse(3, 3, source.Point)),
new DebugCurve(1, "purple", CurveFactory.CreateDiamond(4, 4, Target.Point)),
};
List<DebugCurve> pathEdges = GetPathEdgeDebugCurves(pathPoints, "green");
Console.WriteLine("path {0} -> {1} cost = {2} len = {3} nbend = {4} iters = {5}/{6}",
source.Point, this.Target.Point, cost, length, numberOfBends, this.currentIterations, totalIterations);
DevTraceDisplay(edges.Concat(so).Concat(pathEdges));
}
internal static List<DebugCurve> GetPathEdgeDebugCurves(IEnumerable<Point> pathPoints, string color) {
var pathEdges = new List<DebugCurve>();
if (pathPoints != null) {
bool first = true;
var prevPoint = new Point();
foreach (var point in pathPoints) {
if (first) {
prevPoint = point;
first = false;
continue;
}
pathEdges.Add(new DebugCurve(2, color, new LineSegment(prevPoint, point)));
prevPoint = point;
}
}
return pathEdges;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
private IEnumerable<VisibilityEdge> GetAllEdgesTest(VisibilityVertex vertex) {
var processedVertices = new Set<VisibilityVertex>();
var q = new Queue<VisibilityVertex>();
q.Enqueue(vertex);
// Target may not be connected to source.
bool targetFound = (vertex == this.Target);
while (!targetFound) {
while (q.Count > 0) {
VisibilityVertex v = q.Dequeue();
if (processedVertices.Contains(v)) {
continue;
}
targetFound |= (v == this.Target);
processedVertices.Insert(v);
foreach (var u in VertsToGo(v).Where(u => !processedVertices.Contains(u))) {
q.Enqueue(u);
}
foreach (VisibilityEdge edge in v.OutEdges) {
yield return edge;
}
}
q.Enqueue(this.Target);
targetFound = true;
}
}
private static IEnumerable<VisibilityVertex> VertsToGo(VisibilityVertex visibilityVertex) {
foreach (var edge in visibilityVertex.OutEdges) {
yield return edge.Target;
}
foreach (var edge in visibilityVertex.InEdges) {
yield return edge.Source;}
}
#endif // TEST_MSAGL
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "len"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "newEntry"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "nbend"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "iters"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "hcost"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "ccost"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "so"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "q"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "edges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private void TestShowAllPaths(VisibilityVertex source, VertexEntry mostRecentlyExtendedPath) {
// // ReSharper restore UnusedMember.Local
// var edges = GetAllEdgesTest(source).Select(e => (ICurve) (new LineSegment(e.SourcePoint, e.TargetPoint))).
// Select(c => new DebugCurve(c));
// var q = queue.Select(ent => CurveFactory.CreateDiamond(2, 2, ent.Vertex.Point)).Select(c => new DebugCurve(c));
// var so = new[] {
// new DebugCurve(1, "brown", new Ellipse(3, 3, source.Point)),
// new DebugCurve(1, "purple", CurveFactory.CreateDiamond(4, 4, Target.Point)),
// new DebugCurve(1, "red", CurveFactory.CreateDiamond(6, 6, mostRecentlyExtendedPath.Vertex.Point))
// };
//
// var pathEdges = new List<DebugCurve>();
// var newEntries = new List<VertexEntry>();
// var count = this.visitedVertices.Count;
// for (int ii = 0; ii < count; ++ii) {
// var vertex = this.visitedVertices[ii];
// if (vertex.VertexEntries == null) {
// continue; // this is the source vertex
// }
// foreach (var entry in vertex.VertexEntries) {
// if (entry == null) {
// continue;
// }
// var color = "green";
// if (entry.PreviousEntry == mostRecentlyExtendedPath) {
// newEntries.Add(entry);
// color = "red";
// } else if (!entry.IsClosed) {
// color = "yellow";
// }
// pathEdges.Add(new DebugCurve(2, color, new LineSegment(entry.PreviousVertex.Point, vertex.Point)));
// }
// }
// Console.WriteLine("entry {0} seq = {1} len = {2} nbend = {3} ccost = {4} hcost = {5} iters = {6}/{7}", mostRecentlyExtendedPath,
// this.lastDequeueTimestamp,
// mostRecentlyExtendedPath.Length, mostRecentlyExtendedPath.NumberOfBends,
// this.CombinedCost(mostRecentlyExtendedPath.Length, mostRecentlyExtendedPath.NumberOfBends),
// this.HeuristicDistanceFromVertexToTarget(mostRecentlyExtendedPath.Vertex.Point, mostRecentlyExtendedPath.Direction),
// this.currentIterations, totalIterations);
// foreach (var newEntry in newEntries) {
// Console.WriteLine(" newEntry {0} len = {1} nbend = {2} ccost = {3} hcost = {4}", newEntry,
// newEntry.Length, newEntry.NumberOfBends,
// this.CombinedCost(newEntry.Length, newEntry.NumberOfBends),
// this.HeuristicDistanceFromVertexToTarget(newEntry.Vertex.Point, newEntry.Direction));
// }
// DevTraceDisplay(edges.Concat(q).Concat(so).Concat(pathEdges));
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "len"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "nbend"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "iters"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "so"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "pathEdges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "edges"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private void TestShowPath(VisibilityVertex source, IEnumerable<Point> pathPoints, double cost, double length, int numberOfBends) {
// // ReSharper restore UnusedMember.Local
// var edges = GetAllEdgesTest(source).Select(e => (ICurve) (new LineSegment(e.SourcePoint, e.TargetPoint))).
// Select(c => new DebugCurve(c));
// var so = new[] {
// new DebugCurve(1, "brown", new Ellipse(3, 3, source.Point)),
// new DebugCurve(1, "purple", CurveFactory.CreateDiamond(4, 4, Target.Point)),
// };
//
// List<DebugCurve> pathEdges = GetPathEdgeDebugCurves(pathPoints, "green");
// Console.WriteLine("path {0} -> {1} cost = {2} len = {3} nbend = {4} iters = {5}/{6}",
// source.Point, this.Target.Point, cost, length, numberOfBends, this.currentIterations, totalIterations);
// DevTraceDisplay(edges.Concat(so).Concat(pathEdges));
// }
//
// internal static List<DebugCurve> GetPathEdgeDebugCurves(IEnumerable<Point> pathPoints, string color) {
// var pathEdges = new List<DebugCurve>();
// if (pathPoints != null) {
// bool first = true;
// var prevPoint = new Point();
// foreach (var point in pathPoints) {
// if (first) {
// prevPoint = point;
// first = false;
// continue;
// }
// pathEdges.Add(new DebugCurve(2, color, new LineSegment(prevPoint, point)));
// prevPoint = point;
// }
// }
// return pathEdges;
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// private IEnumerable<VisibilityEdge> GetAllEdgesTest(VisibilityVertex vertex) {
// var processedVertices = new Set<VisibilityVertex>();
// var q = new Queue<VisibilityVertex>();
// q.Enqueue(vertex);
//
// // Target may not be connected to source.
// bool targetFound = (vertex == this.Target);
// while (!targetFound) {
// while (q.Count > 0) {
// VisibilityVertex v = q.Dequeue();
// if (processedVertices.Contains(v)) {
// continue;
// }
// targetFound |= (v == this.Target);
// processedVertices.Insert(v);
// foreach (var u in VertsToGo(v).Where(u => !processedVertices.Contains(u))) {
// q.Enqueue(u);
// }
// foreach (VisibilityEdge edge in v.OutEdges) {
// yield return edge;
// }
// }
// q.Enqueue(this.Target);
// targetFound = true;
// }
// }
//
// private static IEnumerable<VisibilityVertex> VertsToGo(VisibilityVertex visibilityVertex) {
// foreach (var edge in visibilityVertex.OutEdges) {
// yield return edge.Target;
// }
// foreach (var edge in visibilityVertex.InEdges) {
// yield return edge.Source;}
// }
//
// #endif // TEST_MSAGL
#endregion // TEST_MSAGL
private void QueueReversedEntryToNeighborVertexIfNeeded(VertexEntry bestEntry, VertexEntry entryFromNeighbor, double weight) {
@ -699,43 +699,43 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
#endif // DEVTRACE
}
#if TEST_MSAGL
[Conditional("DEVTRACE")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
private static void DevTraceDisplay(IEnumerable<DebugCurve> debugCurves)
{
#if DEVTRACE
if (!ssstDisplay.IsLevel(1))
{
return;
}
#endif // DEVTRACE
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debugCurves);
}
#endif // TEST_MSAGL
// #if TEST_MSAGL
// [Conditional("DEVTRACE")]
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
// private static void DevTraceDisplay(IEnumerable<DebugCurve> debugCurves)
// {
// #if DEVTRACE
// if (!ssstDisplay.IsLevel(1))
// {
// return;
// }
// #endif // DEVTRACE
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debugCurves);
// }
// #endif // TEST_MSAGL
#if TEST_MSAGL
private int currentIterations;
private static int totalIterations;
private UInt64 lastDequeueTimestamp;
#endif // TEST_MSAGL
// #if TEST_MSAGL
// private int currentIterations;
// private static int totalIterations;
// private UInt64 lastDequeueTimestamp;
// #endif // TEST_MSAGL
[Conditional("TEST_MSAGL")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
private void TestPreDequeue() {
#if TEST_MSAGL
++currentIterations;
++totalIterations;
this.lastDequeueTimestamp = this.queue.PeekTimestamp();
#endif // TEST_MSAGL
// #if TEST_MSAGL
// ++currentIterations;
// ++totalIterations;
// this.lastDequeueTimestamp = this.queue.PeekTimestamp();
// #endif // TEST_MSAGL
}
[Conditional("TEST_MSAGL")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
private void TestClearIterations() {
#if TEST_MSAGL
currentIterations = 0;
#endif // TEST_MSAGL
// #if TEST_MSAGL
// currentIterations = 0;
// #endif // TEST_MSAGL
}
#endregion // DevTrace

View file

@ -237,11 +237,11 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
[Conditional("TEST_MSAGL")]
static internal void Test_DumpVisibilityGraph(ObstacleTree obstacleTree, VisibilityGraph vg) {
#if TEST_MSAGL
var debugCurves = Test_GetObstacleDebugCurves(obstacleTree);
debugCurves.AddRange(Test_GetVisibilityGraphDebugCurves(vg));
DebugCurveCollection.WriteToFile(debugCurves, GetDumpFileName("VisibilityGraph"));
#endif // TEST
// #if TEST_MSAGL
// var debugCurves = Test_GetObstacleDebugCurves(obstacleTree);
// debugCurves.AddRange(Test_GetVisibilityGraphDebugCurves(vg));
// DebugCurveCollection.WriteToFile(debugCurves, GetDumpFileName("VisibilityGraph"));
// #endif // TEST
}
#if DEVTRACE
@ -253,69 +253,69 @@ namespace Microsoft.Msagl.Routing.Rectilinear {
}
#endif // DEVTRACE
#if TEST_MSAGL
static internal List<DebugCurve> Test_GetObstacleDebugCurves(ObstacleTree obstacleTree) {
return Test_GetObstacleDebugCurves(obstacleTree, false, false);
}
static internal List<DebugCurve> Test_GetObstacleDebugCurves(ObstacleTree obstacleTree, bool noPadPoly, bool noVisPoly) {
return Test_GetObstacleDebugCurves(obstacleTree.GetAllObstacles(), noPadPoly, noVisPoly);
}
static internal List<DebugCurve> Test_GetObstacleDebugCurves(IEnumerable<Obstacle> obstacles, bool noPadPoly, bool noVisPoly) {
var debugCurves = new List<DebugCurve>();
foreach (var obstacle in obstacles) {
debugCurves.Add(new DebugCurve(0.1, "darkgray", obstacle.InputShape.BoundaryCurve));
if (!noPadPoly || obstacle.IsGroup) {
debugCurves.Add(obstacle.IsTransparentAncestor
? new DebugCurve(0.3, "gold", obstacle.PaddedPolyline)
: new DebugCurve(0.1, obstacle.IsGroup ? "purple" : "black", obstacle.PaddedPolyline));
}
if (!noVisPoly && obstacle.IsPrimaryObstacle && (obstacle.VisibilityPolyline != obstacle.PaddedPolyline)) {
debugCurves.Add(new DebugCurve(0.1, obstacle.IsGroup ? "mediumpurple" : "lightgray", obstacle.VisibilityPolyline));
}
}
return debugCurves;
}
static internal List<DebugCurve> Test_GetVisibilityGraphDebugCurves(VisibilityGraph vg) {
return vg.Edges.Select(edge => new DebugCurve(0.1,
(edge.Weight == ScanSegment.NormalWeight) ? "Blue"
: ((edge.Weight == ScanSegment.ReflectionWeight) ? "DarkCyan" : "LightBlue"),
new LineSegment(edge.Source.Point, edge.Target.Point))).ToList();
}
static internal List<DebugCurve> Test_GetPreNudgedPathDebugCurves(IEnumerable<Path> edgePaths) {
var debugCurves = new List<DebugCurve>();
foreach (var path in edgePaths) {
var points = path.PathPoints.ToArray();
for (int ii = 0; ii < points.Length - 1; ++ii) {
debugCurves.Add(new DebugCurve(0.1, "purple", new LineSegment(points[ii], points[ii + 1])));
}
}
return debugCurves;
}
static internal List<DebugCurve> Test_GetPostNudgedPathDebugCurves(IEnumerable<Path> edgePaths) {
var debugCurves = new List<DebugCurve>();
foreach (var path in edgePaths) {
debugCurves.AddRange(path.PathEdges.Select
(e => new DebugCurve(0.1, "purple", new LineSegment(e.Source, e.Target))));
}
return debugCurves;
}
static internal List<DebugCurve> Test_GetScanSegmentCurves(ScanSegmentTree segTree) {
return segTree.Segments.Select(seg => new DebugCurve(0.2,
seg.IsOverlapped ? "Aqua" : (seg.IsReflection ? "LightGreen" : "DarkGreen"),
new LineSegment(seg.Start, seg.End))).ToList();
}
static internal string GetDumpFileName(string prefix) {
return System.IO.Path.GetTempPath() + prefix + ".DebugCurves";
}
#endif // TEST
// #if TEST_MSAGL
// static internal List<DebugCurve> Test_GetObstacleDebugCurves(ObstacleTree obstacleTree) {
// return Test_GetObstacleDebugCurves(obstacleTree, false, false);
// }
//
// static internal List<DebugCurve> Test_GetObstacleDebugCurves(ObstacleTree obstacleTree, bool noPadPoly, bool noVisPoly) {
// return Test_GetObstacleDebugCurves(obstacleTree.GetAllObstacles(), noPadPoly, noVisPoly);
// }
//
// static internal List<DebugCurve> Test_GetObstacleDebugCurves(IEnumerable<Obstacle> obstacles, bool noPadPoly, bool noVisPoly) {
// var debugCurves = new List<DebugCurve>();
// foreach (var obstacle in obstacles) {
// debugCurves.Add(new DebugCurve(0.1, "darkgray", obstacle.InputShape.BoundaryCurve));
// if (!noPadPoly || obstacle.IsGroup) {
// debugCurves.Add(obstacle.IsTransparentAncestor
// ? new DebugCurve(0.3, "gold", obstacle.PaddedPolyline)
// : new DebugCurve(0.1, obstacle.IsGroup ? "purple" : "black", obstacle.PaddedPolyline));
// }
// if (!noVisPoly && obstacle.IsPrimaryObstacle && (obstacle.VisibilityPolyline != obstacle.PaddedPolyline)) {
// debugCurves.Add(new DebugCurve(0.1, obstacle.IsGroup ? "mediumpurple" : "lightgray", obstacle.VisibilityPolyline));
// }
// }
// return debugCurves;
// }
//
// static internal List<DebugCurve> Test_GetVisibilityGraphDebugCurves(VisibilityGraph vg) {
// return vg.Edges.Select(edge => new DebugCurve(0.1,
// (edge.Weight == ScanSegment.NormalWeight) ? "Blue"
// : ((edge.Weight == ScanSegment.ReflectionWeight) ? "DarkCyan" : "LightBlue"),
// new LineSegment(edge.Source.Point, edge.Target.Point))).ToList();
//
// }
//
// static internal List<DebugCurve> Test_GetPreNudgedPathDebugCurves(IEnumerable<Path> edgePaths) {
// var debugCurves = new List<DebugCurve>();
// foreach (var path in edgePaths) {
// var points = path.PathPoints.ToArray();
// for (int ii = 0; ii < points.Length - 1; ++ii) {
// debugCurves.Add(new DebugCurve(0.1, "purple", new LineSegment(points[ii], points[ii + 1])));
// }
// }
// return debugCurves;
// }
//
// static internal List<DebugCurve> Test_GetPostNudgedPathDebugCurves(IEnumerable<Path> edgePaths) {
// var debugCurves = new List<DebugCurve>();
// foreach (var path in edgePaths) {
// debugCurves.AddRange(path.PathEdges.Select
// (e => new DebugCurve(0.1, "purple", new LineSegment(e.Source, e.Target))));
// }
// return debugCurves;
// }
//
// static internal List<DebugCurve> Test_GetScanSegmentCurves(ScanSegmentTree segTree) {
// return segTree.Segments.Select(seg => new DebugCurve(0.2,
// seg.IsOverlapped ? "Aqua" : (seg.IsReflection ? "LightGreen" : "DarkGreen"),
// new LineSegment(seg.Start, seg.End))).ToList();
// }
//
// static internal string GetDumpFileName(string prefix) {
// return System.IO.Path.GetTempPath() + prefix + ".DebugCurves";
// }
// #endif // TEST
// ReSharper restore InconsistentNaming
#if DEBUG

View file

@ -161,23 +161,23 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
constrainedDelaunayTriangulation.Run();
return constrainedDelaunayTriangulation;
}
#if DEBUG && TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// ReSharper disable UnusedMember.Local
void ShowGraphLocal() {
// ReSharper restore UnusedMember.Local
var l = new List<ICurve>();
l.Clear();
foreach (var e in geometryGraph.Edges) {
{
l.Add(new Ellipse(2, 2, e.Curve.Start));
l.Add(CurveFactory.CreateDiamond(5, 5, e.Curve.End));
l.Add(e.Curve);
}
}
SplineRouter.ShowVisGraph(VisibilityGraph, LooseHierarchy.GetAllLeaves(), null, l);
}
#endif
// #if DEBUG && TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// // ReSharper disable UnusedMember.Local
// void ShowGraphLocal() {
// // ReSharper restore UnusedMember.Local
// var l = new List<ICurve>();
// l.Clear();
// foreach (var e in geometryGraph.Edges) {
// {
// l.Add(new Ellipse(2, 2, e.Curve.Start));
// l.Add(CurveFactory.CreateDiamond(5, 5, e.Curve.End));
// l.Add(e.Curve);
// }
// }
// SplineRouter.ShowVisGraph(VisibilityGraph, LooseHierarchy.GetAllLeaves(), null, l);
// }
// #endif
void FixLocationsForHookAnywherePorts(IEnumerable<Edge> edges) {
foreach (var edge in edges) {

View file

@ -168,116 +168,116 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
#region Debug show
#if DEBUG && TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static internal void ShowHubs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering, Station station) {
var ttt = GetAllDebugCurves(metroMapOrdering, metroGraphData);
if (station != null)
ttt = ttt.Concat(new[] { new DebugCurve(255, 3, "pink", CurveFactory.CreateDiamond(20, 20, station.Position)) });
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ttt);
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static internal IEnumerable<DebugCurve> GetAllDebugCurves(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
return GraphNodes(metroGraphData).Concat(VertexDebugCurves(metroMapOrdering, metroGraphData)).Concat(DebugEdges(metroGraphData));
}
static IEnumerable<DebugCurve> DebugEdges(MetroGraphData metroGraphData1) {
return metroGraphData1.Edges.Select(e => new DebugCurve(40, 0.1, "gray", e.Curve));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> VertexDebugCurves(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
return DebugCircles(metroGraphData).Concat(DebugHubBases(metroGraphData)).
Concat(DebugSegs(metroGraphData, metroMapOrdering)).
Concat(BetweenHubs(metroMapOrdering, metroGraphData));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> BetweenHubs(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
foreach (Metroline ml in metroGraphData.Metrolines) {
List<Tuple<Point, Point>> segs = GetInterestingSegs(metroGraphData, metroMapOrdering, ml);
string color = GetMonotoneColor(ml.Polyline.Start, ml.Polyline.End, segs);
foreach (var seg in segs)
yield return new DebugCurve(100, ml.Width, color, new LineSegment(seg.Item1, seg.Item2));
}
}
static List<Tuple<Point, Point>> GetInterestingSegs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering, Metroline line) {
var ret = new List<Tuple<Point, Point>>();
Point start = FindCurveStart(metroGraphData, metroMapOrdering, line);
var cubicSegs = HubSegsOfLine(metroGraphData, metroMapOrdering, line);
foreach (var seg in cubicSegs) {
if (seg == null) continue;
ret.Add(new Tuple<Point, Point>(start, seg.Start));
start = seg.End;
}
ret.Add(new Tuple<Point, Point>(start, FindCurveEnd(metroGraphData, metroMapOrdering, line)));
return ret;
}
static string GetMonotoneColor(Point start, Point end, List<Tuple<Point, Point>> segs) {
return "green";
// Point dir = end - start;
// bool monotone = segs.All(seg => (seg.Second - seg.First)*dir >= 0);
// return monotone ? "green" : "magenta";
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> DebugHubBases(MetroGraphData metroGraphData) {
List<DebugCurve> dc = new List<DebugCurve>();
foreach (var s in metroGraphData.Stations)
foreach (var h in s.BundleBases.Values) {
dc.Add(new DebugCurve(100, 1, "red", new LineSegment(h.LeftPoint, h.RightPoint)));
}
return dc;
//return
// metroGraphData.Stations.SelectMany(s => s.BundleBases.Values).Select(
// h => new DebugCurve(100, 0.01, "red", new LineSegment(h.Points[0], h.Points.Last())));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> DebugCircles(MetroGraphData metroGraphData) {
return
metroGraphData.Stations.Select(
station => new DebugCurve(100, 0.1, "blue", CurveFactory.CreateCircle(station.Radius, station.Position)));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> DebugSegs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering) {
var ls = new List<ICurve>();
foreach (var s in metroGraphData.VirtualNodes()) {
foreach (var b in s.BundleBases.Values) {
foreach (var h in b.OrientedHubSegments) {
if (h == null) continue;
if (h.Segment == null) {
var uBase = h.Other.BundleBase;
var i = h.Index;
var j = h.Other.Index;
ls.Add(new LineSegment(b.Points[i], uBase.Points[j]));
}
else {
ls.Add(h.Segment);
}
}
}
}
return ls.Select(s => new DebugCurve(100, 0.01, "green", s));
}
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static IEnumerable<DebugCurve> GraphNodes(MetroGraphData metroGraphData) {
var nodes =
new Set<ICurve>(
metroGraphData.Edges.Select(e => e.SourcePort.Curve).Concat(
metroGraphData.Edges.Select(e => e.TargetPort.Curve)));
return nodes.Select(n => new DebugCurve(40, 1, "black", n));
}
#endif
// #if DEBUG && TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static internal void ShowHubs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering, Station station) {
// var ttt = GetAllDebugCurves(metroMapOrdering, metroGraphData);
// if (station != null)
// ttt = ttt.Concat(new[] { new DebugCurve(255, 3, "pink", CurveFactory.CreateDiamond(20, 20, station.Position)) });
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(ttt);
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static internal IEnumerable<DebugCurve> GetAllDebugCurves(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
// return GraphNodes(metroGraphData).Concat(VertexDebugCurves(metroMapOrdering, metroGraphData)).Concat(DebugEdges(metroGraphData));
// }
//
// static IEnumerable<DebugCurve> DebugEdges(MetroGraphData metroGraphData1) {
// return metroGraphData1.Edges.Select(e => new DebugCurve(40, 0.1, "gray", e.Curve));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> VertexDebugCurves(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
// return DebugCircles(metroGraphData).Concat(DebugHubBases(metroGraphData)).
// Concat(DebugSegs(metroGraphData, metroMapOrdering)).
// Concat(BetweenHubs(metroMapOrdering, metroGraphData));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> BetweenHubs(IMetroMapOrderingAlgorithm metroMapOrdering, MetroGraphData metroGraphData) {
// foreach (Metroline ml in metroGraphData.Metrolines) {
// List<Tuple<Point, Point>> segs = GetInterestingSegs(metroGraphData, metroMapOrdering, ml);
// string color = GetMonotoneColor(ml.Polyline.Start, ml.Polyline.End, segs);
// foreach (var seg in segs)
// yield return new DebugCurve(100, ml.Width, color, new LineSegment(seg.Item1, seg.Item2));
// }
// }
//
// static List<Tuple<Point, Point>> GetInterestingSegs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering, Metroline line) {
// var ret = new List<Tuple<Point, Point>>();
// Point start = FindCurveStart(metroGraphData, metroMapOrdering, line);
// var cubicSegs = HubSegsOfLine(metroGraphData, metroMapOrdering, line);
// foreach (var seg in cubicSegs) {
// if (seg == null) continue;
// ret.Add(new Tuple<Point, Point>(start, seg.Start));
// start = seg.End;
// }
// ret.Add(new Tuple<Point, Point>(start, FindCurveEnd(metroGraphData, metroMapOrdering, line)));
//
// return ret;
// }
//
// static string GetMonotoneColor(Point start, Point end, List<Tuple<Point, Point>> segs) {
// return "green";
// // Point dir = end - start;
// // bool monotone = segs.All(seg => (seg.Second - seg.First)*dir >= 0);
// // return monotone ? "green" : "magenta";
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> DebugHubBases(MetroGraphData metroGraphData) {
// List<DebugCurve> dc = new List<DebugCurve>();
// foreach (var s in metroGraphData.Stations)
// foreach (var h in s.BundleBases.Values) {
// dc.Add(new DebugCurve(100, 1, "red", new LineSegment(h.LeftPoint, h.RightPoint)));
// }
//
// return dc;
// //return
// // metroGraphData.Stations.SelectMany(s => s.BundleBases.Values).Select(
// // h => new DebugCurve(100, 0.01, "red", new LineSegment(h.Points[0], h.Points.Last())));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> DebugCircles(MetroGraphData metroGraphData) {
// return
// metroGraphData.Stations.Select(
// station => new DebugCurve(100, 0.1, "blue", CurveFactory.CreateCircle(station.Radius, station.Position)));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> DebugSegs(MetroGraphData metroGraphData, IMetroMapOrderingAlgorithm metroMapOrdering) {
//
// var ls = new List<ICurve>();
// foreach (var s in metroGraphData.VirtualNodes()) {
// foreach (var b in s.BundleBases.Values) {
// foreach (var h in b.OrientedHubSegments) {
// if (h == null) continue;
// if (h.Segment == null) {
// var uBase = h.Other.BundleBase;
// var i = h.Index;
// var j = h.Other.Index;
// ls.Add(new LineSegment(b.Points[i], uBase.Points[j]));
// }
// else {
// ls.Add(h.Segment);
// }
// }
// }
// }
//
// return ls.Select(s => new DebugCurve(100, 0.01, "green", s));
// }
//
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static IEnumerable<DebugCurve> GraphNodes(MetroGraphData metroGraphData) {
// var nodes =
// new Set<ICurve>(
// metroGraphData.Edges.Select(e => e.SourcePort.Curve).Concat(
// metroGraphData.Edges.Select(e => e.TargetPort.Curve)));
// return nodes.Select(n => new DebugCurve(40, 1, "black", n));
// }
// #endif
#endregion

View file

@ -14,115 +14,115 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
/// </summary>
public class HubDebugger {
#if DEBUG && TEST_MSAGL
readonly MetroGraphData mgd;
readonly BundlingSettings bundlingSettings;
static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, params ICurve[] iCurves
) {
HubDebugger hd = new HubDebugger(mgd, bundlingSettings);
if (iCurves != null) {
var dc = hd.CreateDebugCurves(iCurves);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dc);
}
}
static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, bool withIdeal) {
if (!withIdeal) return;
foreach (var v in mgd.Stations) {
ShowHubs(mgd, bundlingSettings, v);
}
}
static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, Station highlightedNode) {
HubDebugger hd = new HubDebugger(mgd, bundlingSettings);
List<DebugCurve> debugCurves = hd.CreateDebugCurves();
debugCurves.Add(new DebugCurve(100,1, "magenta", CurveFactory.CreateCircle(3, highlightedNode.Position)));
debugCurves.Add(new DebugCurve(100, 0.1, "green", highlightedNode.BoundaryCurve));
Console.WriteLine(highlightedNode.SerialNumber);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debugCurves);
}
internal HubDebugger(MetroGraphData mgd, BundlingSettings bundlingSettings) {
this.mgd = mgd;
this.bundlingSettings = bundlingSettings;
}
internal List<DebugCurve> CreateDebugCurves(params ICurve[] iCurves) {
List<DebugCurve> curves = new List<DebugCurve>();
curves.AddRange(Obstacles());
//curves.AddRange(BBoxes());
curves.AddRange(Hubs());
curves.AddRange(Paths());
//curves.AddRange(Bundles());
//curves.AddRange(IdealHubs());
//curves.AddRange(IdealHubsWithNeighbors());
//curves.AddRange(IdealBundles());
if (iCurves != null) {
int i = 0;
foreach(var iCurve in iCurves)
if (iCurve != null)
curves.Add(new DebugCurve(100,0.2, DebugCurve.Colors[i++], iCurve));
}
return curves;
}
IEnumerable<DebugCurve> Obstacles() {
return mgd.TightTree.GetAllLeaves().Select(n => new DebugCurve(100,0.5,"black", n)).Concat(
mgd.LooseTree.GetAllLeaves().Select(n => new DebugCurve(100, 0.1, "green", n)));
}
IEnumerable<DebugCurve> BBoxes() {
return mgd.Stations.Where(n => n.IsRealNode).Select(n => new DebugCurve("red", CurveFactory.CreateCircle(n.BoundaryCurve.BoundingBox.Diagonal / 2, n.Position)));
}
IEnumerable<DebugCurve> GraphNodes() {
var nodes = new Set<ICurve>(mgd.Edges.Select(e => e.SourcePort.Curve).Concat(mgd.Edges.Select(e => e.TargetPort.Curve)));
return nodes.Select(n => new DebugCurve(100, 1, "black", n));
}
IEnumerable<DebugCurve> Hubs() {
return mgd.Stations.Select(station => new DebugCurve(100, 1, "blue", CurveFactory.CreateCircle(Math.Max(station.Radius, 1.0), station.Position)));
}
IEnumerable<DebugCurve> IdealHubs() {
return mgd.VirtualNodes().Select(station => new DebugCurve(100, 1, "black",
CurveFactory.CreateCircle(HubRadiiCalculator.CalculateIdealHubRadiusWithNeighbors(mgd, bundlingSettings, station), station.Position)));
}
IEnumerable<DebugCurve> IdealHubsWithNeighbors() {
return mgd.VirtualNodes().Select(station => new DebugCurve(200, 1, "black",
CurveFactory.CreateCircle(HubRadiiCalculator.CalculateIdealHubRadiusWithNeighbors(mgd, bundlingSettings, station), station.Position)));
}
IEnumerable<DebugCurve> Bundles() {
return mgd.VirtualEdges().Select(pr => new DebugCurve(100, 1, "red", new LineSegment(pr.Item1.Position, pr.Item2.Position)));
}
IEnumerable<DebugCurve> IdealBundles() {
List<DebugCurve> dc = new List<DebugCurve>();
foreach (var edge in mgd.VirtualEdges()) {
var node = edge.Item1;
var adj = edge.Item2;
double width = mgd.GetWidth(node, adj, bundlingSettings.EdgeSeparation);
dc.Add(new DebugCurve(0.1, "black", Intersections.Create4gon(node.Position, adj.Position, width, width)));
}
return dc;
}
IEnumerable<DebugCurve> Paths() {
List<DebugCurve> dc = new List<DebugCurve>();
foreach (var metroline in mgd.Metrolines) {
dc.Add(new DebugCurve(100, 1, "black", metroline.Polyline));
}
return dc;
}
#endif
// #if DEBUG && TEST_MSAGL
// readonly MetroGraphData mgd;
// readonly BundlingSettings bundlingSettings;
// static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, params ICurve[] iCurves
// ) {
// HubDebugger hd = new HubDebugger(mgd, bundlingSettings);
// if (iCurves != null) {
// var dc = hd.CreateDebugCurves(iCurves);
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dc);
// }
// }
//
// static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, bool withIdeal) {
// if (!withIdeal) return;
//
// foreach (var v in mgd.Stations) {
// ShowHubs(mgd, bundlingSettings, v);
// }
// }
//
// static internal void ShowHubs(MetroGraphData mgd, BundlingSettings bundlingSettings, Station highlightedNode) {
// HubDebugger hd = new HubDebugger(mgd, bundlingSettings);
// List<DebugCurve> debugCurves = hd.CreateDebugCurves();
// debugCurves.Add(new DebugCurve(100,1, "magenta", CurveFactory.CreateCircle(3, highlightedNode.Position)));
// debugCurves.Add(new DebugCurve(100, 0.1, "green", highlightedNode.BoundaryCurve));
//
// Console.WriteLine(highlightedNode.SerialNumber);
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(debugCurves);
// }
//
// internal HubDebugger(MetroGraphData mgd, BundlingSettings bundlingSettings) {
// this.mgd = mgd;
// this.bundlingSettings = bundlingSettings;
// }
//
// internal List<DebugCurve> CreateDebugCurves(params ICurve[] iCurves) {
// List<DebugCurve> curves = new List<DebugCurve>();
// curves.AddRange(Obstacles());
// //curves.AddRange(BBoxes());
//
// curves.AddRange(Hubs());
// curves.AddRange(Paths());
// //curves.AddRange(Bundles());
// //curves.AddRange(IdealHubs());
// //curves.AddRange(IdealHubsWithNeighbors());
// //curves.AddRange(IdealBundles());
// if (iCurves != null) {
// int i = 0;
// foreach(var iCurve in iCurves)
// if (iCurve != null)
// curves.Add(new DebugCurve(100,0.2, DebugCurve.Colors[i++], iCurve));
// }
// return curves;
// }
//
// IEnumerable<DebugCurve> Obstacles() {
// return mgd.TightTree.GetAllLeaves().Select(n => new DebugCurve(100,0.5,"black", n)).Concat(
// mgd.LooseTree.GetAllLeaves().Select(n => new DebugCurve(100, 0.1, "green", n)));
// }
//
// IEnumerable<DebugCurve> BBoxes() {
// return mgd.Stations.Where(n => n.IsRealNode).Select(n => new DebugCurve("red", CurveFactory.CreateCircle(n.BoundaryCurve.BoundingBox.Diagonal / 2, n.Position)));
// }
//
// IEnumerable<DebugCurve> GraphNodes() {
// var nodes = new Set<ICurve>(mgd.Edges.Select(e => e.SourcePort.Curve).Concat(mgd.Edges.Select(e => e.TargetPort.Curve)));
// return nodes.Select(n => new DebugCurve(100, 1, "black", n));
// }
//
// IEnumerable<DebugCurve> Hubs() {
// return mgd.Stations.Select(station => new DebugCurve(100, 1, "blue", CurveFactory.CreateCircle(Math.Max(station.Radius, 1.0), station.Position)));
// }
//
// IEnumerable<DebugCurve> IdealHubs() {
// return mgd.VirtualNodes().Select(station => new DebugCurve(100, 1, "black",
// CurveFactory.CreateCircle(HubRadiiCalculator.CalculateIdealHubRadiusWithNeighbors(mgd, bundlingSettings, station), station.Position)));
// }
//
// IEnumerable<DebugCurve> IdealHubsWithNeighbors() {
// return mgd.VirtualNodes().Select(station => new DebugCurve(200, 1, "black",
// CurveFactory.CreateCircle(HubRadiiCalculator.CalculateIdealHubRadiusWithNeighbors(mgd, bundlingSettings, station), station.Position)));
// }
//
// IEnumerable<DebugCurve> Bundles() {
// return mgd.VirtualEdges().Select(pr => new DebugCurve(100, 1, "red", new LineSegment(pr.Item1.Position, pr.Item2.Position)));
// }
//
// IEnumerable<DebugCurve> IdealBundles() {
// List<DebugCurve> dc = new List<DebugCurve>();
// foreach (var edge in mgd.VirtualEdges()) {
// var node = edge.Item1;
// var adj = edge.Item2;
//
// double width = mgd.GetWidth(node, adj, bundlingSettings.EdgeSeparation);
// dc.Add(new DebugCurve(0.1, "black", Intersections.Create4gon(node.Position, adj.Position, width, width)));
// }
//
// return dc;
// }
//
// IEnumerable<DebugCurve> Paths() {
// List<DebugCurve> dc = new List<DebugCurve>();
// foreach (var metroline in mgd.Metrolines) {
// dc.Add(new DebugCurve(100, 1, "black", metroline.Polyline));
// }
//
// return dc;
// }
// #endif
/*void SaveAsBitmap(string filename, GViewer gViewer) {
int w = (int)Math.Ceiling((double) gViewer.Graph.Width);

View file

@ -162,100 +162,100 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
#if DEBUG && TEST_MSAGL
/// <summary>
/// check the validness of the drawing:
/// 1. hubs are not inside loose obstacles
/// 2. bundles do not cross loose obstacles
/// </summary>
internal bool HubPositionsAreOK() {
//check polylines
foreach (var line in metroGraphData.Metrolines) {
var poly = line.Polyline;
foreach (var p in poly.PolylinePoints)
Debug.Assert(metroGraphData.PointToStations.ContainsKey(p.Point));
}
foreach (var station in metroGraphData.Stations) {
if (!station.IsRealNode && !HubAvoidsObstacles(station.Position, 0, obstaclesToIgnore(station))) {
if (LayoutAlgorithmSettings.ShowDebugCurvesEnumeration != null) {
HubDebugger.ShowHubs(metroGraphData, bundlingSettings, station);
ShowStationWithObstaclesToIgnore(station, obstacleTree.AllHitItems(station.Position));
}
return false;
}
//bundles
foreach (var adj in station.Neighbors) {
if (ApproximateComparer.Close(adj.Position, station.Position))
return false;
if (!EdgeIsLegal(station, adj, station.Position, adj.Position)) {
if (LayoutAlgorithmSettings.ShowDebugCurvesEnumeration != null) {
//debug visualization
var l = new List<DebugCurve>();
//foreach (var st in metroGraphData.Stations) {
// l.Add(new DebugCurve(100, 0.5, "grey", st.BoundaryCurve));
//}
foreach (var poly in obstaclesToIgnore(station)) {
l.Add(new DebugCurve(100, 5, "green", poly));
}
foreach (var obstacle in obstacleTree.GetAllLeaves()) {
l.Add(new DebugCurve(100, 1, "red", obstacle));
}
l.Add(new DebugCurve(1, "blue", station.BoundaryCurve));
l.Add(new DebugCurve(1, "blue", adj.BoundaryCurve));
l.Add(new DebugCurve(1, "blue", new LineSegment(adj.Position, adj.Neighbors.First().Position)));
l.Add(new DebugCurve(1, "blue", new LineSegment(station.Position, adj.Position)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
//end debug visualization
return false;
}
}
}
}
return true;
}
void ShowStationWithObstaclesToIgnore(Station station, IEnumerable<Polyline> allHitItems) {
var l = new List<DebugCurve>();
foreach (var poly in allHitItems) {
l.Add(new DebugCurve(100, 0.5, "brown", poly));
}
if (obstaclesToIgnore(station) != null)
foreach (var poly in obstaclesToIgnore(station))
l.Add(new DebugCurve(100, 1, "red", poly));
foreach (var obstacle in obstacleTree.GetAllLeaves())
l.Add(new DebugCurve(50, 0.1, "green", obstacle));
l.Add(new DebugCurve(0.1, "blue", new Ellipse(1, 1, station.Position)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
/// <summary>
/// edge doesn't cross obstacles
/// NOTE: use method in CdtIntersection insetad!
/// </summary>
bool EdgeIsLegal(Station stationA, Station stationB, Point a, Point b) {
var crossings = InteractiveEdgeRouter.IntersectionsOfLineAndRectangleNodeOverPolyline(new LineSegment(a, b), obstacleTree);
Set<Polyline> obstaclesToIgnoreForBundle = ObstaclesToIgnoreForBundle(stationA, stationB);
if (crossings.Count < 0) {
var l = new List<DebugCurve>();
var crossingSet = new Set<ICurve>(crossings.Select(ii => ii.Segment1));
l.AddRange(crossingSet.Select(p=>new DebugCurve(100,1,"red",p)));
l.AddRange(obstaclesToIgnoreForBundle.Select(p=>new DebugCurve(100,0.5,"green",p)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
return crossings.All(intersectionInfo => obstaclesToIgnoreForBundle.Contains((Polyline)intersectionInfo.Segment1));
}
#endif
// #if DEBUG && TEST_MSAGL
// /// <summary>
// /// check the validness of the drawing:
// /// 1. hubs are not inside loose obstacles
// /// 2. bundles do not cross loose obstacles
// /// </summary>
// internal bool HubPositionsAreOK() {
// //check polylines
// foreach (var line in metroGraphData.Metrolines) {
// var poly = line.Polyline;
// foreach (var p in poly.PolylinePoints)
// Debug.Assert(metroGraphData.PointToStations.ContainsKey(p.Point));
// }
//
// foreach (var station in metroGraphData.Stations) {
//
// if (!station.IsRealNode && !HubAvoidsObstacles(station.Position, 0, obstaclesToIgnore(station))) {
// if (LayoutAlgorithmSettings.ShowDebugCurvesEnumeration != null) {
// HubDebugger.ShowHubs(metroGraphData, bundlingSettings, station);
// ShowStationWithObstaclesToIgnore(station, obstacleTree.AllHitItems(station.Position));
// }
// return false;
// }
// //bundles
// foreach (var adj in station.Neighbors) {
// if (ApproximateComparer.Close(adj.Position, station.Position))
// return false;
//
// if (!EdgeIsLegal(station, adj, station.Position, adj.Position)) {
// if (LayoutAlgorithmSettings.ShowDebugCurvesEnumeration != null) {
// //debug visualization
// var l = new List<DebugCurve>();
// //foreach (var st in metroGraphData.Stations) {
// // l.Add(new DebugCurve(100, 0.5, "grey", st.BoundaryCurve));
// //}
// foreach (var poly in obstaclesToIgnore(station)) {
// l.Add(new DebugCurve(100, 5, "green", poly));
// }
//
// foreach (var obstacle in obstacleTree.GetAllLeaves()) {
// l.Add(new DebugCurve(100, 1, "red", obstacle));
// }
//
// l.Add(new DebugCurve(1, "blue", station.BoundaryCurve));
// l.Add(new DebugCurve(1, "blue", adj.BoundaryCurve));
//
// l.Add(new DebugCurve(1, "blue", new LineSegment(adj.Position, adj.Neighbors.First().Position)));
// l.Add(new DebugCurve(1, "blue", new LineSegment(station.Position, adj.Position)));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// //end debug visualization
// return false;
// }
// }
// }
// }
//
// return true;
// }
//
// void ShowStationWithObstaclesToIgnore(Station station, IEnumerable<Polyline> allHitItems) {
// var l = new List<DebugCurve>();
// foreach (var poly in allHitItems) {
// l.Add(new DebugCurve(100, 0.5, "brown", poly));
// }
// if (obstaclesToIgnore(station) != null)
// foreach (var poly in obstaclesToIgnore(station))
// l.Add(new DebugCurve(100, 1, "red", poly));
//
//
// foreach (var obstacle in obstacleTree.GetAllLeaves())
// l.Add(new DebugCurve(50, 0.1, "green", obstacle));
//
// l.Add(new DebugCurve(0.1, "blue", new Ellipse(1, 1, station.Position)));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// /// <summary>
// /// edge doesn't cross obstacles
// /// NOTE: use method in CdtIntersection insetad!
// /// </summary>
// bool EdgeIsLegal(Station stationA, Station stationB, Point a, Point b) {
// var crossings = InteractiveEdgeRouter.IntersectionsOfLineAndRectangleNodeOverPolyline(new LineSegment(a, b), obstacleTree);
// Set<Polyline> obstaclesToIgnoreForBundle = ObstaclesToIgnoreForBundle(stationA, stationB);
// if (crossings.Count < 0) {
// var l = new List<DebugCurve>();
// var crossingSet = new Set<ICurve>(crossings.Select(ii => ii.Segment1));
// l.AddRange(crossingSet.Select(p=>new DebugCurve(100,1,"red",p)));
// l.AddRange(obstaclesToIgnoreForBundle.Select(p=>new DebugCurve(100,0.5,"green",p)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
// return crossings.All(intersectionInfo => obstaclesToIgnoreForBundle.Contains((Polyline)intersectionInfo.Segment1));
// }
// #endif
}
}

View file

@ -36,9 +36,9 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
/// apply a number of heuristics to improve current routing
/// </summary>
internal static void FixRouting(MetroGraphData metroGraphData, BundlingSettings bundlingSettings) {
#if DEBUG && TEST_MSAGL
Debug.Assert(metroGraphData.looseIntersections.HubPositionsAreOK());
#endif
// #if DEBUG && TEST_MSAGL
// Debug.Assert(metroGraphData.looseIntersections.HubPositionsAreOK());
// #endif
//TimeMeasurer.DebugOutput("Initial cost = " + CostCalculator.Cost(metroGraphData, bundlingSettings));
//TimeMeasurer.DebugOutput("Initial cost of forces: " + CostCalculator.CostOfForces(metroGraphData, bundlingSettings));

View file

@ -321,9 +321,9 @@ namespace Microsoft.Msagl.Routing.Spline.Bundling {
List<Tuple<Point, Point>> closestPoints;
bool res = metroGraphData.cdtIntersections.BundleAvoidsObstacles(node, adj, node.Position, adj.Position, idealWidth / 2, out closestPoints);
if (!res) {
#if DEBUG&& TEST_MSAGL
HubDebugger.ShowHubs(metroGraphData, bundlingSettings, new LineSegment(node.Position, adj.Position));
#endif
// #if DEBUG&& TEST_MSAGL
// HubDebugger.ShowHubs(metroGraphData, bundlingSettings, new LineSegment(node.Position, adj.Position));
// #endif
}
//Debug.Assert(res); //todo : still unsolved

View file

@ -184,17 +184,17 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
return d > 0 ? -1 : 0;
}
#if DEBUG && TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void Showside(PolylinePoint p, Point a, Point b, PolylinePoint pn) {
ShowBothTrees(new DebugCurve(100, 1, "brown", BorderPolyline), new DebugCurve(100, 2, "blue",
new LineSegment(a, b)),
new DebugCurve(100, 2, "green",
new LineSegment(
pn.Point, p.Point)
));
}
#endif
// #if DEBUG && TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void Showside(PolylinePoint p, Point a, Point b, PolylinePoint pn) {
// ShowBothTrees(new DebugCurve(100, 1, "brown", BorderPolyline), new DebugCurve(100, 2, "blue",
// new LineSegment(a, b)),
// new DebugCurve(100, 2, "green",
// new LineSegment(
// pn.Point, p.Point)
// ));
// }
// #endif
// void CheckThatPolylineIsLegal()
// {
@ -208,20 +208,20 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
// } while (p != BorderPolyline.StartPoint);
// }
#if TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowBoundaryPolyline() {
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(CreateBoundaryPolyDebugCurves());
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
IEnumerable<DebugCurve> CreateBoundaryPolyDebugCurves() {
int i = 0;
for (var p = BorderPolyline.StartPoint; p != null; p = p.Next) {
yield return new DebugCurve(new Ellipse(1, 1, p.Point), i++);
}
}
#endif
// #if TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowBoundaryPolyline() {
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(CreateBoundaryPolyDebugCurves());
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// IEnumerable<DebugCurve> CreateBoundaryPolyDebugCurves() {
// int i = 0;
// for (var p = BorderPolyline.StartPoint; p != null; p = p.Next) {
// yield return new DebugCurve(new Ellipse(1, 1, p.Point), i++);
// }
// }
// #endif
void AddEdgeAndRemoveCone(Cone cone, Point p) {
if (Ports != null && Ports.Contains(cone.Apex))
@ -368,14 +368,14 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
#endif
Point.RayIntersectsRayInteriors(brokenConeSide.start, brokenConeSide.Direction, otherSide.Start,
otherSide.Direction, out x);
#if DEBUG && TEST_MSAGL
if (!r)
LayoutAlgorithmSettings.ShowDebugCurves(
new DebugCurve(100, 0.1, "red",new LineSegment(brokenConeSide.Start, brokenConeSide.start + brokenConeSide.Direction)),
new DebugCurve(100,0.1, "black", new Ellipse(0.1,0.1, brokenConeSide.Start)),
new DebugCurve(100, 0.1, "blue",new LineSegment(otherSide.Start, otherSide.Start + otherSide.Direction)));
Debug.Assert(r);
#endif
// #if DEBUG && TEST_MSAGL
// if (!r)
// LayoutAlgorithmSettings.ShowDebugCurves(
// new DebugCurve(100, 0.1, "red",new LineSegment(brokenConeSide.Start, brokenConeSide.start + brokenConeSide.Direction)),
// new DebugCurve(100,0.1, "black", new Ellipse(0.1,0.1, brokenConeSide.Start)),
// new DebugCurve(100, 0.1, "blue",new LineSegment(otherSide.Start, otherSide.Start + otherSide.Direction)));
// Debug.Assert(r);
// #endif
EnqueueEvent(new ConeClosureEvent(x, brokenConeSide.Cone));
}
@ -449,109 +449,109 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
AddConeAndEnqueueEvents(vertexEvent);
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static Ellipse EllipseOnVert(SweepEvent vertexEvent) {
// ReSharper restore UnusedMember.Local
return new Ellipse(5, 5, vertexEvent.Site);
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static Ellipse EllipseOnPolylinePoint(PolylinePoint pp) {
// ReSharper restore UnusedMember.Local
return EllipseOnPolylinePoint(pp, 5);
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static Ellipse EllipseOnPolylinePoint(PolylinePoint pp, double i)
// ReSharper restore UnusedMember.Local
{
return new Ellipse(i, i, pp.Point);
}
static ICurve Diamond(Point p) {
return CurveFactory.CreateDiamond(2, 2, p);
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization",
"CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"
),
System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void CheckConsistency() {
// ReSharper restore UnusedMember.Local
foreach (var s in rightConeSides) {
coneSideComparer. SetOperand(s);
if (!leftConeSides.Contains(s.Cone.LeftSide))
Console.WriteLine("bug");
}
foreach (var s in leftConeSides) {
coneSideComparer.SetOperand(s);
if (!rightConeSides.Contains(s.Cone.RightSide)) {
Console.WriteLine("bug");
PrintOutRightSegTree();
PrintOutLeftSegTree();
ShowLeftTree();
ShowRightTree();
}
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowRightTree(params ICurve[] curves) {
var l = Obstacles.Select(p => new DebugCurve(100, 5, "green", p)).ToList();
l.AddRange(rightConeSides.Select(s => new DebugCurve(100, 5, "blue",ExtendSegmentToZ(s))));
// foreach (VisibilityEdge edge in visibilityGraph.Edges)
// l.Add(BezierOnEdge(edge));
l.AddRange(curves.Select(c => new DebugCurve(100, 5, "brown", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "curves"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowBothTrees(params DebugCurve[] curves) {
var l = Obstacles.Select(p => new DebugCurve(100, 5, "green", p)).ToList();
l.AddRange(leftConeSides.Select(s => new DebugCurve(ExtendSegmentToZ(s))));
l .AddRange(rightConeSides.Select(s => new DebugCurve(ExtendSegmentToZ(s))));
// foreach (VisibilityEdge edge in visibilityGraph.Edges)
// l.Add(BezierOnEdge(edge));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
void ShowLeftTree(params ICurve[] curves) {
var l = Obstacles.Select(p => new DebugCurve(100, 0.01,"green", p)).ToList();
var range = new RealNumberSpan();
var ellipseSize = 0.01;
foreach (var s in leftConeSides) {
var curve = ExtendSegmentToZ(s);
range.AddValue(curve.Start*DirectionPerp);
range.AddValue(curve.End * DirectionPerp);
l.Add(new DebugCurve(100, 0.1, "red", curve));
l.Add(new DebugCurve(200,0.1, "black", new Ellipse(ellipseSize,ellipseSize, curve.End)));
ellipseSize += 2;
}
l.Add(DebugSweepLine(range));
// foreach (VisibilityEdge edge in visibilityGraph.Edges)
// l.Add(BezierOnEdge(edge));
l.AddRange(curves.Select(c => new DebugCurve(100, 0.5, "brown", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
DebugCurve DebugSweepLine(RealNumberSpan range) {
var ls = new LineSegment(Z * SweepDirection + DirectionPerp * range.Min, Z * SweepDirection + DirectionPerp * range.Max);
return new DebugCurve(100,0.1,"magenta", ls);
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static Ellipse EllipseOnVert(SweepEvent vertexEvent) {
// // ReSharper restore UnusedMember.Local
// return new Ellipse(5, 5, vertexEvent.Site);
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static Ellipse EllipseOnPolylinePoint(PolylinePoint pp) {
// // ReSharper restore UnusedMember.Local
// return EllipseOnPolylinePoint(pp, 5);
// }
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static Ellipse EllipseOnPolylinePoint(PolylinePoint pp, double i)
// // ReSharper restore UnusedMember.Local
// {
// return new Ellipse(i, i, pp.Point);
// }
//
// static ICurve Diamond(Point p) {
// return CurveFactory.CreateDiamond(2, 2, p);
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization",
// "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"
// ),
// System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void CheckConsistency() {
// // ReSharper restore UnusedMember.Local
// foreach (var s in rightConeSides) {
// coneSideComparer. SetOperand(s);
// if (!leftConeSides.Contains(s.Cone.LeftSide))
// Console.WriteLine("bug");
// }
// foreach (var s in leftConeSides) {
// coneSideComparer.SetOperand(s);
// if (!rightConeSides.Contains(s.Cone.RightSide)) {
// Console.WriteLine("bug");
// PrintOutRightSegTree();
// PrintOutLeftSegTree();
//
// ShowLeftTree();
// ShowRightTree();
// }
// }
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowRightTree(params ICurve[] curves) {
// var l = Obstacles.Select(p => new DebugCurve(100, 5, "green", p)).ToList();
// l.AddRange(rightConeSides.Select(s => new DebugCurve(100, 5, "blue",ExtendSegmentToZ(s))));
//
// // foreach (VisibilityEdge edge in visibilityGraph.Edges)
// // l.Add(BezierOnEdge(edge));
//
// l.AddRange(curves.Select(c => new DebugCurve(100, 5, "brown", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "curves"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowBothTrees(params DebugCurve[] curves) {
// var l = Obstacles.Select(p => new DebugCurve(100, 5, "green", p)).ToList();
// l.AddRange(leftConeSides.Select(s => new DebugCurve(ExtendSegmentToZ(s))));
// l .AddRange(rightConeSides.Select(s => new DebugCurve(ExtendSegmentToZ(s))));
//
// // foreach (VisibilityEdge edge in visibilityGraph.Edges)
// // l.Add(BezierOnEdge(edge));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// void ShowLeftTree(params ICurve[] curves) {
// var l = Obstacles.Select(p => new DebugCurve(100, 0.01,"green", p)).ToList();
// var range = new RealNumberSpan();
// var ellipseSize = 0.01;
//
// foreach (var s in leftConeSides) {
// var curve = ExtendSegmentToZ(s);
// range.AddValue(curve.Start*DirectionPerp);
// range.AddValue(curve.End * DirectionPerp);
// l.Add(new DebugCurve(100, 0.1, "red", curve));
// l.Add(new DebugCurve(200,0.1, "black", new Ellipse(ellipseSize,ellipseSize, curve.End)));
// ellipseSize += 2;
// }
// l.Add(DebugSweepLine(range));
//
// // foreach (VisibilityEdge edge in visibilityGraph.Edges)
// // l.Add(BezierOnEdge(edge));
//
// l.AddRange(curves.Select(c => new DebugCurve(100, 0.5, "brown", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// DebugCurve DebugSweepLine(RealNumberSpan range) {
// var ls = new LineSegment(Z * SweepDirection + DirectionPerp * range.Min, Z * SweepDirection + DirectionPerp * range.Max);
// return new DebugCurve(100,0.1,"magenta", ls);
// }
// #endif
void AddConeAndEnqueueEvents(VertexEvent vertexEvent) {
var leftVertexEvent = vertexEvent as LeftVertexEvent;
@ -850,13 +850,13 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
#endif
leftConeSides.Remove(coneSide);
Z = tmpZ;
#if TEST_MSAGL
if (b == null) {
PrintOutLeftSegTree();
Console.WriteLine(coneSide);
ShowLeftTree(new Ellipse(2, 2, coneSide.Start));
}
#endif
// #if TEST_MSAGL
// if (b == null) {
// PrintOutLeftSegTree();
// Console.WriteLine(coneSide);
// ShowLeftTree(new Ellipse(2, 2, coneSide.Start));
// }
// #endif
}
Debug.Assert(b != null);
@ -993,49 +993,49 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
}
#if TEST_MSAGL
internal void Show(params ICurve[] curves) {
var l = Obstacles.Select(o => new DebugCurve(100, 0.1, "blue", o)).ToList();
foreach (var s in rightConeSides) {
l.Add(new DebugCurve(0.5, "brown", ExtendSegmentToZ(s)));
if (s is BrokenConeSide)
l.Add(new DebugCurve("brown", Diamond(s.Start)));
l.Add(new DebugCurve(0.5, "green",
ExtendSegmentToZ(s.Cone.LeftSide)));
if (s.Cone.LeftSide is BrokenConeSide)
l.Add(new DebugCurve("green", Diamond(s.Cone.LeftSide.Start)));
}
// l.AddRange(
// visibilityGraph.Edges.Select(
// edge => new DebugCurve(0.2, "maroon", new LineSegment(edge.SourcePoint, edge.TargetPoint))));
l.AddRange(curves.Select(c => new DebugCurve("red", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static CubicBezierSegment BezierOnEdge(VisibilityEdge edge) {
return new CubicBezierSegment(edge.SourcePoint, 2.0 / 3.0 * edge.SourcePoint + 1.0 / 3.0 * edge.TargetPoint,
1.0 / 3.0 * edge.SourcePoint + 2.0 / 3.0 * edge.TargetPoint, edge.TargetPoint);
}
internal ICurve ExtendSegmentToZ(ConeSide segment) {
double den = segment.Direction * SweepDirection;
Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
double t = (Z + 40 - segment.Start * SweepDirection) / den;
return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
}
internal ICurve ExtendSegmentToZPlus1(ConeSide segment) {
double den = segment.Direction * SweepDirection;
Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
double t = (Z + 1 - segment.Start * SweepDirection) / den;
return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
}
#endif
// #if TEST_MSAGL
// internal void Show(params ICurve[] curves) {
// var l = Obstacles.Select(o => new DebugCurve(100, 0.1, "blue", o)).ToList();
//
// foreach (var s in rightConeSides) {
// l.Add(new DebugCurve(0.5, "brown", ExtendSegmentToZ(s)));
// if (s is BrokenConeSide)
// l.Add(new DebugCurve("brown", Diamond(s.Start)));
// l.Add(new DebugCurve(0.5, "green",
// ExtendSegmentToZ(s.Cone.LeftSide)));
// if (s.Cone.LeftSide is BrokenConeSide)
// l.Add(new DebugCurve("green", Diamond(s.Cone.LeftSide.Start)));
// }
//
// // l.AddRange(
// // visibilityGraph.Edges.Select(
// // edge => new DebugCurve(0.2, "maroon", new LineSegment(edge.SourcePoint, edge.TargetPoint))));
//
// l.AddRange(curves.Select(c => new DebugCurve("red", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static CubicBezierSegment BezierOnEdge(VisibilityEdge edge) {
// return new CubicBezierSegment(edge.SourcePoint, 2.0 / 3.0 * edge.SourcePoint + 1.0 / 3.0 * edge.TargetPoint,
// 1.0 / 3.0 * edge.SourcePoint + 2.0 / 3.0 * edge.TargetPoint, edge.TargetPoint);
// }
//
// internal ICurve ExtendSegmentToZ(ConeSide segment) {
// double den = segment.Direction * SweepDirection;
// Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
// double t = (Z + 40 - segment.Start * SweepDirection) / den;
// return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
// }
//
// internal ICurve ExtendSegmentToZPlus1(ConeSide segment) {
// double den = segment.Direction * SweepDirection;
// Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
// double t = (Z + 1 - segment.Start * SweepDirection) / den;
//
// return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
// }
// #endif
// static int count;
void GoOverConesSeeingVertexEvent(SweepEvent vertexEvent) {
@ -1057,16 +1057,16 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
coneSideComparer.SetOperand(leftConeSide);
rbNode = leftConeSides.Find(leftConeSide);
Z = tmpZ;
#if TEST_MSAGL
// if (rbNode == null) {
//GeometryGraph gg = CreateGraphFromObstacles();
//gg.Save("c:\\tmp\\bug");
// PrintOutLeftSegTree();
// Console.WriteLine(leftConeSide);
// ShowLeftTree(new Ellipse(3, 3, vertexEvent.Site));
// ShowRightTree(new Ellipse(3, 3, vertexEvent.Site));
// }
#endif
// #if TEST_MSAGL
// // if (rbNode == null) {
// //GeometryGraph gg = CreateGraphFromObstacles();
// //gg.Save("c:\\tmp\\bug");
// // PrintOutLeftSegTree();
// // Console.WriteLine(leftConeSide);
// // ShowLeftTree(new Ellipse(3, 3, vertexEvent.Site));
// // ShowRightTree(new Ellipse(3, 3, vertexEvent.Site));
// // }
// #endif
}
// the following should not happen if the containment hierarchy is correct.
// If containment is not correct it still should not result in a fatal error, just a funny looking route.
@ -1099,30 +1099,30 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
return rbNode;
}
#if TEST_MSAGL
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider",
MessageId = "System.Int32.ToString")]
internal static GeometryGraph CreateGraphFromObstacles(IEnumerable<Polyline> obstacles) {
var gg = new GeometryGraph();
foreach (var ob in obstacles) {
gg.Nodes.Add(new Node(ob.ToCurve()));
}
return gg;
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object,System.Object)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization",
"CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"
)]
void PrintOutLeftSegTree() {
Console.WriteLine("Left cone segments########");
foreach (var t in leftConeSides) {
var x = coneSideComparer.IntersectionOfSegmentAndSweepLine(t);
Console.WriteLine("{0} x={1}", t, x*DirectionPerp );
}
Console.WriteLine("##########end of left cone segments");
}
#endif
// #if TEST_MSAGL
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider",
// MessageId = "System.Int32.ToString")]
// internal static GeometryGraph CreateGraphFromObstacles(IEnumerable<Polyline> obstacles) {
// var gg = new GeometryGraph();
// foreach (var ob in obstacles) {
// gg.Nodes.Add(new Node(ob.ToCurve()));
// }
// return gg;
// }
//
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object,System.Object)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization",
// "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"
// )]
// void PrintOutLeftSegTree() {
// Console.WriteLine("Left cone segments########");
// foreach (var t in leftConeSides) {
// var x = coneSideComparer.IntersectionOfSegmentAndSweepLine(t);
//
// Console.WriteLine("{0} x={1}", t, x*DirectionPerp );
// }
// Console.WriteLine("##########end of left cone segments");
// }
// #endif
static bool VertexIsToTheLeftOfSegment(SweepEvent vertexEvent, ConeSide seg) {
return (Point.GetTriangleOrientation(seg.Start, seg.Start + seg.Direction,

View file

@ -227,117 +227,117 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
AddConeAndEnqueueEvents(vertexEvent);
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static Ellipse EllipseOnVert(SweepEvent vertexEvent) {
// ReSharper restore UnusedMember.Local
return new Ellipse(2, 2, vertexEvent.Site);
}
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static Ellipse EllipseOnPolylinePoint(PolylinePoint pp) {
// ReSharper restore UnusedMember.Local
return new Ellipse(2, 2, pp.Point);
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static Ellipse EllipseOnVert(SweepEvent vertexEvent) {
// // ReSharper restore UnusedMember.Local
// return new Ellipse(2, 2, vertexEvent.Site);
// }
//
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static Ellipse EllipseOnPolylinePoint(PolylinePoint pp) {
// // ReSharper restore UnusedMember.Local
// return new Ellipse(2, 2, pp.Point);
// }
//
// #endif
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void CheckConsistency() {
// ReSharper restore UnusedMember.Local
foreach (var s in rightConeSides) {
coneSideComparer.SetOperand(s);
if (!leftConeSides.Contains(s.Cone.LeftSide))
Console.WriteLine("bug");
}
foreach (var s in leftConeSides) {
coneSideComparer.SetOperand(s);
if (!rightConeSides.Contains(s.Cone.RightSide)) {
Console.WriteLine("bug");
PrintOutRightSegTree();
PrintOutLeftSegTree();
// ShowLeftTree();
// ShowRightTree();
}
}
}
// ReSharper disable UnusedMember.Local
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
void ShowTrees(params ICurve[] curves) {
// ReSharper restore UnusedMember.Local
var l = Obstacles.Select(c => new DebugCurve(100, 1, "blue", c));
l = l.Concat(rightConeSides.Select(s => new DebugCurve(200, 1, "brown", ExtendSegmentToZ(s))));
l = l.Concat(leftConeSides.Select(s => new DebugCurve(200, 1, "gree", ExtendSegmentToZ(s))));
l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
l =
l.Concat(
visibilityGraph.Edges.Select(e => new LineSegment(e.SourcePoint, e.TargetPoint)).Select(
c => new DebugCurve("marine", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
void ShowLeftTree(params ICurve[] curves) {
var l = Obstacles.Select(c => new DebugCurve(c));
l = l.Concat(leftConeSides.Select(s => new DebugCurve("brown", ExtendSegmentToZ(s))));
l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
void ShowRightTree(params ICurve[] curves) {
var l = Obstacles.Select(c => new DebugCurve(c));
l = l.Concat(rightConeSides.Select(s => new DebugCurve("brown", ExtendSegmentToZ(s))));
l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
// ReSharper disable UnusedMember.Global
internal void Show(params ICurve[] curves) {
// ReSharper restore UnusedMember.Global
var l = Obstacles.Select(c => new DebugCurve(100, 1, "black", c));
l = l.Concat(curves.Select(c => new DebugCurve(200, 1, "red", c)));
// foreach (var s in rightConeSides){
// l.Add(ExtendSegmentToZ(s));
// if (s is BrokenConeSide)
// l.Add(Diamond(s.Start));
// l.Add(ExtendSegmentToZ(s.Cone.LeftSide));
// }
l =
l.Concat(
visibilityGraph.Edges.Select(edge => new LineSegment(edge.SourcePoint, edge.TargetPoint)).Select(
c => new DebugCurve(100, 1, "blue", c)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
ICurve ExtendSegmentToZ(ConeSide segment) {
double den = segment.Direction * SweepDirection;
Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
double t = (Z - segment.Start * SweepDirection) / den;
return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
}
// ReSharper disable UnusedMember.Global
internal ICurve ExtendSegmentToZPlus1(ConeSide segment) {
// ReSharper restore UnusedMember.Global
double den = segment.Direction * SweepDirection;
Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
double t = (Z + 1 - segment.Start * SweepDirection) / den;
return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void CheckConsistency() {
// // ReSharper restore UnusedMember.Local
// foreach (var s in rightConeSides) {
// coneSideComparer.SetOperand(s);
// if (!leftConeSides.Contains(s.Cone.LeftSide))
// Console.WriteLine("bug");
// }
// foreach (var s in leftConeSides) {
// coneSideComparer.SetOperand(s);
// if (!rightConeSides.Contains(s.Cone.RightSide)) {
// Console.WriteLine("bug");
// PrintOutRightSegTree();
// PrintOutLeftSegTree();
//
// // ShowLeftTree();
// // ShowRightTree();
// }
// }
// }
//
// // ReSharper disable UnusedMember.Local
// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// void ShowTrees(params ICurve[] curves) {
// // ReSharper restore UnusedMember.Local
// var l = Obstacles.Select(c => new DebugCurve(100, 1, "blue", c));
// l = l.Concat(rightConeSides.Select(s => new DebugCurve(200, 1, "brown", ExtendSegmentToZ(s))));
// l = l.Concat(leftConeSides.Select(s => new DebugCurve(200, 1, "gree", ExtendSegmentToZ(s))));
// l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
// l =
// l.Concat(
// visibilityGraph.Edges.Select(e => new LineSegment(e.SourcePoint, e.TargetPoint)).Select(
// c => new DebugCurve("marine", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// void ShowLeftTree(params ICurve[] curves) {
// var l = Obstacles.Select(c => new DebugCurve(c));
// l = l.Concat(leftConeSides.Select(s => new DebugCurve("brown", ExtendSegmentToZ(s))));
// l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
//
// }
// void ShowRightTree(params ICurve[] curves) {
// var l = Obstacles.Select(c => new DebugCurve(c));
// l = l.Concat(rightConeSides.Select(s => new DebugCurve("brown", ExtendSegmentToZ(s))));
// l = l.Concat(curves.Select(c => new DebugCurve("red", c)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
//
// // ReSharper disable UnusedMember.Global
// internal void Show(params ICurve[] curves) {
// // ReSharper restore UnusedMember.Global
// var l = Obstacles.Select(c => new DebugCurve(100, 1, "black", c));
//
// l = l.Concat(curves.Select(c => new DebugCurve(200, 1, "red", c)));
// // foreach (var s in rightConeSides){
// // l.Add(ExtendSegmentToZ(s));
// // if (s is BrokenConeSide)
// // l.Add(Diamond(s.Start));
// // l.Add(ExtendSegmentToZ(s.Cone.LeftSide));
// // }
//
// l =
// l.Concat(
// visibilityGraph.Edges.Select(edge => new LineSegment(edge.SourcePoint, edge.TargetPoint)).Select(
// c => new DebugCurve(100, 1, "blue", c)));
//
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
//
// }
//
// ICurve ExtendSegmentToZ(ConeSide segment) {
// double den = segment.Direction * SweepDirection;
// Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
// double t = (Z - segment.Start * SweepDirection) / den;
//
// return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
// }
//
// // ReSharper disable UnusedMember.Global
// internal ICurve ExtendSegmentToZPlus1(ConeSide segment) {
// // ReSharper restore UnusedMember.Global
// double den = segment.Direction * SweepDirection;
// Debug.Assert(Math.Abs(den) > ApproximateComparer.DistanceEpsilon);
// double t = (Z + 1 - segment.Start * SweepDirection) / den;
//
// return new LineSegment(segment.Start, segment.Start + segment.Direction * t);
// }
// #endif
void AddConeAndEnqueueEvents(VertexEvent vertexEvent) {
var leftVertexEvent = vertexEvent as LeftVertexEvent;
@ -584,21 +584,21 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
Z = Math.Max(GetZ(coneSide.Start), Z - 0.01);
//we need to return to the past a little bit when the order was still correc
coneSideComparer.SetOperand(coneSide);
#if TEST_MSAGL
b =
#endif
// #if TEST_MSAGL
// b =
// #endif
rightConeSides.Remove(coneSide);
Z = tmpZ;
#if TEST_MSAGL
if (b == null) {
PrintOutRightSegTree();
Console.WriteLine(coneSide);
ShowRightTree(CurveFactory.CreateDiamond(3, 4, coneSide.Start));
GeometryGraph gg = CreateGraphFromObstacles(Obstacles);
GeometryGraphWriter.Write(gg, "c:\\tmp\\bug1");
}
#endif
// #if TEST_MSAGL
// if (b == null) {
// PrintOutRightSegTree();
// Console.WriteLine(coneSide);
// ShowRightTree(CurveFactory.CreateDiamond(3, 4, coneSide.Start));
// GeometryGraph gg = CreateGraphFromObstacles(Obstacles);
// GeometryGraphWriter.Write(gg, "c:\\tmp\\bug1");
// }
// #endif
}
Debug.Assert(b != null);
}
@ -614,18 +614,18 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
Z = Math.Max(GetZ(coneSide.Start), Z - 0.01);
coneSideComparer.SetOperand(coneSide);
#if TEST_MSAGL
b =
#endif
// #if TEST_MSAGL
// b =
// #endif
leftConeSides.Remove(coneSide);
Z = tmpZ;
#if TEST_MSAGL
if (b == null) {
PrintOutLeftSegTree();
Console.WriteLine(coneSide);
ShowLeftTree(new Ellipse(2, 2, coneSide.Start));
}
#endif
// #if TEST_MSAGL
// if (b == null) {
// PrintOutLeftSegTree();
// Console.WriteLine(coneSide);
// ShowLeftTree(new Ellipse(2, 2, coneSide.Start));
// }
// #endif
}
Debug.Assert(b != null);
@ -764,18 +764,18 @@ namespace Microsoft.Msagl.Routing.Spline.ConeSpanner {
Z = tmpZ;
#if TEST_MSAGL
if (rbNode == null) {
//GeometryGraph gg = CreateGraphFromObstacles();
//gg.Save("c:\\tmp\\bug");
PrintOutLeftSegTree();
Console.WriteLine(leftConeSide);
ShowLeftTree(new Ellipse(3, 3, vertexEvent.Site));
ShowRightTree(new Ellipse(3, 3, vertexEvent.Site));
}
#endif
// #if TEST_MSAGL
// if (rbNode == null) {
// //GeometryGraph gg = CreateGraphFromObstacles();
// //gg.Save("c:\\tmp\\bug");
//
//
// PrintOutLeftSegTree();
// Console.WriteLine(leftConeSide);
// ShowLeftTree(new Ellipse(3, 3, vertexEvent.Site));
// ShowRightTree(new Ellipse(3, 3, vertexEvent.Site));
// }
// #endif
}
rbNode = leftConeSides.Next(rbNode);

View file

@ -143,9 +143,9 @@ namespace Microsoft.Msagl.Routing {
/// <param name="inParentEdges"></param>
/// <param name="outParentEdges"></param>
public SplineRouter(GeometryGraph graph, double tightPadding, double loosePadding, double coneAngle, List<Edge> inParentEdges, List<Edge> outParentEdges) {
#if TEST_MSAGL
graph.CheckClusterConsistency();
#endif
// #if TEST_MSAGL
// graph.CheckClusterConsistency();
// #endif
geometryGraph = graph;
LoosePadding = loosePadding;
this.tightPadding = tightPadding;
@ -749,41 +749,41 @@ namespace Microsoft.Msagl.Routing {
}
#region debugging
#if DEBUG && TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static internal void AnotherShowMethod(VisibilityGraph visGraph,
Port sourcePort, Port targetPort, IEnumerable<Shape> obstacleShapes, ICurve curve) {
var dd = new List<DebugCurve>(
visGraph.Edges.Select(
e =>
new DebugCurve(100, 0.1, GetEdgeColor(e, sourcePort, targetPort),
new LineSegment(e.SourcePoint, e.TargetPoint))));
if (obstacleShapes != null)
dd.AddRange(
obstacleShapes.Select(s => new DebugCurve(1, s.BoundaryCurve)));
if (sourcePort != null && targetPort != null)
dd.AddRange(new[] {
new DebugCurve(CurveFactory.CreateDiamond(3, 3, sourcePort.Location)),
new DebugCurve(CurveFactory.CreateEllipse(3, 3, targetPort.Location)),
});
if (curve != null)
dd.Add(new DebugCurve(5, "purple", curve));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
}
static string GetEdgeColor(VisibilityEdge e, Port sourcePort, Port targetPort) {
if (sourcePort == null || targetPort == null)
return "green";
if (ApproximateComparer.Close(e.SourcePoint, sourcePort.Location) ||
ApproximateComparer.Close(e.SourcePoint, targetPort.Location)
|| ApproximateComparer.Close(e.TargetPoint, sourcePort.Location) ||
ApproximateComparer.Close(e.TargetPoint, targetPort.Location))
return "lightgreen";
return e.IsPassable == null || e.IsPassable() ? "green" : "red";
}
#endif
// #if DEBUG && TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static internal void AnotherShowMethod(VisibilityGraph visGraph,
// Port sourcePort, Port targetPort, IEnumerable<Shape> obstacleShapes, ICurve curve) {
// var dd = new List<DebugCurve>(
// visGraph.Edges.Select(
// e =>
// new DebugCurve(100, 0.1, GetEdgeColor(e, sourcePort, targetPort),
// new LineSegment(e.SourcePoint, e.TargetPoint))));
// if (obstacleShapes != null)
// dd.AddRange(
// obstacleShapes.Select(s => new DebugCurve(1, s.BoundaryCurve)));
// if (sourcePort != null && targetPort != null)
// dd.AddRange(new[] {
// new DebugCurve(CurveFactory.CreateDiamond(3, 3, sourcePort.Location)),
// new DebugCurve(CurveFactory.CreateEllipse(3, 3, targetPort.Location)),
// });
// if (curve != null)
// dd.Add(new DebugCurve(5, "purple", curve));
//
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(dd);
// }
//
//
// static string GetEdgeColor(VisibilityEdge e, Port sourcePort, Port targetPort) {
// if (sourcePort == null || targetPort == null)
// return "green";
// if (ApproximateComparer.Close(e.SourcePoint, sourcePort.Location) ||
// ApproximateComparer.Close(e.SourcePoint, targetPort.Location)
// || ApproximateComparer.Close(e.TargetPoint, sourcePort.Location) ||
// ApproximateComparer.Close(e.TargetPoint, targetPort.Location))
// return "lightgreen";
// return e.IsPassable == null || e.IsPassable() ? "green" : "red";
// }
// #endif
#endregion
@ -932,21 +932,21 @@ namespace Microsoft.Msagl.Routing {
/// </summary>
internal bool Bidirectional { get; set; }
#if TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static internal void ShowVisGraph(VisibilityGraph tmpVisGraph, IEnumerable<Polyline> obstacles, IEnumerable<ICurve> greenCurves, IEnumerable<ICurve> redCurves) {
var l = new List<DebugCurve>(tmpVisGraph.Edges.Select(e => new DebugCurve(100, 1,
e.IsPassable != null && e.IsPassable() ? "green" : "black"
, new LineSegment(e.SourcePoint, e.TargetPoint))));
if (obstacles != null)
l.AddRange(obstacles.Select(p => new DebugCurve(100, 1, "brown", p)));
if (greenCurves != null)
l.AddRange(greenCurves.Select(p => new DebugCurve(100, 10, "navy", p)));
if (redCurves != null)
l.AddRange(redCurves.Select(p => new DebugCurve(100, 10, "red", p)));
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
}
#endif
// #if TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static internal void ShowVisGraph(VisibilityGraph tmpVisGraph, IEnumerable<Polyline> obstacles, IEnumerable<ICurve> greenCurves, IEnumerable<ICurve> redCurves) {
// var l = new List<DebugCurve>(tmpVisGraph.Edges.Select(e => new DebugCurve(100, 1,
// e.IsPassable != null && e.IsPassable() ? "green" : "black"
// , new LineSegment(e.SourcePoint, e.TargetPoint))));
// if (obstacles != null)
// l.AddRange(obstacles.Select(p => new DebugCurve(100, 1, "brown", p)));
// if (greenCurves != null)
// l.AddRange(greenCurves.Select(p => new DebugCurve(100, 10, "navy", p)));
// if (redCurves != null)
// l.AddRange(redCurves.Select(p => new DebugCurve(100, 10, "red", p)));
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(l);
// }
// #endif
void TryToCreateNewEdgeAndSetIsPassable(VisibilityEdge edge, Shape looseShape) {
var e = visGraph.FindEdge(edge.SourcePoint, edge.TargetPoint);
if (e != null) return;
@ -1045,19 +1045,19 @@ namespace Microsoft.Msagl.Routing {
}
#if TEST_MSAGL
// ReSharper disable UnusedMember.Local
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
static void Show(
IEnumerable<EdgeGeometry> edgeGeometries, IEnumerable<Shape> listOfShapes) {
// ReSharper restore UnusedMember.Local
var r = new Random(1);
LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(
listOfShapes.Select(s => s.BoundaryCurve).Select(
c => new DebugCurve(50, 1, DebugCurve.Colors[r.Next(DebugCurve.Colors.Length - 1)], c)).Concat(
edgeGeometries.Select(e => new DebugCurve(100, 1, "red", e.Curve))));
}
#endif
// #if TEST_MSAGL
// // ReSharper disable UnusedMember.Local
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// static void Show(
// IEnumerable<EdgeGeometry> edgeGeometries, IEnumerable<Shape> listOfShapes) {
// // ReSharper restore UnusedMember.Local
// var r = new Random(1);
// LayoutAlgorithmSettings.ShowDebugCurvesEnumeration(
// listOfShapes.Select(s => s.BoundaryCurve).Select(
// c => new DebugCurve(50, 1, DebugCurve.Colors[r.Next(DebugCurve.Colors.Length - 1)], c)).Concat(
// edgeGeometries.Select(e => new DebugCurve(100, 1, "red", e.Curve))));
// }
// #endif
internal static Dictionary<Shape, Set<Shape>> GetAncestorSetsMap(IEnumerable<Shape> shapes) {

View file

@ -267,23 +267,23 @@ namespace Microsoft.Msagl.Routing.Visibility {
return Point.SignedDoubledTriangleArea(a, v, prev)*Point.SignedDoubledTriangleArea(a, v, next) >= 0;
}
#if TEST_MSAGL
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// ReSharper disable UnusedMember.Local
void DrawActiveEdgesAndVisibleGraph() {
// ReSharper restore UnusedMember.Local
var l = new List<ICurve>();
foreach (VisibilityEdge pe in visibilityGraph.Edges)
l.Add(new LineSegment(pe.SourcePoint, pe.TargetPoint));
foreach (PolylinePoint pe in activeSidesTree)
l.Add(new LineSegment(pe.Point, pe.NextOnPolyline.Point));
l.Add(new Ellipse(0.1, 0.1, q));
LayoutAlgorithmSettings.Show(l.ToArray());
}
#endif
// #if TEST_MSAGL
// [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
// // ReSharper disable UnusedMember.Local
// void DrawActiveEdgesAndVisibleGraph() {
// // ReSharper restore UnusedMember.Local
// var l = new List<ICurve>();
// foreach (VisibilityEdge pe in visibilityGraph.Edges)
// l.Add(new LineSegment(pe.SourcePoint, pe.TargetPoint));
//
// foreach (PolylinePoint pe in activeSidesTree)
// l.Add(new LineSegment(pe.Point, pe.NextOnPolyline.Point));
// l.Add(new Ellipse(0.1, 0.1, q));
//
//
// LayoutAlgorithmSettings.Show(l.ToArray());
// }
// #endif
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
PolylinePoint GetOutgoingSide(PolylinePoint v) {

View file

@ -146,21 +146,21 @@ namespace Microsoft.Msagl.Routing.Visibility {
static public double Distance(Polygon a, Polygon b, out Point p, out Point q) {
var tp = new TangentPair(a, b);
tp.FindClosestPoints(out p, out q);
#if TEST_MSAGL
if(!ApproximateComparer.Close((p - q).Length,TestPolygonDist(a,b))) {
using(var stream = File.Open(@"c:\tmp\polygonBug",FileMode.Create)) {
var bf = new BinaryFormatter();
bf.Serialize(stream, a);
bf.Serialize(stream, b);
}
LayoutAlgorithmSettings.ShowDebugCurves(
new DebugCurve(100, 0.1, "red", a.Polyline),
new DebugCurve(100, 0.1, "blue", b.Polyline),
new DebugCurve(100, 0.1, "black", new LineSegment(p, q)));
System.Diagnostics.Debug.Fail("wrong distance between two polygons");
}
#endif
// #if TEST_MSAGL
// if(!ApproximateComparer.Close((p - q).Length,TestPolygonDist(a,b))) {
// using(var stream = File.Open(@"c:\tmp\polygonBug",FileMode.Create)) {
// var bf = new BinaryFormatter();
// bf.Serialize(stream, a);
// bf.Serialize(stream, b);
// }
//
// LayoutAlgorithmSettings.ShowDebugCurves(
// new DebugCurve(100, 0.1, "red", a.Polyline),
// new DebugCurve(100, 0.1, "blue", b.Polyline),
// new DebugCurve(100, 0.1, "black", new LineSegment(p, q)));
// System.Diagnostics.Debug.Fail("wrong distance between two polygons");
// }
// #endif
return (p - q).Length;
}

View file

@ -39,6 +39,7 @@ public class WanderController : ControllerBase, IBehavior
_data = data;
_entity = entity;
_item = item;
Task = Guid.NewGuid();
}
public new bool Update(float delta)

View file

@ -425,8 +425,8 @@ public abstract class Entity : DatabaseEntry, IMessagePackSerializationCallbackR
{
if (Parent != Guid.Empty)
{
var parent = Context.Cache.Get<Entity>(Parent);
parent.AddHeat(heat);
// var parent = Context.Cache.Get<Entity>(Parent);
// parent.AddHeat(heat);
}
else
Temperature += heat / SpecificHeat;

View file

@ -990,7 +990,7 @@ public class StrategyGameManager : MonoBehaviour
if (!TestMode)
return;
if (args.Length < 4)
if (args.Length < 3)
{
Debug.Log("Expected arguments: Wanderer count, Patroller count, Orbital count!");
return;
@ -1004,6 +1004,25 @@ public class StrategyGameManager : MonoBehaviour
return;
}
var colonyList = new List<Entity>();
int colonies;
if(!int.TryParse(args[0], out colonies))
{
Debug.Log("Argument 3: Colony count invalid");
return;
}
for (int i = 0; i < colonies; i++)
{
var loadoutData = _context.Cache.GetAll<LoadoutData>().FirstOrDefault(l => l.Name == "Orbital Colony");
if (loadoutData == null)
{
Debug.Log($"Loadout with name \"{args[1]}\" not found!");
return;
}
colonyList.Add(_context.CreateEntity(_populatedZone, _playerCorporation, loadoutData.ID));
}
int wanderers;
if(!int.TryParse(args[1], out wanderers))
{
@ -1023,6 +1042,7 @@ public class StrategyGameManager : MonoBehaviour
entity.GetBehaviors<WanderController>().First().WanderTarget = _context.Random.NextFloat() > .5f
? WanderTarget.Planets
: WanderTarget.Orbitals;
//_context.SetParent(entity, colonyList[_context.Random.NextInt(colonyList.Count)]);
}
int patrollers;
@ -1040,25 +1060,8 @@ public class StrategyGameManager : MonoBehaviour
return;
}
_context.CreateEntity(_populatedZone, _playerCorporation, loadoutData.ID);
}
int colonies;
if(!int.TryParse(args[1], out colonies))
{
Debug.Log("Argument 3: Colony count invalid");
return;
}
for (int i = 0; i < colonies; i++)
{
var loadoutData = _context.Cache.GetAll<LoadoutData>().FirstOrDefault(l => l.Name == "Orbital Colony");
if (loadoutData == null)
{
Debug.Log($"Loadout with name \"{args[1]}\" not found!");
return;
}
_context.CreateEntity(_populatedZone, _playerCorporation, loadoutData.ID);
var entity = _context.CreateEntity(_populatedZone, _playerCorporation, loadoutData.ID);
//_context.SetParent(entity, colonyList[_context.Random.NextInt(colonyList.Count)]);
}
}

View file

@ -38,8 +38,13 @@ public class ColonyTab : MonoBehaviour
_selectedHardpoint = null;
var entity = Context.Cache.Get<Entity>(_selectedColony);
entity.OnInventoryUpdate += () => PopulateScreen(entity);
PopulateScreen(entity);
Title.text = entity.Name;
UpdateGeneral(entity);
entity.OnInventoryUpdate += () => UpdateInventory(entity);
UpdateInventory(entity);
}
private void OnDisable()
@ -48,32 +53,36 @@ public class ColonyTab : MonoBehaviour
entity.ClearInventoryListeners();
}
public void PopulateScreen(Entity entity){
Title.text = entity.Name;
public void UpdateGeneral(Entity entity)
{
General.Clear();
Inventory.Clear();
Details.Clear();
var corporation = Context.Cache.Get<Corporation>(entity.Corporation);
var blueprints = corporation.UnlockedBlueprints.Select(id => Context.Cache.Get<BlueprintData>(id));
var hull = Context.Cache.Get<Gear>(entity.Hull);
var hullData = Context.Cache.Get<HullData>(hull.Data);
var capacity = Context.Evaluate(hullData.Capacity, hull, entity);
General.AddProperty("Capacity", () => $"{entity.OccupiedCapacity}/{capacity:0}");
General.AddProperty("Capacity", () => $"{entity.OccupiedCapacity}/{entity.Capacity:0}");
General.AddProperty("Mass", () => $"{entity.Mass.SignificantDigits(Context.GlobalData.SignificantDigits)}");
General.AddProperty("Temperature", () => $"{entity.Temperature:0}°K");
General.AddProperty("Energy", () => $"{entity.Energy:0}/{entity.GetBehaviors<Reactor>().First().Capacitance:0}");
General.AddProperty("Population", () => $"{entity.Population}");
General.AddSection("Personality");
foreach (var attribute in entity.Personality)
General.AddPersonalityProperty(Context.Cache.Get<PersonalityAttribute>(attribute.Key),
() => attribute.Value);
var personalityList = General.AddList("Personality");
foreach (var attribute in entity.Personality.Keys)
personalityList.AddPersonalityProperty(Context.Cache.Get<PersonalityAttribute>(attribute),
() => entity.Personality[attribute]);
General.RefreshValues();
}
public void UpdateInventory(Entity entity)
{
Inventory.Clear();
var corporation = Context.Cache.Get<Corporation>(entity.Corporation);
var blueprints = corporation.UnlockedBlueprints.Select(id => Context.Cache.Get<BlueprintData>(id));
var hull = Context.Cache.Get<Gear>(entity.Hull);
var hullData = Context.Cache.Get<HullData>(hull.Data);
// Create item data mapping for cargo similar to what Entity.GearData already does for equipped items
var cargoData = entity.Cargo.ToDictionary(id => _context.Cache.Get<ItemInstance>(id),
id => Context.Cache.Get<ItemData>(_context.Cache.Get<ItemInstance>(id).Data));
//var incompleteGear = entity.IncompleteGear.Keys.Select(id => _context.Cache.Get<Gear>(id));
// var incompleteGear = entity.IncompleteGear.Select(x =>
// {
@ -82,21 +91,35 @@ public class ColonyTab : MonoBehaviour
// var progress = (productionTime - (float) x.Value) / productionTime;
// return (gear, progress);
// });
Inventory.AddSection("Gear");
var gearList = new List<Gear>(entity.GearData.Keys.Concat(entity.IncompleteGear.Keys.Select(id => _context.Cache.Get<Gear>(id))));
var gearList = Inventory.AddList("Gear");
// Create temporary list including both equipped items and incomplete items
// This is necessary because the binding between items and hardpoints is implicit
var equippedItems = new List<Gear>(entity.GearData.Keys.Concat(entity.IncompleteGear.Keys.Select(id => _context.Cache.Get<Gear>(id))));
// Display an entry in the list for each hardpoint on the entity
foreach (var hardpoint in hullData.Hardpoints)
{
var match = gearList.FirstOrDefault(g => g.ItemData.HardpointType == hardpoint.Type);
// This corresponds to the first equipped or incomplete gear which matches the hardpoint type
var match = equippedItems.FirstOrDefault(g => g.ItemData.HardpointType == hardpoint.Type);
// These are the items in the inventory which can be equipped to the current hardpoint
var matchingCargoGear = cargoData
.Where(x => x.Value is EquippableItemData equippableItemData &&
equippableItemData.HardpointType == hardpoint.Type).Select(x=>x.Key as Gear)
.Where(x =>
x.Value is EquippableItemData equippableItemData &&
equippableItemData.HardpointType == hardpoint.Type)
.Select(x => x.Key as Gear)
.ToArray();
// There is no item in the inventory which can fill the current hardpoint
if (match == null)
{
var matchingBlueprints = blueprints.Where(bp =>
bp.FactoryItem == Guid.Empty &&
Context.Cache.Get<ItemData>(bp.Item) is GearData gearData &&
gearData.HardpointType == hardpoint.Type).ToArray();
Action<PointerEventData> onClick = null;
if (matchingCargoGear.Any() || matchingBlueprints.Any())
onClick = data =>
@ -134,13 +157,13 @@ public class ColonyTab : MonoBehaviour
ContextMenu.Show();
}
};
Inventory.AddProperty($"Empty {Enum.GetName(typeof(HardpointType), hardpoint.Type)} Hardpoint", null, onClick, matchingBlueprints.Any());
gearList.AddProperty($"Empty {Enum.GetName(typeof(HardpointType), hardpoint.Type)} Hardpoint", onClick, matchingBlueprints.Any());
}
else
{
if (entity.IncompleteGear.ContainsKey(match.ID))
{
Inventory.AddProgressField(match.Name, () =>
gearList.AddProgressField(match.Name, () =>
{
var productionTime = _context.Cache.Get<BlueprintData>(match.Blueprint).ProductionTime;
return (productionTime - (float) entity.IncompleteGear[match.ID]) / productionTime;
@ -148,7 +171,7 @@ public class ColonyTab : MonoBehaviour
}
else
{
var prop = Inventory.AddProperty(match.Name, null, _ =>
var prop = gearList.AddProperty(match.Name, null, _ =>
{
_selectedHardpoint = hardpoint;
PopulateDetails(match, entity);
@ -158,21 +181,21 @@ public class ColonyTab : MonoBehaviour
}
gearList.Remove(match);
equippedItems.Remove(match);
}
}
if(!entity.Cargo.Any())
Inventory.AddSection("No Cargo");
Inventory.AddProperty("No Cargo");
else
{
Inventory.AddSection("Cargo");
var cargoList = Inventory.AddList("Cargo");
foreach (var x in cargoData)
{
if(x.Key is SimpleCommodity simpleCommodity)
Inventory.AddProperty(x.Value.Name, () => simpleCommodity.Quantity.ToString());
cargoList.AddProperty(x.Value.Name, () => simpleCommodity.Quantity.ToString());
else
Inventory.AddProperty(x.Value.Name);
cargoList.AddProperty(x.Value.Name);
}
}
Inventory.RefreshValues();

View file

@ -19,25 +19,28 @@ public class PropertiesList : PropertiesPanel
private float _targetFoldoutRotation = 0;
private float _foldoutRotation = 0;
public bool Expanded
{
set
{
_expanded = value;
var padding = LayoutGroup.padding;
padding = new RectOffset(padding.left, padding.right, padding.top, _expanded ? ExpandedPadding : FoldedPadding);
LayoutGroup.padding = padding;
foreach (var property in Properties) property.SetActive(_expanded);
_targetFoldoutRotation = _expanded ? -90 : 0;
}
}
public void Start()
{
Button.OnClick += _ => ToggleExpand();
SetExpanded(true, true);
}
public void ToggleExpand() => Expanded = !_expanded;
public void ToggleExpand() => SetExpanded(!_expanded, false);
public void SetExpanded(bool expanded, bool force)
{
_expanded = expanded;
var padding = LayoutGroup.padding;
padding = new RectOffset(padding.left, padding.right, padding.top, _expanded ? ExpandedPadding : FoldedPadding);
LayoutGroup.padding = padding;
foreach (var property in Properties) property.SetActive(_expanded);
_targetFoldoutRotation = _expanded ? -90 : 0;
if (force)
{
_foldoutRotation = _targetFoldoutRotation;
FoldoutIcon.transform.localRotation = Quaternion.Euler(0,0, _foldoutRotation);
}
}
private void Update()
{
@ -46,31 +49,31 @@ public class PropertiesList : PropertiesPanel
FoldoutIcon.transform.localRotation = Quaternion.Euler(0,0, _foldoutRotation);
}
public override PropertyLabel AddProperty(string name, Func<string> read = null, Action<PointerEventData> onClick = null, bool radio = false)
{
var prop = base.AddProperty(name, read, onClick, radio);
prop.gameObject.SetActive(false);
return prop;
}
public override PropertiesList AddList(string name)
{
var list = base.AddList(name);
list.gameObject.SetActive(false);
return list;
}
public override RectTransform AddSection(string name)
{
var section = base.AddSection(name);
section.gameObject.SetActive(false);
return section;
}
public override PropertyButton AddButton(string name, Action<PointerEventData> onClick)
{
var button = base.AddButton(name, onClick);
button.gameObject.SetActive(false);
return button;
}
// public override PropertyLabel AddProperty(string name, Func<string> read = null, Action<PointerEventData> onClick = null, bool radio = false)
// {
// var prop = base.AddProperty(name, read, onClick, radio);
// prop.gameObject.SetActive(false);
// return prop;
// }
//
// public override PropertiesList AddList(string name)
// {
// var list = base.AddList(name);
// list.gameObject.SetActive(false);
// return list;
// }
//
// public override RectTransform AddSection(string name)
// {
// var section = base.AddSection(name);
// section.gameObject.SetActive(false);
// return section;
// }
//
// public override PropertyButton AddButton(string name, Action<PointerEventData> onClick)
// {
// var button = base.AddButton(name, onClick);
// button.gameObject.SetActive(false);
// return button;
// }
}

View file

@ -12,7 +12,8 @@ public class PropertiesPanel : MonoBehaviour
public TextMeshProUGUI Title;
public RectTransform SectionPrefab;
public PropertiesList ListPrefab;
public PropertyLabel PropertyPrefab;
public PropertyButton PropertyPrefab;
public PropertyLabel PropertyLabelPrefab;
public AttributeProperty AttributePrefab;
public InputField InputField;
public RangedFloatField RangedFloatField;
@ -52,7 +53,7 @@ public class PropertiesPanel : MonoBehaviour
SelectedChild = null;
}
public virtual RectTransform AddSection(string name)
public RectTransform AddSection(string name)
{
var section = Instantiate(SectionPrefab, transform);
section.GetComponentInChildren<TextMeshProUGUI>().text = name;
@ -60,9 +61,9 @@ public class PropertiesPanel : MonoBehaviour
return section;
}
public virtual PropertyLabel AddProperty(string name, Func<string> read = null, Action<PointerEventData> onClick = null, bool radio = false)
public PropertyLabel AddProperty(string name, Func<string> read, Action<PointerEventData> onClick = null, bool radio = false)
{
var property = Instantiate(PropertyPrefab, transform);
var property = Instantiate(PropertyLabelPrefab, transform);
property.Name.text = name;
if (radio)
{
@ -86,7 +87,32 @@ public class PropertiesPanel : MonoBehaviour
return property;
}
public virtual PropertiesList AddList(string name) //, IEnumerable<(string, Func<string>)> elements)
public PropertyButton AddProperty(string name, Action<PointerEventData> onClick = null, bool radio = false)
{
var property = Instantiate(PropertyPrefab, transform);
property.Label.text = name;
if (radio)
{
RadioSelection = true;
Buttons.Add(property.Button);
property.Button.OnClick += data =>
{
if (data.button == PointerEventData.InputButton.Left)
{
if (SelectedChild != null)
SelectedChild.CurrentState = FlatButtonState.Unselected;
SelectedChild = property.Button;
SelectedChild.CurrentState = FlatButtonState.Selected;
}
onClick?.Invoke(data);
};
}
else if(onClick!=null) property.Button.OnClick += onClick;
Properties.Add(property.gameObject);
return property;
}
public PropertiesList AddList(string name) //, IEnumerable<(string, Func<string>)> elements)
{
var list = Instantiate(ListPrefab, transform);
list.Title.text = name;

View file

@ -25,7 +25,7 @@ public class UnityGameObjectFormatter : IMessagePackFormatter<GameObject>
string path;
if (!_paths.TryGetValue(value, out path))
path = "RUNTIME_SERIALIZER_UNKNOWN_RESOURCE";
return writer.Write(path);
writer.Write(path);
#endif
}
@ -60,7 +60,7 @@ public class UnityMaterialFormatter : IMessagePackFormatter<Material>
string path;
if (!_paths.TryGetValue(value, out path))
path = "RUNTIME_SERIALIZER_UNKNOWN_RESOURCE";
return writer.Write(path);
writer.Write(path);
#endif
}
@ -95,7 +95,7 @@ public class UnitySpriteFormatter : IMessagePackFormatter<Sprite>
string path;
if (!_paths.TryGetValue(value, out path))
path = "RUNTIME_SERIALIZER_UNKNOWN_RESOURCE";
return writer.Write(path);
writer.Write(path);
#endif
}
@ -130,7 +130,7 @@ public class UnityTexture2DFormatter : IMessagePackFormatter<Texture2D>
string path;
if (!_paths.TryGetValue(value, out path))
path = "RUNTIME_SERIALIZER_UNKNOWN_RESOURCE";
return writer.Write(path);
writer.Write(path);
#endif
}

BIN
ProjectSettings/EditorBuildSettings.asset (Stored with Git LFS)

Binary file not shown.

BIN
ProjectSettings/GraphicsSettings.asset (Stored with Git LFS)

Binary file not shown.