File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
PearlCalculatorLib/PearlCalculationLib/Utility Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ using PearlCalculatorLib . PearlCalculationLib . Entity ;
2+ using PearlCalculatorLib . PearlCalculationLib . World ;
3+ using System ;
4+ using System . Collections . Generic ;
5+ using System . Text ;
6+
7+ namespace PearlCalculatorLib . PearlCalculationLib . Utility
8+ {
9+ public static class ListCoverterUtility
10+ {
11+ public static List < Chunk > ToChunk ( List < Space3D > list )
12+ {
13+ List < Chunk > result = new List < Chunk > ( list . Count ) ;
14+ foreach ( var item in list )
15+ result . Add ( item . ToChunk ( ) ) ;
16+ return result ;
17+ }
18+
19+ public static List < Chunk > ToChunk ( List < Entity . Entity > list )
20+ {
21+ List < Chunk > result = new List < Chunk > ( list . Count ) ;
22+ foreach ( var item in list )
23+ result . Add ( item . Position . ToChunk ( ) ) ;
24+ return result ;
25+ }
26+
27+ public static List < Chunk > ToChunk ( List < Surface2D > list )
28+ {
29+ List < Chunk > result = new List < Chunk > ( list . Count ) ;
30+ foreach ( var item in list )
31+ result . Add ( item . ToChunk ( ) ) ;
32+ return result ;
33+ }
34+
35+ public static List < Surface2D > ToSurface2D ( List < Space3D > list )
36+ {
37+ List < Surface2D > result = new List < Surface2D > ( list . Count ) ;
38+ foreach ( var item in list )
39+ result . Add ( item . ToSurface2D ( ) ) ;
40+ return result ;
41+ }
42+
43+ public static List < Surface2D > ToSurface2D ( List < Entity . Entity > list )
44+ {
45+ List < Surface2D > result = new List < Surface2D > ( list . Count ) ;
46+ foreach ( var item in list )
47+ result . Add ( item . Position . ToSurface2D ( ) ) ;
48+ return result ;
49+ }
50+ }
51+ }
You can’t perform that action at this time.
0 commit comments