akaaafk commited on
Commit
440eb02
·
verified ·
1 Parent(s): ddcc2ae

Add files using upload-large-folder tool

Browse files
Files changed (20) hide show
  1. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/Shaders.meta +8 -0
  2. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_leftrange.png.meta +91 -0
  3. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_playhead.png.meta +91 -0
  4. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_rightrange.png.meta +91 -0
  5. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Icons/SpriteShape@64.png.meta +107 -0
  6. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Icons/SpriteShapeController@64.png.meta +107 -0
  7. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/AssetCreation.cs +87 -0
  8. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/AssetCreation.cs.meta +11 -0
  9. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets.meta +8 -0
  10. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shape Profiles.meta +8 -0
  11. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes.meta +8 -0
  12. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/Open Sprite Shape.prefab.meta +7 -0
  13. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/SpriteShapeEdge.png.meta +132 -0
  14. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures.meta +8 -0
  15. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/GameObjectCreation.cs +110 -0
  16. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/GameObjectCreation.cs.meta +11 -0
  17. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/LICENSE.txt.meta +7 -0
  18. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Mesh.cs +500 -0
  19. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Tess.cs +746 -0
  20. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Tess.cs.meta +11 -0
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/Shaders.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 2ba760cb26319f14f86529637445de30
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_leftrange.png.meta ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9417efc47083f4a1598c1966a6345cdb
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 10
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: -1
35
+ aniso: -1
36
+ mipBias: -100
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: 1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 1
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spritePixelsToUnits: 100
49
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50
+ spriteGenerateFallbackPhysicsShape: 1
51
+ alphaUsage: 1
52
+ alphaIsTransparency: 1
53
+ spriteTessellationDetail: -1
54
+ textureType: 8
55
+ textureShape: 1
56
+ singleChannelComponent: 0
57
+ maxTextureSizeSet: 0
58
+ compressionQualitySet: 0
59
+ textureFormatSet: 0
60
+ platformSettings:
61
+ - serializedVersion: 3
62
+ buildTarget: DefaultTexturePlatform
63
+ maxTextureSize: 2048
64
+ resizeAlgorithm: 0
65
+ textureFormat: -1
66
+ textureCompression: 1
67
+ compressionQuality: 50
68
+ crunchedCompression: 0
69
+ allowsAlphaSplitting: 0
70
+ overridden: 0
71
+ androidETC2FallbackOverride: 0
72
+ forceMaximumCompressionQuality_BC6H_BC7: 1
73
+ spriteSheet:
74
+ serializedVersion: 2
75
+ sprites: []
76
+ outline: []
77
+ physicsShape: []
78
+ bones: []
79
+ spriteID: 5e97eb03825dee720800000000000000
80
+ internalID: 0
81
+ vertices: []
82
+ indices:
83
+ edges: []
84
+ weights: []
85
+ secondaryTextures: []
86
+ spritePackingTag:
87
+ pSDRemoveMatte: 0
88
+ pSDShowRemoveMatteOption: 0
89
+ userData:
90
+ assetBundleName:
91
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_playhead.png.meta ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9ea72647c24be493ba6f15a9cd2a24ae
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 10
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: -1
35
+ aniso: -1
36
+ mipBias: -100
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: 1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 1
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spritePixelsToUnits: 100
49
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50
+ spriteGenerateFallbackPhysicsShape: 1
51
+ alphaUsage: 1
52
+ alphaIsTransparency: 1
53
+ spriteTessellationDetail: -1
54
+ textureType: 8
55
+ textureShape: 1
56
+ singleChannelComponent: 0
57
+ maxTextureSizeSet: 0
58
+ compressionQualitySet: 0
59
+ textureFormatSet: 0
60
+ platformSettings:
61
+ - serializedVersion: 3
62
+ buildTarget: DefaultTexturePlatform
63
+ maxTextureSize: 2048
64
+ resizeAlgorithm: 0
65
+ textureFormat: -1
66
+ textureCompression: 1
67
+ compressionQuality: 50
68
+ crunchedCompression: 0
69
+ allowsAlphaSplitting: 0
70
+ overridden: 0
71
+ androidETC2FallbackOverride: 0
72
+ forceMaximumCompressionQuality_BC6H_BC7: 1
73
+ spriteSheet:
74
+ serializedVersion: 2
75
+ sprites: []
76
+ outline: []
77
+ physicsShape: []
78
+ bones: []
79
+ spriteID: 5e97eb03825dee720800000000000000
80
+ internalID: 0
81
+ vertices: []
82
+ indices:
83
+ edges: []
84
+ weights: []
85
+ secondaryTextures: []
86
+ spritePackingTag:
87
+ pSDRemoveMatte: 0
88
+ pSDShowRemoveMatteOption: 0
89
+ userData:
90
+ assetBundleName:
91
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Handles/ss_rightrange.png.meta ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: ee5df01235032491c8b180741ea820fe
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 10
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: -1
35
+ aniso: -1
36
+ mipBias: -100
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: 1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 1
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spritePixelsToUnits: 100
49
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50
+ spriteGenerateFallbackPhysicsShape: 1
51
+ alphaUsage: 1
52
+ alphaIsTransparency: 1
53
+ spriteTessellationDetail: -1
54
+ textureType: 8
55
+ textureShape: 1
56
+ singleChannelComponent: 0
57
+ maxTextureSizeSet: 0
58
+ compressionQualitySet: 0
59
+ textureFormatSet: 0
60
+ platformSettings:
61
+ - serializedVersion: 3
62
+ buildTarget: DefaultTexturePlatform
63
+ maxTextureSize: 2048
64
+ resizeAlgorithm: 0
65
+ textureFormat: -1
66
+ textureCompression: 1
67
+ compressionQuality: 50
68
+ crunchedCompression: 0
69
+ allowsAlphaSplitting: 0
70
+ overridden: 0
71
+ androidETC2FallbackOverride: 0
72
+ forceMaximumCompressionQuality_BC6H_BC7: 1
73
+ spriteSheet:
74
+ serializedVersion: 2
75
+ sprites: []
76
+ outline: []
77
+ physicsShape: []
78
+ bones: []
79
+ spriteID: 5e97eb03825dee720800000000000000
80
+ internalID: 0
81
+ vertices: []
82
+ indices:
83
+ edges: []
84
+ weights: []
85
+ secondaryTextures: []
86
+ spritePackingTag:
87
+ pSDRemoveMatte: 0
88
+ pSDShowRemoveMatteOption: 0
89
+ userData:
90
+ assetBundleName:
91
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Icons/SpriteShape@64.png.meta ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 0a9a0f36a52ce7f4d813fbf5d8f76a1c
3
+ timeCreated: 1505457322
4
+ licenseType: Pro
5
+ TextureImporter:
6
+ fileIDToRecycleName: {}
7
+ externalObjects: {}
8
+ serializedVersion: 4
9
+ mipmaps:
10
+ mipMapMode: 1
11
+ enableMipMap: 1
12
+ sRGBTexture: 1
13
+ linearTexture: 0
14
+ fadeOut: 0
15
+ borderMipMap: 0
16
+ mipMapsPreserveCoverage: 0
17
+ alphaTestReferenceValue: 0.5
18
+ mipMapFadeDistanceStart: 1
19
+ mipMapFadeDistanceEnd: 3
20
+ bumpmap:
21
+ convertToNormalMap: 0
22
+ externalNormalMap: 0
23
+ heightScale: 0.25
24
+ normalMapFilter: 0
25
+ isReadable: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: 1
35
+ aniso: -1
36
+ mipBias: -1
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: 1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 1
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
49
+ spritePixelsToUnits: 100
50
+ alphaUsage: 0
51
+ alphaIsTransparency: 0
52
+ spriteTessellationDetail: -1
53
+ textureType: 0
54
+ textureShape: 1
55
+ maxTextureSizeSet: 0
56
+ compressionQualitySet: 0
57
+ textureFormatSet: 0
58
+ platformSettings:
59
+ - buildTarget: DefaultTexturePlatform
60
+ maxTextureSize: 2048
61
+ resizeAlgorithm: 0
62
+ textureFormat: -1
63
+ textureCompression: 0
64
+ compressionQuality: 50
65
+ crunchedCompression: 0
66
+ allowsAlphaSplitting: 0
67
+ overridden: 0
68
+ androidETC2FallbackOverride: 0
69
+ - buildTarget: Standalone
70
+ maxTextureSize: 2048
71
+ resizeAlgorithm: 0
72
+ textureFormat: -1
73
+ textureCompression: 0
74
+ compressionQuality: 50
75
+ crunchedCompression: 0
76
+ allowsAlphaSplitting: 0
77
+ overridden: 0
78
+ androidETC2FallbackOverride: 0
79
+ - buildTarget: iPhone
80
+ maxTextureSize: 2048
81
+ resizeAlgorithm: 0
82
+ textureFormat: -1
83
+ textureCompression: 0
84
+ compressionQuality: 50
85
+ crunchedCompression: 0
86
+ allowsAlphaSplitting: 0
87
+ overridden: 0
88
+ androidETC2FallbackOverride: 0
89
+ - buildTarget: tvOS
90
+ maxTextureSize: 2048
91
+ resizeAlgorithm: 0
92
+ textureFormat: -1
93
+ textureCompression: 0
94
+ compressionQuality: 50
95
+ crunchedCompression: 0
96
+ allowsAlphaSplitting: 0
97
+ overridden: 0
98
+ androidETC2FallbackOverride: 0
99
+ spriteSheet:
100
+ serializedVersion: 2
101
+ sprites: []
102
+ outline: []
103
+ physicsShape: []
104
+ spritePackingTag:
105
+ userData:
106
+ assetBundleName:
107
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/Icons/SpriteShapeController@64.png.meta ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: d1508e1dc42abb745b24c8891a614d2a
3
+ timeCreated: 1505457322
4
+ licenseType: Pro
5
+ TextureImporter:
6
+ fileIDToRecycleName: {}
7
+ externalObjects: {}
8
+ serializedVersion: 4
9
+ mipmaps:
10
+ mipMapMode: 1
11
+ enableMipMap: 1
12
+ sRGBTexture: 1
13
+ linearTexture: 0
14
+ fadeOut: 0
15
+ borderMipMap: 0
16
+ mipMapsPreserveCoverage: 0
17
+ alphaTestReferenceValue: 0.5
18
+ mipMapFadeDistanceStart: 1
19
+ mipMapFadeDistanceEnd: 3
20
+ bumpmap:
21
+ convertToNormalMap: 0
22
+ externalNormalMap: 0
23
+ heightScale: 0.25
24
+ normalMapFilter: 0
25
+ isReadable: 0
26
+ grayScaleToAlpha: 0
27
+ generateCubemap: 6
28
+ cubemapConvolution: 0
29
+ seamlessCubemap: 0
30
+ textureFormat: 1
31
+ maxTextureSize: 2048
32
+ textureSettings:
33
+ serializedVersion: 2
34
+ filterMode: 1
35
+ aniso: -1
36
+ mipBias: -1
37
+ wrapU: 1
38
+ wrapV: 1
39
+ wrapW: 1
40
+ nPOTScale: 0
41
+ lightmap: 0
42
+ compressionQuality: 50
43
+ spriteMode: 1
44
+ spriteExtrude: 1
45
+ spriteMeshType: 1
46
+ alignment: 0
47
+ spritePivot: {x: 0.5, y: 0.5}
48
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
49
+ spritePixelsToUnits: 100
50
+ alphaUsage: 0
51
+ alphaIsTransparency: 0
52
+ spriteTessellationDetail: -1
53
+ textureType: 0
54
+ textureShape: 1
55
+ maxTextureSizeSet: 0
56
+ compressionQualitySet: 0
57
+ textureFormatSet: 0
58
+ platformSettings:
59
+ - buildTarget: DefaultTexturePlatform
60
+ maxTextureSize: 2048
61
+ resizeAlgorithm: 0
62
+ textureFormat: -1
63
+ textureCompression: 0
64
+ compressionQuality: 50
65
+ crunchedCompression: 0
66
+ allowsAlphaSplitting: 0
67
+ overridden: 0
68
+ androidETC2FallbackOverride: 0
69
+ - buildTarget: Standalone
70
+ maxTextureSize: 2048
71
+ resizeAlgorithm: 0
72
+ textureFormat: -1
73
+ textureCompression: 0
74
+ compressionQuality: 50
75
+ crunchedCompression: 0
76
+ allowsAlphaSplitting: 0
77
+ overridden: 0
78
+ androidETC2FallbackOverride: 0
79
+ - buildTarget: iPhone
80
+ maxTextureSize: 2048
81
+ resizeAlgorithm: 0
82
+ textureFormat: -1
83
+ textureCompression: 0
84
+ compressionQuality: 50
85
+ crunchedCompression: 0
86
+ allowsAlphaSplitting: 0
87
+ overridden: 0
88
+ androidETC2FallbackOverride: 0
89
+ - buildTarget: tvOS
90
+ maxTextureSize: 2048
91
+ resizeAlgorithm: 0
92
+ textureFormat: -1
93
+ textureCompression: 0
94
+ compressionQuality: 50
95
+ crunchedCompression: 0
96
+ allowsAlphaSplitting: 0
97
+ overridden: 0
98
+ androidETC2FallbackOverride: 0
99
+ spriteSheet:
100
+ serializedVersion: 2
101
+ sprites: []
102
+ outline: []
103
+ physicsShape: []
104
+ spritePackingTag:
105
+ userData:
106
+ assetBundleName:
107
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/AssetCreation.cs ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.IO;
3
+ using System.Linq;
4
+ using UnityEditor.Presets;
5
+ using UnityEditor.U2D.Common;
6
+ using UnityEngine;
7
+
8
+ namespace UnityEditor.U2D.SpriteShape
9
+ {
10
+ internal static class AssetCreation
11
+ {
12
+ const int k_SpriteShapeAssetMenuPriority = 9;
13
+ static internal Action<int, ProjectWindowCallback.EndNameEditAction, string, Texture2D, string> StartNewAssetNameEditingDelegate = ProjectWindowUtil.StartNameEditingIfProjectWindowExists;
14
+
15
+ [MenuItem("Assets/Create/2D/Sprite Shape Profile", priority = k_SpriteShapeAssetMenuPriority)]
16
+ static void MenuItem_AssetsCreate2DSpriteShapeProfile(MenuCommand menuCommand)
17
+ {
18
+ var asset = AssetDatabase.LoadAssetAtPath<UnityEngine.U2D.SpriteShape>("Packages/com.unity.2d.spriteshape/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shape Profiles/Sprite Shape Profile.asset");
19
+ var preset = new PresetType(asset);
20
+ var defaults = Preset.GetDefaultPresetsForType(preset).Count(x => x.enabled);
21
+ if (defaults == 0)
22
+ CreateAssetObject(asset);
23
+ else
24
+ CreateAssetObject<UnityEngine.U2D.SpriteShape>(null);
25
+ }
26
+
27
+ static public T CreateAssetObject<T>(T obj) where T : UnityEngine.Object
28
+ {
29
+ var assetSelectionPath = AssetDatabase.GetAssetPath(Selection.activeObject);
30
+ var isFolder = false;
31
+ if(!string.IsNullOrEmpty(assetSelectionPath))
32
+ isFolder = File.GetAttributes(assetSelectionPath).HasFlag(FileAttributes.Directory);
33
+ var path = InternalEditorBridge.GetProjectWindowActiveFolderPath();
34
+ if (isFolder)
35
+ {
36
+ path = assetSelectionPath;
37
+ }
38
+
39
+ string resourceFile = "";
40
+ string destName = "";
41
+ int instanceId = 0;
42
+ string fileName = "";
43
+ if (obj != null)
44
+ {
45
+ resourceFile = AssetDatabase.GetAssetPath(obj);
46
+ fileName = System.IO.Path.GetFileName(resourceFile);
47
+ }
48
+ else
49
+ {
50
+ obj = ObjectFactory.CreateInstance<T>();
51
+ instanceId = obj.GetInstanceID();
52
+ fileName = "Sprite Shape Profile.asset";
53
+ }
54
+ destName = AssetDatabase.GenerateUniqueAssetPath(System.IO.Path.Combine(path, fileName));
55
+ var icon = AssetPreview.GetMiniThumbnail(obj);
56
+ StartNewAssetNameEditing(resourceFile, destName, icon, instanceId);
57
+ return Selection.activeObject as T;
58
+ }
59
+
60
+ static private void StartNewAssetNameEditing(string source, string dest, Texture2D icon, int instanceId)
61
+ {
62
+ CreateAssetEndNameEditAction action = ScriptableObject.CreateInstance<CreateAssetEndNameEditAction>();
63
+ StartNewAssetNameEditingDelegate(instanceId, action, dest, icon, source);
64
+ }
65
+
66
+ internal class CreateAssetEndNameEditAction : ProjectWindowCallback.EndNameEditAction
67
+ {
68
+ public override void Action(int instanceId, string pathName, string resourceFile)
69
+ {
70
+ var uniqueName = AssetDatabase.GenerateUniqueAssetPath(pathName);
71
+ // ProjectWindowUtil.StartNameEditingIfProjectWindowExists(int instanceID, EndNameEditAction endAction, string pathName, Texture2D icon, string resourceFile)
72
+ // will reset the instanceId to Int32.MaxValue - 1 if its 0. Looks like a new trunk change ?
73
+ var validInstanceId = (instanceId != 0 && instanceId != InternalEditorBridge.GetAssetCreationInstanceID_ForNonExistingAssets());
74
+ if (!validInstanceId && !string.IsNullOrEmpty(resourceFile))
75
+ {
76
+ AssetDatabase.CopyAsset(resourceFile, uniqueName);
77
+ }
78
+ else
79
+ {
80
+ var obj = EditorUtility.InstanceIDToObject(instanceId);
81
+ AssetDatabase.CreateAsset(obj, uniqueName);
82
+ }
83
+
84
+ }
85
+ }
86
+ }
87
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/AssetCreation.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: f4901044050fd46e7a8c62a3da1f2c09
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c25bbe6bfe25b46b5a73801fe153a449
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shape Profiles.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9ec0dd685bf4644828c054d5c6ff15d3
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c311f45d67c23471eb8ec6ff391baa75
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/Open Sprite Shape.prefab.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 86ae7de409eb54f619fb1328e4d42480
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/SpriteShapeEdge.png.meta ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 0ae2b74b1edd14bb18dd7b65ae916a54
3
+ TextureImporter:
4
+ internalIDToNameTable: []
5
+ externalObjects: {}
6
+ serializedVersion: 11
7
+ mipmaps:
8
+ mipMapMode: 0
9
+ enableMipMap: 0
10
+ sRGBTexture: 1
11
+ linearTexture: 0
12
+ fadeOut: 0
13
+ borderMipMap: 0
14
+ mipMapsPreserveCoverage: 0
15
+ alphaTestReferenceValue: 0.5
16
+ mipMapFadeDistanceStart: 1
17
+ mipMapFadeDistanceEnd: 3
18
+ bumpmap:
19
+ convertToNormalMap: 0
20
+ externalNormalMap: 0
21
+ heightScale: 0.25
22
+ normalMapFilter: 0
23
+ isReadable: 0
24
+ streamingMipmaps: 0
25
+ streamingMipmapsPriority: 0
26
+ vTOnly: 0
27
+ grayScaleToAlpha: 0
28
+ generateCubemap: 6
29
+ cubemapConvolution: 0
30
+ seamlessCubemap: 0
31
+ textureFormat: 1
32
+ maxTextureSize: 2048
33
+ textureSettings:
34
+ serializedVersion: 2
35
+ filterMode: 1
36
+ aniso: -1
37
+ mipBias: -100
38
+ wrapU: 1
39
+ wrapV: 1
40
+ wrapW: 1
41
+ nPOTScale: 0
42
+ lightmap: 0
43
+ compressionQuality: 50
44
+ spriteMode: 1
45
+ spriteExtrude: 1
46
+ spriteMeshType: 0
47
+ alignment: 0
48
+ spritePivot: {x: 0.5, y: 0.5}
49
+ spritePixelsToUnits: 256
50
+ spriteBorder: {x: 64, y: 0, z: 64, w: 0}
51
+ spriteGenerateFallbackPhysicsShape: 1
52
+ alphaUsage: 1
53
+ alphaIsTransparency: 1
54
+ spriteTessellationDetail: -1
55
+ textureType: 8
56
+ textureShape: 1
57
+ singleChannelComponent: 0
58
+ flipbookRows: 1
59
+ flipbookColumns: 1
60
+ maxTextureSizeSet: 0
61
+ compressionQualitySet: 0
62
+ textureFormatSet: 0
63
+ ignorePngGamma: 0
64
+ applyGammaDecoding: 0
65
+ platformSettings:
66
+ - serializedVersion: 3
67
+ buildTarget: DefaultTexturePlatform
68
+ maxTextureSize: 2048
69
+ resizeAlgorithm: 0
70
+ textureFormat: -1
71
+ textureCompression: 1
72
+ compressionQuality: 50
73
+ crunchedCompression: 0
74
+ allowsAlphaSplitting: 0
75
+ overridden: 0
76
+ androidETC2FallbackOverride: 0
77
+ forceMaximumCompressionQuality_BC6H_BC7: 0
78
+ - serializedVersion: 3
79
+ buildTarget: Standalone
80
+ maxTextureSize: 2048
81
+ resizeAlgorithm: 0
82
+ textureFormat: -1
83
+ textureCompression: 1
84
+ compressionQuality: 50
85
+ crunchedCompression: 0
86
+ allowsAlphaSplitting: 0
87
+ overridden: 0
88
+ androidETC2FallbackOverride: 0
89
+ forceMaximumCompressionQuality_BC6H_BC7: 0
90
+ - serializedVersion: 3
91
+ buildTarget: iPhone
92
+ maxTextureSize: 2048
93
+ resizeAlgorithm: 0
94
+ textureFormat: -1
95
+ textureCompression: 1
96
+ compressionQuality: 50
97
+ crunchedCompression: 0
98
+ allowsAlphaSplitting: 0
99
+ overridden: 0
100
+ androidETC2FallbackOverride: 0
101
+ forceMaximumCompressionQuality_BC6H_BC7: 0
102
+ - serializedVersion: 3
103
+ buildTarget: Android
104
+ maxTextureSize: 2048
105
+ resizeAlgorithm: 0
106
+ textureFormat: -1
107
+ textureCompression: 1
108
+ compressionQuality: 50
109
+ crunchedCompression: 0
110
+ allowsAlphaSplitting: 0
111
+ overridden: 0
112
+ androidETC2FallbackOverride: 0
113
+ forceMaximumCompressionQuality_BC6H_BC7: 0
114
+ spriteSheet:
115
+ serializedVersion: 2
116
+ sprites: []
117
+ outline: []
118
+ physicsShape: []
119
+ bones: []
120
+ spriteID: 5e97eb03825dee720800000000000000
121
+ internalID: 0
122
+ vertices: []
123
+ indices:
124
+ edges: []
125
+ weights: []
126
+ secondaryTextures: []
127
+ spritePackingTag:
128
+ pSDRemoveMatte: 0
129
+ pSDShowRemoveMatteOption: 0
130
+ userData:
131
+ assetBundleName:
132
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/DefaultAssets/Textures.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 45c16cc47672e45fa8b2294183f3711d
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/GameObjectCreation.cs ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Linq;
3
+ using UnityEditor.Presets;
4
+ using UnityEditor.SceneManagement;
5
+ using UnityEngine;
6
+ using UnityEngine.U2D;
7
+
8
+ namespace UnityEditor.U2D.SpriteShape
9
+ {
10
+ class GameObjectCreation
11
+ {
12
+ const int k_MenuPriority = 4;
13
+ [MenuItem("GameObject/2D Object/Sprite Shape/Open Shape", false, k_MenuPriority)]
14
+ static void MenuItem_GameObject2DObjectSpriteShapeOpenShape(MenuCommand menuCommand)
15
+ {
16
+ var asset = AssetDatabase.LoadAssetAtPath<GameObject>("Packages/com.unity.2d.spriteshape/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/Open Sprite Shape.prefab") as GameObject;
17
+ var preset = new PresetType(asset.GetComponent<SpriteShapeController>());
18
+ var defaults = Preset.GetDefaultPresetsForType(preset).Count(x => x.enabled);
19
+ if(defaults == 0)
20
+ CreateGameObjectFromTemplate(asset, menuCommand);
21
+ else
22
+ {
23
+ var go = CreateGameObject("Open Sprite Shape", menuCommand, new []{typeof(SpriteShapeController)});
24
+ go.GetComponent<SpriteShapeController>().spline.isOpenEnded = true;
25
+ }
26
+ }
27
+
28
+ [MenuItem("GameObject/2D Object/Sprite Shape/Closed Shape", false, k_MenuPriority)]
29
+ static void MenuItem_GameObject2DObjectSpriteShapeClosedShape(MenuCommand menuCommand)
30
+ {
31
+ var asset = AssetDatabase.LoadAssetAtPath<GameObject>("Packages/com.unity.2d.spriteshape/Editor/ObjectMenuCreation/DefaultAssets/Sprite Shapes/Closed Sprite Shape.prefab") as GameObject;
32
+ var preset = new PresetType(asset.GetComponent<SpriteShapeController>());
33
+ var defaults = Preset.GetDefaultPresetsForType(preset).Count(x => x.enabled);
34
+ if(defaults == 0)
35
+ CreateGameObjectFromTemplate(asset, menuCommand);
36
+ else
37
+ {
38
+ var go = CreateGameObject("Closed Sprite Shape", menuCommand, new []{typeof(SpriteShapeController)});
39
+ go.GetComponent<SpriteShapeController>().spline.isOpenEnded = false;
40
+ }
41
+ }
42
+
43
+ static public GameObject CreateGameObjectFromTemplate(GameObject template, MenuCommand menuCommand)
44
+ {
45
+ var parent = menuCommand.context as GameObject;
46
+ var fileName = System.IO.Path.GetFileNameWithoutExtension(AssetDatabase.GetAssetPath(template));
47
+ var newGO = GameObject.Instantiate(template);
48
+ newGO.name = fileName;
49
+ Selection.activeObject = newGO;
50
+ Place(newGO, parent);
51
+ Undo.RegisterCreatedObjectUndo(newGO, string.Format("Create {0}", fileName));
52
+ return newGO;
53
+ }
54
+
55
+ static public GameObject CreateGameObject(string name, MenuCommand menuCommand, params Type[] components)
56
+ {
57
+ var parent = menuCommand.context as GameObject;
58
+ var newGO = ObjectFactory.CreateGameObject(name, components);
59
+ newGO.name = name;
60
+ Selection.activeObject = newGO;
61
+ Place(newGO, parent);
62
+
63
+ Undo.RegisterCreatedObjectUndo(newGO, string.Format("Create {0}", name));
64
+ return newGO;
65
+ }
66
+
67
+ internal static void Place(GameObject go, GameObject parentTransform)
68
+ {
69
+ if (parentTransform != null)
70
+ {
71
+ var transform = go.transform;
72
+ Undo.SetTransformParent(transform, parentTransform.transform, "Reparenting");
73
+ transform.localPosition = Vector3.zero;
74
+ transform.localRotation = Quaternion.identity;
75
+ transform.localScale = Vector3.one;
76
+ go.layer = parentTransform.gameObject.layer;
77
+
78
+ if (parentTransform.GetComponent<RectTransform>())
79
+ ObjectFactory.AddComponent<RectTransform>(go);
80
+ }
81
+ else
82
+ {
83
+ PlaceGameObjectInFrontOfSceneView(go);
84
+
85
+ StageUtility.PlaceGameObjectInCurrentStage(go); // may change parent
86
+ }
87
+
88
+ // Only at this point do we know the actual parent of the object and can modify its name accordingly.
89
+ GameObjectUtility.EnsureUniqueNameForSibling(go);
90
+ Undo.SetCurrentGroupName("Create " + go.name);
91
+ Selection.activeGameObject = go;
92
+ if (EditorSettings.defaultBehaviorMode == EditorBehaviorMode.Mode2D)
93
+ {
94
+ var position = go.transform.position;
95
+ position.z = 0;
96
+ go.transform.position = position;
97
+ }
98
+ }
99
+
100
+ internal static void PlaceGameObjectInFrontOfSceneView(GameObject go)
101
+ {
102
+ var view = SceneView.lastActiveSceneView;
103
+ if (view != null)
104
+ {
105
+ view.MoveToView(go.transform);
106
+ }
107
+ }
108
+ }
109
+ }
110
+
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Editor/ObjectMenuCreation/GameObjectCreation.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c0e71825dc37444988e41740332ff1bf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/LICENSE.txt.meta ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b5ea83a04894a434f9b5e5b5d91c75e5
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Mesh.cs ADDED
@@ -0,0 +1,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3
+ ** Copyright (C) 2011 Silicon Graphics, Inc.
4
+ ** All Rights Reserved.
5
+ **
6
+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ ** of this software and associated documentation files (the "Software"), to deal
8
+ ** in the Software without restriction, including without limitation the rights
9
+ ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
+ ** of the Software, and to permit persons to whom the Software is furnished to do so,
11
+ ** subject to the following conditions:
12
+ **
13
+ ** The above copyright notice including the dates of first publication and either this
14
+ ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
15
+ ** included in all copies or substantial portions of the Software.
16
+ **
17
+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
+ ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19
+ ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
20
+ ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22
+ ** OR OTHER DEALINGS IN THE SOFTWARE.
23
+ **
24
+ ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
25
+ ** be used in advertising or otherwise to promote the sale, use or other dealings in
26
+ ** this Software without prior written authorization from Silicon Graphics, Inc.
27
+ */
28
+ /*
29
+ ** Original Author: Eric Veach, July 1994.
30
+ ** libtess2: Mikko Mononen, http://code.google.com/p/libtess2/.
31
+ ** LibTessDotNet: Remi Gillig, https://github.com/speps/LibTessDotNet
32
+ */
33
+
34
+ using System;
35
+ using System.Diagnostics;
36
+
37
+ namespace Unity.SpriteShape.External
38
+ {
39
+
40
+ namespace LibTessDotNet
41
+ {
42
+ internal class Mesh : MeshUtils.Pooled<Mesh>
43
+ {
44
+ internal MeshUtils.Vertex _vHead;
45
+ internal MeshUtils.Face _fHead;
46
+ internal MeshUtils.Edge _eHead, _eHeadSym;
47
+
48
+ public Mesh()
49
+ {
50
+ var v = _vHead = MeshUtils.Vertex.Create();
51
+ var f = _fHead = MeshUtils.Face.Create();
52
+
53
+ var pair = MeshUtils.EdgePair.Create();
54
+ var e = _eHead = pair._e;
55
+ var eSym = _eHeadSym = pair._eSym;
56
+
57
+ v._next = v._prev = v;
58
+ v._anEdge = null;
59
+
60
+ f._next = f._prev = f;
61
+ f._anEdge = null;
62
+ f._trail = null;
63
+ f._marked = false;
64
+ f._inside = false;
65
+
66
+ e._next = e;
67
+ e._Sym = eSym;
68
+ e._Onext = null;
69
+ e._Lnext = null;
70
+ e._Org = null;
71
+ e._Lface = null;
72
+ e._winding = 0;
73
+ e._activeRegion = null;
74
+
75
+ eSym._next = eSym;
76
+ eSym._Sym = e;
77
+ eSym._Onext = null;
78
+ eSym._Lnext = null;
79
+ eSym._Org = null;
80
+ eSym._Lface = null;
81
+ eSym._winding = 0;
82
+ eSym._activeRegion = null;
83
+ }
84
+
85
+ public override void Reset()
86
+ {
87
+ _vHead = null;
88
+ _fHead = null;
89
+ _eHead = _eHeadSym = null;
90
+ }
91
+
92
+ public override void OnFree()
93
+ {
94
+ for (MeshUtils.Face f = _fHead._next, fNext = _fHead; f != _fHead; f = fNext)
95
+ {
96
+ fNext = f._next;
97
+ f.Free();
98
+ }
99
+ for (MeshUtils.Vertex v = _vHead._next, vNext = _vHead; v != _vHead; v = vNext)
100
+ {
101
+ vNext = v._next;
102
+ v.Free();
103
+ }
104
+ for (MeshUtils.Edge e = _eHead._next, eNext = _eHead; e != _eHead; e = eNext)
105
+ {
106
+ eNext = e._next;
107
+ e.Free();
108
+ }
109
+ }
110
+
111
+ /// <summary>
112
+ /// Creates one edge, two vertices and a loop (face).
113
+ /// The loop consists of the two new half-edges.
114
+ /// </summary>
115
+ public MeshUtils.Edge MakeEdge()
116
+ {
117
+ var e = MeshUtils.MakeEdge(_eHead);
118
+
119
+ MeshUtils.MakeVertex(e, _vHead);
120
+ MeshUtils.MakeVertex(e._Sym, _vHead);
121
+ MeshUtils.MakeFace(e, _fHead);
122
+
123
+ return e;
124
+ }
125
+
126
+ /// <summary>
127
+ /// Splice is the basic operation for changing the
128
+ /// mesh connectivity and topology. It changes the mesh so that
129
+ /// eOrg->Onext = OLD( eDst->Onext )
130
+ /// eDst->Onext = OLD( eOrg->Onext )
131
+ /// where OLD(...) means the value before the meshSplice operation.
132
+ ///
133
+ /// This can have two effects on the vertex structure:
134
+ /// - if eOrg->Org != eDst->Org, the two vertices are merged together
135
+ /// - if eOrg->Org == eDst->Org, the origin is split into two vertices
136
+ /// In both cases, eDst->Org is changed and eOrg->Org is untouched.
137
+ ///
138
+ /// Similarly (and independently) for the face structure,
139
+ /// - if eOrg->Lface == eDst->Lface, one loop is split into two
140
+ /// - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one
141
+ /// In both cases, eDst->Lface is changed and eOrg->Lface is unaffected.
142
+ ///
143
+ /// Some special cases:
144
+ /// If eDst == eOrg, the operation has no effect.
145
+ /// If eDst == eOrg->Lnext, the new face will have a single edge.
146
+ /// If eDst == eOrg->Lprev, the old face will have a single edge.
147
+ /// If eDst == eOrg->Onext, the new vertex will have a single edge.
148
+ /// If eDst == eOrg->Oprev, the old vertex will have a single edge.
149
+ /// </summary>
150
+ public void Splice(MeshUtils.Edge eOrg, MeshUtils.Edge eDst)
151
+ {
152
+ if (eOrg == eDst)
153
+ {
154
+ return;
155
+ }
156
+
157
+ bool joiningVertices = false;
158
+ if (eDst._Org != eOrg._Org)
159
+ {
160
+ // We are merging two disjoint vertices -- destroy eDst->Org
161
+ joiningVertices = true;
162
+ MeshUtils.KillVertex(eDst._Org, eOrg._Org);
163
+ }
164
+ bool joiningLoops = false;
165
+ if (eDst._Lface != eOrg._Lface)
166
+ {
167
+ // We are connecting two disjoint loops -- destroy eDst->Lface
168
+ joiningLoops = true;
169
+ MeshUtils.KillFace(eDst._Lface, eOrg._Lface);
170
+ }
171
+
172
+ // Change the edge structure
173
+ MeshUtils.Splice(eDst, eOrg);
174
+
175
+ if (!joiningVertices)
176
+ {
177
+ // We split one vertex into two -- the new vertex is eDst->Org.
178
+ // Make sure the old vertex points to a valid half-edge.
179
+ MeshUtils.MakeVertex(eDst, eOrg._Org);
180
+ eOrg._Org._anEdge = eOrg;
181
+ }
182
+ if (!joiningLoops)
183
+ {
184
+ // We split one loop into two -- the new loop is eDst->Lface.
185
+ // Make sure the old face points to a valid half-edge.
186
+ MeshUtils.MakeFace(eDst, eOrg._Lface);
187
+ eOrg._Lface._anEdge = eOrg;
188
+ }
189
+ }
190
+
191
+ /// <summary>
192
+ /// Removes the edge eDel. There are several cases:
193
+ /// if (eDel->Lface != eDel->Rface), we join two loops into one; the loop
194
+ /// eDel->Lface is deleted. Otherwise, we are splitting one loop into two;
195
+ /// the newly created loop will contain eDel->Dst. If the deletion of eDel
196
+ /// would create isolated vertices, those are deleted as well.
197
+ /// </summary>
198
+ public void Delete(MeshUtils.Edge eDel)
199
+ {
200
+ var eDelSym = eDel._Sym;
201
+
202
+ // First step: disconnect the origin vertex eDel->Org. We make all
203
+ // changes to get a consistent mesh in this "intermediate" state.
204
+
205
+ bool joiningLoops = false;
206
+ if (eDel._Lface != eDel._Rface)
207
+ {
208
+ // We are joining two loops into one -- remove the left face
209
+ joiningLoops = true;
210
+ MeshUtils.KillFace(eDel._Lface, eDel._Rface);
211
+ }
212
+
213
+ if (eDel._Onext == eDel)
214
+ {
215
+ MeshUtils.KillVertex(eDel._Org, null);
216
+ }
217
+ else
218
+ {
219
+ // Make sure that eDel->Org and eDel->Rface point to valid half-edges
220
+ eDel._Rface._anEdge = eDel._Oprev;
221
+ eDel._Org._anEdge = eDel._Onext;
222
+
223
+ MeshUtils.Splice(eDel, eDel._Oprev);
224
+
225
+ if (!joiningLoops)
226
+ {
227
+ // We are splitting one loop into two -- create a new loop for eDel.
228
+ MeshUtils.MakeFace(eDel, eDel._Lface);
229
+ }
230
+ }
231
+
232
+ // Claim: the mesh is now in a consistent state, except that eDel->Org
233
+ // may have been deleted. Now we disconnect eDel->Dst.
234
+
235
+ if (eDelSym._Onext == eDelSym)
236
+ {
237
+ MeshUtils.KillVertex(eDelSym._Org, null);
238
+ MeshUtils.KillFace(eDelSym._Lface, null);
239
+ }
240
+ else
241
+ {
242
+ // Make sure that eDel->Dst and eDel->Lface point to valid half-edges
243
+ eDel._Lface._anEdge = eDelSym._Oprev;
244
+ eDelSym._Org._anEdge = eDelSym._Onext;
245
+ MeshUtils.Splice(eDelSym, eDelSym._Oprev);
246
+ }
247
+
248
+ // Any isolated vertices or faces have already been freed.
249
+ MeshUtils.KillEdge(eDel);
250
+ }
251
+
252
+ /// <summary>
253
+ /// Creates a new edge such that eNew == eOrg.Lnext and eNew.Dst is a newly created vertex.
254
+ /// eOrg and eNew will have the same left face.
255
+ /// </summary>
256
+ public MeshUtils.Edge AddEdgeVertex(MeshUtils.Edge eOrg)
257
+ {
258
+ var eNew = MeshUtils.MakeEdge(eOrg);
259
+ var eNewSym = eNew._Sym;
260
+
261
+ // Connect the new edge appropriately
262
+ MeshUtils.Splice(eNew, eOrg._Lnext);
263
+
264
+ // Set vertex and face information
265
+ eNew._Org = eOrg._Dst;
266
+ MeshUtils.MakeVertex(eNewSym, eNew._Org);
267
+ eNew._Lface = eNewSym._Lface = eOrg._Lface;
268
+
269
+ return eNew;
270
+ }
271
+
272
+ /// <summary>
273
+ /// Splits eOrg into two edges eOrg and eNew such that eNew == eOrg.Lnext.
274
+ /// The new vertex is eOrg.Dst == eNew.Org.
275
+ /// eOrg and eNew will have the same left face.
276
+ /// </summary>
277
+ public MeshUtils.Edge SplitEdge(MeshUtils.Edge eOrg)
278
+ {
279
+ var eTmp = AddEdgeVertex(eOrg);
280
+ var eNew = eTmp._Sym;
281
+
282
+ // Disconnect eOrg from eOrg->Dst and connect it to eNew->Org
283
+ MeshUtils.Splice(eOrg._Sym, eOrg._Sym._Oprev);
284
+ MeshUtils.Splice(eOrg._Sym, eNew);
285
+
286
+ // Set the vertex and face information
287
+ eOrg._Dst = eNew._Org;
288
+ eNew._Dst._anEdge = eNew._Sym; // may have pointed to eOrg->Sym
289
+ eNew._Rface = eOrg._Rface;
290
+ eNew._winding = eOrg._winding; // copy old winding information
291
+ eNew._Sym._winding = eOrg._Sym._winding;
292
+
293
+ return eNew;
294
+ }
295
+
296
+ /// <summary>
297
+ /// Creates a new edge from eOrg->Dst to eDst->Org, and returns the corresponding half-edge eNew.
298
+ /// If eOrg->Lface == eDst->Lface, this splits one loop into two,
299
+ /// and the newly created loop is eNew->Lface. Otherwise, two disjoint
300
+ /// loops are merged into one, and the loop eDst->Lface is destroyed.
301
+ ///
302
+ /// If (eOrg == eDst), the new face will have only two edges.
303
+ /// If (eOrg->Lnext == eDst), the old face is reduced to a single edge.
304
+ /// If (eOrg->Lnext->Lnext == eDst), the old face is reduced to two edges.
305
+ /// </summary>
306
+ public MeshUtils.Edge Connect(MeshUtils.Edge eOrg, MeshUtils.Edge eDst)
307
+ {
308
+ var eNew = MeshUtils.MakeEdge(eOrg);
309
+ var eNewSym = eNew._Sym;
310
+
311
+ bool joiningLoops = false;
312
+ if (eDst._Lface != eOrg._Lface)
313
+ {
314
+ // We are connecting two disjoint loops -- destroy eDst->Lface
315
+ joiningLoops = true;
316
+ MeshUtils.KillFace(eDst._Lface, eOrg._Lface);
317
+ }
318
+
319
+ // Connect the new edge appropriately
320
+ MeshUtils.Splice(eNew, eOrg._Lnext);
321
+ MeshUtils.Splice(eNewSym, eDst);
322
+
323
+ // Set the vertex and face information
324
+ eNew._Org = eOrg._Dst;
325
+ eNewSym._Org = eDst._Org;
326
+ eNew._Lface = eNewSym._Lface = eOrg._Lface;
327
+
328
+ // Make sure the old face points to a valid half-edge
329
+ eOrg._Lface._anEdge = eNewSym;
330
+
331
+ if (!joiningLoops)
332
+ {
333
+ MeshUtils.MakeFace(eNew, eOrg._Lface);
334
+ }
335
+
336
+ return eNew;
337
+ }
338
+
339
+ /// <summary>
340
+ /// Destroys a face and removes it from the global face list. All edges of
341
+ /// fZap will have a NULL pointer as their left face. Any edges which
342
+ /// also have a NULL pointer as their right face are deleted entirely
343
+ /// (along with any isolated vertices this produces).
344
+ /// An entire mesh can be deleted by zapping its faces, one at a time,
345
+ /// in any order. Zapped faces cannot be used in further mesh operations!
346
+ /// </summary>
347
+ public void ZapFace(MeshUtils.Face fZap)
348
+ {
349
+ var eStart = fZap._anEdge;
350
+
351
+ // walk around face, deleting edges whose right face is also NULL
352
+ var eNext = eStart._Lnext;
353
+ MeshUtils.Edge e, eSym;
354
+ do {
355
+ e = eNext;
356
+ eNext = e._Lnext;
357
+
358
+ e._Lface = null;
359
+ if (e._Rface == null)
360
+ {
361
+ // delete the edge -- see TESSmeshDelete above
362
+
363
+ if (e._Onext == e)
364
+ {
365
+ MeshUtils.KillVertex(e._Org, null);
366
+ }
367
+ else
368
+ {
369
+ // Make sure that e._Org points to a valid half-edge
370
+ e._Org._anEdge = e._Onext;
371
+ MeshUtils.Splice(e, e._Oprev);
372
+ }
373
+ eSym = e._Sym;
374
+ if (eSym._Onext == eSym)
375
+ {
376
+ MeshUtils.KillVertex(eSym._Org, null);
377
+ }
378
+ else
379
+ {
380
+ // Make sure that eSym._Org points to a valid half-edge
381
+ eSym._Org._anEdge = eSym._Onext;
382
+ MeshUtils.Splice(eSym, eSym._Oprev);
383
+ }
384
+ MeshUtils.KillEdge(e);
385
+ }
386
+ } while (e != eStart);
387
+
388
+ /* delete from circular doubly-linked list */
389
+ var fPrev = fZap._prev;
390
+ var fNext = fZap._next;
391
+ fNext._prev = fPrev;
392
+ fPrev._next = fNext;
393
+
394
+ fZap.Free();
395
+ }
396
+
397
+ public void MergeConvexFaces(int maxVertsPerFace)
398
+ {
399
+ for (var f = _fHead._next; f != _fHead; f = f._next)
400
+ {
401
+ // Skip faces which are outside the result
402
+ if (!f._inside)
403
+ {
404
+ continue;
405
+ }
406
+
407
+ var eCur = f._anEdge;
408
+ var vStart = eCur._Org;
409
+
410
+ while (true)
411
+ {
412
+ var eNext = eCur._Lnext;
413
+ var eSym = eCur._Sym;
414
+
415
+ if (eSym != null && eSym._Lface != null && eSym._Lface._inside)
416
+ {
417
+ // Try to merge the neighbour faces if the resulting polygons
418
+ // does not exceed maximum number of vertices.
419
+ int curNv = f.VertsCount;
420
+ int symNv = eSym._Lface.VertsCount;
421
+ if ((curNv + symNv - 2) <= maxVertsPerFace)
422
+ {
423
+ // Merge if the resulting poly is convex.
424
+ if (Geom.VertCCW(eCur._Lprev._Org, eCur._Org, eSym._Lnext._Lnext._Org) &&
425
+ Geom.VertCCW(eSym._Lprev._Org, eSym._Org, eCur._Lnext._Lnext._Org))
426
+ {
427
+ eNext = eSym._Lnext;
428
+ Delete(eSym);
429
+ eCur = null;
430
+ }
431
+ }
432
+ }
433
+
434
+ if (eCur != null && eCur._Lnext._Org == vStart)
435
+ break;
436
+
437
+ // Continue to next edge.
438
+ eCur = eNext;
439
+ }
440
+ }
441
+ }
442
+
443
+ [Conditional("DEBUG")]
444
+ public void Check()
445
+ {
446
+ MeshUtils.Edge e;
447
+
448
+ MeshUtils.Face fPrev = _fHead, f;
449
+ for (fPrev = _fHead; (f = fPrev._next) != _fHead; fPrev = f)
450
+ {
451
+ e = f._anEdge;
452
+ do {
453
+ Debug.Assert(e._Sym != e);
454
+ Debug.Assert(e._Sym._Sym == e);
455
+ Debug.Assert(e._Lnext._Onext._Sym == e);
456
+ Debug.Assert(e._Onext._Sym._Lnext == e);
457
+ Debug.Assert(e._Lface == f);
458
+ e = e._Lnext;
459
+ } while (e != f._anEdge);
460
+ }
461
+ Debug.Assert(f._prev == fPrev && f._anEdge == null);
462
+
463
+ MeshUtils.Vertex vPrev = _vHead, v;
464
+ for (vPrev = _vHead; (v = vPrev._next) != _vHead; vPrev = v)
465
+ {
466
+ Debug.Assert(v._prev == vPrev);
467
+ e = v._anEdge;
468
+ do
469
+ {
470
+ Debug.Assert(e._Sym != e);
471
+ Debug.Assert(e._Sym._Sym == e);
472
+ Debug.Assert(e._Lnext._Onext._Sym == e);
473
+ Debug.Assert(e._Onext._Sym._Lnext == e);
474
+ Debug.Assert(e._Org == v);
475
+ e = e._Onext;
476
+ } while (e != v._anEdge);
477
+ }
478
+ Debug.Assert(v._prev == vPrev && v._anEdge == null);
479
+
480
+ MeshUtils.Edge ePrev = _eHead;
481
+ for (ePrev = _eHead; (e = ePrev._next) != _eHead; ePrev = e)
482
+ {
483
+ Debug.Assert(e._Sym._next == ePrev._Sym);
484
+ Debug.Assert(e._Sym != e);
485
+ Debug.Assert(e._Sym._Sym == e);
486
+ Debug.Assert(e._Org != null);
487
+ Debug.Assert(e._Dst != null);
488
+ Debug.Assert(e._Lnext._Onext._Sym == e);
489
+ Debug.Assert(e._Onext._Sym._Lnext == e);
490
+ }
491
+ Debug.Assert(e._Sym._next == ePrev._Sym
492
+ && e._Sym == _eHeadSym
493
+ && e._Sym._Sym == e
494
+ && e._Org == null && e._Dst == null
495
+ && e._Lface == null && e._Rface == null);
496
+ }
497
+ }
498
+ }
499
+
500
+ } // namespace Unity.VectorGraphics.External
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Tess.cs ADDED
@@ -0,0 +1,746 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3
+ ** Copyright (C) 2011 Silicon Graphics, Inc.
4
+ ** All Rights Reserved.
5
+ **
6
+ ** Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ ** of this software and associated documentation files (the "Software"), to deal
8
+ ** in the Software without restriction, including without limitation the rights
9
+ ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
+ ** of the Software, and to permit persons to whom the Software is furnished to do so,
11
+ ** subject to the following conditions:
12
+ **
13
+ ** The above copyright notice including the dates of first publication and either this
14
+ ** permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be
15
+ ** included in all copies or substantial portions of the Software.
16
+ **
17
+ ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
+ ** INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19
+ ** PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC.
20
+ ** BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22
+ ** OR OTHER DEALINGS IN THE SOFTWARE.
23
+ **
24
+ ** Except as contained in this notice, the name of Silicon Graphics, Inc. shall not
25
+ ** be used in advertising or otherwise to promote the sale, use or other dealings in
26
+ ** this Software without prior written authorization from Silicon Graphics, Inc.
27
+ */
28
+ /*
29
+ ** Original Author: Eric Veach, July 1994.
30
+ ** libtess2: Mikko Mononen, http://code.google.com/p/libtess2/.
31
+ ** LibTessDotNet: Remi Gillig, https://github.com/speps/LibTessDotNet
32
+ */
33
+
34
+ using System;
35
+ using System.Diagnostics;
36
+
37
+ namespace Unity.SpriteShape.External
38
+ {
39
+
40
+ using Real = System.Single;
41
+ namespace LibTessDotNet
42
+ {
43
+ internal enum WindingRule
44
+ {
45
+ EvenOdd,
46
+ NonZero,
47
+ Positive,
48
+ Negative,
49
+ AbsGeqTwo
50
+ }
51
+
52
+ internal enum ElementType
53
+ {
54
+ Polygons,
55
+ ConnectedPolygons,
56
+ BoundaryContours
57
+ }
58
+
59
+ internal enum ContourOrientation
60
+ {
61
+ Original,
62
+ Clockwise,
63
+ CounterClockwise
64
+ }
65
+
66
+ internal struct ContourVertex
67
+ {
68
+ public Vec3 Position;
69
+ public object Data;
70
+
71
+ public override string ToString()
72
+ {
73
+ return string.Format("{0}, {1}", Position, Data);
74
+ }
75
+ }
76
+
77
+ internal delegate object CombineCallback(Vec3 position, object[] data, Real[] weights);
78
+
79
+ internal partial class Tess
80
+ {
81
+ private Mesh _mesh;
82
+ private Vec3 _normal;
83
+ private Vec3 _sUnit;
84
+ private Vec3 _tUnit;
85
+
86
+ private Real _bminX, _bminY, _bmaxX, _bmaxY;
87
+
88
+ private WindingRule _windingRule;
89
+
90
+ private Dict<ActiveRegion> _dict;
91
+ private PriorityQueue<MeshUtils.Vertex> _pq;
92
+ private MeshUtils.Vertex _event;
93
+
94
+ private CombineCallback _combineCallback;
95
+
96
+ private ContourVertex[] _vertices;
97
+ private int _vertexCount;
98
+ private int[] _elements;
99
+ private int _elementCount;
100
+
101
+ public Vec3 Normal { get { return _normal; } set { _normal = value; } }
102
+
103
+ public Real SUnitX = 1;
104
+ public Real SUnitY = 0;
105
+ public Real SentinelCoord = 4e30f;
106
+
107
+ /// <summary>
108
+ /// If true, will remove empty (zero area) polygons.
109
+ /// </summary>
110
+ public bool NoEmptyPolygons = false;
111
+
112
+ /// <summary>
113
+ /// If true, will use pooling to reduce GC (compare performance with/without, can vary wildly).
114
+ /// </summary>
115
+ public bool UsePooling = false;
116
+
117
+ public ContourVertex[] Vertices { get { return _vertices; } }
118
+ public int VertexCount { get { return _vertexCount; } }
119
+
120
+ public int[] Elements { get { return _elements; } }
121
+ public int ElementCount { get { return _elementCount; } }
122
+
123
+ public Tess()
124
+ {
125
+ _normal = Vec3.Zero;
126
+ _bminX = _bminY = _bmaxX = _bmaxY = 0;
127
+
128
+ _windingRule = WindingRule.EvenOdd;
129
+ _mesh = null;
130
+
131
+ _vertices = null;
132
+ _vertexCount = 0;
133
+ _elements = null;
134
+ _elementCount = 0;
135
+ }
136
+
137
+ private void ComputeNormal(ref Vec3 norm)
138
+ {
139
+ var v = _mesh._vHead._next;
140
+
141
+ var minVal = new Real[3] { v._coords.X, v._coords.Y, v._coords.Z };
142
+ var minVert = new MeshUtils.Vertex[3] { v, v, v };
143
+ var maxVal = new Real[3] { v._coords.X, v._coords.Y, v._coords.Z };
144
+ var maxVert = new MeshUtils.Vertex[3] { v, v, v };
145
+
146
+ for (; v != _mesh._vHead; v = v._next)
147
+ {
148
+ if (v._coords.X < minVal[0]) { minVal[0] = v._coords.X; minVert[0] = v; }
149
+ if (v._coords.Y < minVal[1]) { minVal[1] = v._coords.Y; minVert[1] = v; }
150
+ if (v._coords.Z < minVal[2]) { minVal[2] = v._coords.Z; minVert[2] = v; }
151
+ if (v._coords.X > maxVal[0]) { maxVal[0] = v._coords.X; maxVert[0] = v; }
152
+ if (v._coords.Y > maxVal[1]) { maxVal[1] = v._coords.Y; maxVert[1] = v; }
153
+ if (v._coords.Z > maxVal[2]) { maxVal[2] = v._coords.Z; maxVert[2] = v; }
154
+ }
155
+
156
+ // Find two vertices separated by at least 1/sqrt(3) of the maximum
157
+ // distance between any two vertices
158
+ int i = 0;
159
+ if (maxVal[1] - minVal[1] > maxVal[0] - minVal[0]) { i = 1; }
160
+ if (maxVal[2] - minVal[2] > maxVal[i] - minVal[i]) { i = 2; }
161
+ if (minVal[i] >= maxVal[i])
162
+ {
163
+ // All vertices are the same -- normal doesn't matter
164
+ norm = new Vec3 { X = 0, Y = 0, Z = 1 };
165
+ return;
166
+ }
167
+
168
+ // Look for a third vertex which forms the triangle with maximum area
169
+ // (Length of normal == twice the triangle area)
170
+ Real maxLen2 = 0, tLen2;
171
+ var v1 = minVert[i];
172
+ var v2 = maxVert[i];
173
+ Vec3 d1, d2, tNorm;
174
+ Vec3.Sub(ref v1._coords, ref v2._coords, out d1);
175
+ for (v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
176
+ {
177
+ Vec3.Sub(ref v._coords, ref v2._coords, out d2);
178
+ tNorm.X = d1.Y * d2.Z - d1.Z * d2.Y;
179
+ tNorm.Y = d1.Z * d2.X - d1.X * d2.Z;
180
+ tNorm.Z = d1.X * d2.Y - d1.Y * d2.X;
181
+ tLen2 = tNorm.X*tNorm.X + tNorm.Y*tNorm.Y + tNorm.Z*tNorm.Z;
182
+ if (tLen2 > maxLen2)
183
+ {
184
+ maxLen2 = tLen2;
185
+ norm = tNorm;
186
+ }
187
+ }
188
+
189
+ if (maxLen2 <= 0.0f)
190
+ {
191
+ // All points lie on a single line -- any decent normal will do
192
+ norm = Vec3.Zero;
193
+ i = Vec3.LongAxis(ref d1);
194
+ norm[i] = 1;
195
+ }
196
+ }
197
+
198
+ private void CheckOrientation()
199
+ {
200
+ // When we compute the normal automatically, we choose the orientation
201
+ // so that the the sum of the signed areas of all contours is non-negative.
202
+ Real area = 0.0f;
203
+ for (var f = _mesh._fHead._next; f != _mesh._fHead; f = f._next)
204
+ {
205
+ if (f._anEdge._winding <= 0)
206
+ {
207
+ continue;
208
+ }
209
+ area += MeshUtils.FaceArea(f);
210
+ }
211
+ if (area < 0.0f)
212
+ {
213
+ // Reverse the orientation by flipping all the t-coordinates
214
+ for (var v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
215
+ {
216
+ v._t = -v._t;
217
+ }
218
+ Vec3.Neg(ref _tUnit);
219
+ }
220
+ }
221
+
222
+ private void ProjectPolygon()
223
+ {
224
+ var norm = _normal;
225
+
226
+ bool computedNormal = false;
227
+ if (norm.X == 0.0f && norm.Y == 0.0f && norm.Z == 0.0f)
228
+ {
229
+ ComputeNormal(ref norm);
230
+ _normal = norm;
231
+ computedNormal = true;
232
+ }
233
+
234
+ int i = Vec3.LongAxis(ref norm);
235
+
236
+ _sUnit[i] = 0;
237
+ _sUnit[(i + 1) % 3] = SUnitX;
238
+ _sUnit[(i + 2) % 3] = SUnitY;
239
+
240
+ _tUnit[i] = 0;
241
+ _tUnit[(i + 1) % 3] = norm[i] > 0.0f ? -SUnitY : SUnitY;
242
+ _tUnit[(i + 2) % 3] = norm[i] > 0.0f ? SUnitX : -SUnitX;
243
+
244
+ // Project the vertices onto the sweep plane
245
+ for (var v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
246
+ {
247
+ Vec3.Dot(ref v._coords, ref _sUnit, out v._s);
248
+ Vec3.Dot(ref v._coords, ref _tUnit, out v._t);
249
+ }
250
+ if (computedNormal)
251
+ {
252
+ CheckOrientation();
253
+ }
254
+
255
+ // Compute ST bounds.
256
+ bool first = true;
257
+ for (var v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
258
+ {
259
+ if (first)
260
+ {
261
+ _bminX = _bmaxX = v._s;
262
+ _bminY = _bmaxY = v._t;
263
+ first = false;
264
+ }
265
+ else
266
+ {
267
+ if (v._s < _bminX) _bminX = v._s;
268
+ if (v._s > _bmaxX) _bmaxX = v._s;
269
+ if (v._t < _bminY) _bminY = v._t;
270
+ if (v._t > _bmaxY) _bmaxY = v._t;
271
+ }
272
+ }
273
+ }
274
+
275
+ /// <summary>
276
+ /// TessellateMonoRegion( face ) tessellates a monotone region
277
+ /// (what else would it do??) The region must consist of a single
278
+ /// loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this
279
+ /// case means that any vertical line intersects the interior of the
280
+ /// region in a single interval.
281
+ ///
282
+ /// Tessellation consists of adding interior edges (actually pairs of
283
+ /// half-edges), to split the region into non-overlapping triangles.
284
+ ///
285
+ /// The basic idea is explained in Preparata and Shamos (which I don't
286
+ /// have handy right now), although their implementation is more
287
+ /// complicated than this one. The are two edge chains, an upper chain
288
+ /// and a lower chain. We process all vertices from both chains in order,
289
+ /// from right to left.
290
+ ///
291
+ /// The algorithm ensures that the following invariant holds after each
292
+ /// vertex is processed: the untessellated region consists of two
293
+ /// chains, where one chain (say the upper) is a single edge, and
294
+ /// the other chain is concave. The left vertex of the single edge
295
+ /// is always to the left of all vertices in the concave chain.
296
+ ///
297
+ /// Each step consists of adding the rightmost unprocessed vertex to one
298
+ /// of the two chains, and forming a fan of triangles from the rightmost
299
+ /// of two chain endpoints. Determining whether we can add each triangle
300
+ /// to the fan is a simple orientation test. By making the fan as large
301
+ /// as possible, we restore the invariant (check it yourself).
302
+ /// </summary>
303
+ private void TessellateMonoRegion(MeshUtils.Face face)
304
+ {
305
+ // All edges are oriented CCW around the boundary of the region.
306
+ // First, find the half-edge whose origin vertex is rightmost.
307
+ // Since the sweep goes from left to right, face->anEdge should
308
+ // be close to the edge we want.
309
+ var up = face._anEdge;
310
+ Debug.Assert(up._Lnext != up && up._Lnext._Lnext != up);
311
+
312
+ while (Geom.VertLeq(up._Dst, up._Org)) up = up._Lprev;
313
+ while (Geom.VertLeq(up._Org, up._Dst)) up = up._Lnext;
314
+
315
+ var lo = up._Lprev;
316
+
317
+ while (up._Lnext != lo)
318
+ {
319
+ if (Geom.VertLeq(up._Dst, lo._Org))
320
+ {
321
+ // up.Dst is on the left. It is safe to form triangles from lo.Org.
322
+ // The EdgeGoesLeft test guarantees progress even when some triangles
323
+ // are CW, given that the upper and lower chains are truly monotone.
324
+ while (lo._Lnext != up && (Geom.EdgeGoesLeft(lo._Lnext)
325
+ || Geom.EdgeSign(lo._Org, lo._Dst, lo._Lnext._Dst) <= 0.0f))
326
+ {
327
+ lo = _mesh.Connect(lo._Lnext, lo)._Sym;
328
+ }
329
+ lo = lo._Lprev;
330
+ }
331
+ else
332
+ {
333
+ // lo.Org is on the left. We can make CCW triangles from up.Dst.
334
+ while (lo._Lnext != up && (Geom.EdgeGoesRight(up._Lprev)
335
+ || Geom.EdgeSign(up._Dst, up._Org, up._Lprev._Org) >= 0.0f))
336
+ {
337
+ up = _mesh.Connect(up, up._Lprev)._Sym;
338
+ }
339
+ up = up._Lnext;
340
+ }
341
+ }
342
+
343
+ // Now lo.Org == up.Dst == the leftmost vertex. The remaining region
344
+ // can be tessellated in a fan from this leftmost vertex.
345
+ Debug.Assert(lo._Lnext != up);
346
+ while (lo._Lnext._Lnext != up)
347
+ {
348
+ lo = _mesh.Connect(lo._Lnext, lo)._Sym;
349
+ }
350
+ }
351
+
352
+ /// <summary>
353
+ /// TessellateInterior( mesh ) tessellates each region of
354
+ /// the mesh which is marked "inside" the polygon. Each such region
355
+ /// must be monotone.
356
+ /// </summary>
357
+ private void TessellateInterior()
358
+ {
359
+ MeshUtils.Face f, next;
360
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = next)
361
+ {
362
+ // Make sure we don't try to tessellate the new triangles.
363
+ next = f._next;
364
+ if (f._inside)
365
+ {
366
+ TessellateMonoRegion(f);
367
+ }
368
+ }
369
+ }
370
+
371
+ /// <summary>
372
+ /// DiscardExterior zaps (ie. sets to null) all faces
373
+ /// which are not marked "inside" the polygon. Since further mesh operations
374
+ /// on NULL faces are not allowed, the main purpose is to clean up the
375
+ /// mesh so that exterior loops are not represented in the data structure.
376
+ /// </summary>
377
+ private void DiscardExterior()
378
+ {
379
+ MeshUtils.Face f, next;
380
+
381
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = next)
382
+ {
383
+ // Since f will be destroyed, save its next pointer.
384
+ next = f._next;
385
+ if( ! f._inside ) {
386
+ _mesh.ZapFace(f);
387
+ }
388
+ }
389
+ }
390
+
391
+ /// <summary>
392
+ /// SetWindingNumber( value, keepOnlyBoundary ) resets the
393
+ /// winding numbers on all edges so that regions marked "inside" the
394
+ /// polygon have a winding number of "value", and regions outside
395
+ /// have a winding number of 0.
396
+ ///
397
+ /// If keepOnlyBoundary is TRUE, it also deletes all edges which do not
398
+ /// separate an interior region from an exterior one.
399
+ /// </summary>
400
+ private void SetWindingNumber(int value, bool keepOnlyBoundary)
401
+ {
402
+ MeshUtils.Edge e, eNext;
403
+
404
+ for (e = _mesh._eHead._next; e != _mesh._eHead; e = eNext)
405
+ {
406
+ eNext = e._next;
407
+ if (e._Rface._inside != e._Lface._inside)
408
+ {
409
+
410
+ /* This is a boundary edge (one side is interior, one is exterior). */
411
+ e._winding = (e._Lface._inside) ? value : -value;
412
+ }
413
+ else
414
+ {
415
+
416
+ /* Both regions are interior, or both are exterior. */
417
+ if (!keepOnlyBoundary)
418
+ {
419
+ e._winding = 0;
420
+ }
421
+ else
422
+ {
423
+ _mesh.Delete(e);
424
+ }
425
+ }
426
+ }
427
+
428
+ }
429
+
430
+ private int GetNeighbourFace(MeshUtils.Edge edge)
431
+ {
432
+ if (edge._Rface == null)
433
+ return MeshUtils.Undef;
434
+ if (!edge._Rface._inside)
435
+ return MeshUtils.Undef;
436
+ return edge._Rface._n;
437
+ }
438
+
439
+ private void OutputPolymesh(ElementType elementType, int polySize)
440
+ {
441
+ MeshUtils.Vertex v;
442
+ MeshUtils.Face f;
443
+ MeshUtils.Edge edge;
444
+ int maxFaceCount = 0;
445
+ int maxVertexCount = 0;
446
+ int faceVerts, i;
447
+
448
+ if (polySize < 3)
449
+ {
450
+ polySize = 3;
451
+ }
452
+ // Assume that the input data is triangles now.
453
+ // Try to merge as many polygons as possible
454
+ if (polySize > 3)
455
+ {
456
+ _mesh.MergeConvexFaces(polySize);
457
+ }
458
+
459
+ // Mark unused
460
+ for (v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
461
+ v._n = MeshUtils.Undef;
462
+
463
+ // Create unique IDs for all vertices and faces.
464
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = f._next)
465
+ {
466
+ f._n = MeshUtils.Undef;
467
+ if (!f._inside) continue;
468
+
469
+ if (NoEmptyPolygons)
470
+ {
471
+ var area = MeshUtils.FaceArea(f);
472
+ if (Math.Abs(area) < Real.Epsilon)
473
+ {
474
+ continue;
475
+ }
476
+ }
477
+
478
+ edge = f._anEdge;
479
+ faceVerts = 0;
480
+ do {
481
+ v = edge._Org;
482
+ if (v._n == MeshUtils.Undef)
483
+ {
484
+ v._n = maxVertexCount;
485
+ maxVertexCount++;
486
+ }
487
+ faceVerts++;
488
+ edge = edge._Lnext;
489
+ }
490
+ while (edge != f._anEdge);
491
+
492
+ Debug.Assert(faceVerts <= polySize);
493
+
494
+ f._n = maxFaceCount;
495
+ ++maxFaceCount;
496
+ }
497
+
498
+ _elementCount = maxFaceCount;
499
+ if (elementType == ElementType.ConnectedPolygons)
500
+ maxFaceCount *= 2;
501
+ _elements = new int[maxFaceCount * polySize];
502
+
503
+ _vertexCount = maxVertexCount;
504
+ _vertices = new ContourVertex[_vertexCount];
505
+
506
+ // Output vertices.
507
+ for (v = _mesh._vHead._next; v != _mesh._vHead; v = v._next)
508
+ {
509
+ if (v._n != MeshUtils.Undef)
510
+ {
511
+ // Store coordinate
512
+ _vertices[v._n].Position = v._coords;
513
+ _vertices[v._n].Data = v._data;
514
+ }
515
+ }
516
+
517
+ // Output indices.
518
+ int elementIndex = 0;
519
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = f._next)
520
+ {
521
+ if (!f._inside) continue;
522
+
523
+ if (NoEmptyPolygons)
524
+ {
525
+ var area = MeshUtils.FaceArea(f);
526
+ if (Math.Abs(area) < Real.Epsilon)
527
+ {
528
+ continue;
529
+ }
530
+ }
531
+
532
+ // Store polygon
533
+ edge = f._anEdge;
534
+ faceVerts = 0;
535
+ do {
536
+ v = edge._Org;
537
+ _elements[elementIndex++] = v._n;
538
+ faceVerts++;
539
+ edge = edge._Lnext;
540
+ } while (edge != f._anEdge);
541
+ // Fill unused.
542
+ for (i = faceVerts; i < polySize; ++i)
543
+ {
544
+ _elements[elementIndex++] = MeshUtils.Undef;
545
+ }
546
+
547
+ // Store polygon connectivity
548
+ if (elementType == ElementType.ConnectedPolygons)
549
+ {
550
+ edge = f._anEdge;
551
+ do
552
+ {
553
+ _elements[elementIndex++] = GetNeighbourFace(edge);
554
+ edge = edge._Lnext;
555
+ } while (edge != f._anEdge);
556
+ // Fill unused.
557
+ for (i = faceVerts; i < polySize; ++i)
558
+ {
559
+ _elements[elementIndex++] = MeshUtils.Undef;
560
+ }
561
+ }
562
+ }
563
+ }
564
+
565
+ private void OutputContours()
566
+ {
567
+ MeshUtils.Face f;
568
+ MeshUtils.Edge edge, start;
569
+ int startVert = 0;
570
+ int vertCount = 0;
571
+
572
+ _vertexCount = 0;
573
+ _elementCount = 0;
574
+
575
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = f._next)
576
+ {
577
+ if (!f._inside) continue;
578
+
579
+ start = edge = f._anEdge;
580
+ do
581
+ {
582
+ ++_vertexCount;
583
+ edge = edge._Lnext;
584
+ }
585
+ while (edge != start);
586
+
587
+ ++_elementCount;
588
+ }
589
+
590
+ _elements = new int[_elementCount * 2];
591
+ _vertices = new ContourVertex[_vertexCount];
592
+
593
+ int vertIndex = 0;
594
+ int elementIndex = 0;
595
+
596
+ startVert = 0;
597
+
598
+ for (f = _mesh._fHead._next; f != _mesh._fHead; f = f._next)
599
+ {
600
+ if (!f._inside) continue;
601
+
602
+ vertCount = 0;
603
+ start = edge = f._anEdge;
604
+ do {
605
+ _vertices[vertIndex].Position = edge._Org._coords;
606
+ _vertices[vertIndex].Data = edge._Org._data;
607
+ ++vertIndex;
608
+ ++vertCount;
609
+ edge = edge._Lnext;
610
+ } while (edge != start);
611
+
612
+ _elements[elementIndex++] = startVert;
613
+ _elements[elementIndex++] = vertCount;
614
+
615
+ startVert += vertCount;
616
+ }
617
+ }
618
+
619
+ private Real SignedArea(ContourVertex[] vertices)
620
+ {
621
+ Real area = 0.0f;
622
+
623
+ for (int i = 0; i < vertices.Length; i++)
624
+ {
625
+ var v0 = vertices[i];
626
+ var v1 = vertices[(i + 1) % vertices.Length];
627
+
628
+ area += v0.Position.X * v1.Position.Y;
629
+ area -= v0.Position.Y * v1.Position.X;
630
+ }
631
+
632
+ return 0.5f * area;
633
+ }
634
+
635
+ public void AddContour(ContourVertex[] vertices)
636
+ {
637
+ AddContour(vertices, ContourOrientation.Original);
638
+ }
639
+
640
+ public void AddContour(ContourVertex[] vertices, ContourOrientation forceOrientation)
641
+ {
642
+ if (_mesh == null)
643
+ {
644
+ _mesh = new Mesh();
645
+ }
646
+
647
+ bool reverse = false;
648
+ if (forceOrientation != ContourOrientation.Original)
649
+ {
650
+ var area = SignedArea(vertices);
651
+ reverse = (forceOrientation == ContourOrientation.Clockwise && area < 0.0f) || (forceOrientation == ContourOrientation.CounterClockwise && area > 0.0f);
652
+ }
653
+
654
+ MeshUtils.Edge e = null;
655
+ for (int i = 0; i < vertices.Length; ++i)
656
+ {
657
+ if (e == null)
658
+ {
659
+ e = _mesh.MakeEdge();
660
+ _mesh.Splice(e, e._Sym);
661
+ }
662
+ else
663
+ {
664
+ // Create a new vertex and edge which immediately follow e
665
+ // in the ordering around the left face.
666
+ _mesh.SplitEdge(e);
667
+ e = e._Lnext;
668
+ }
669
+
670
+ int index = reverse ? vertices.Length - 1 - i : i;
671
+ // The new vertex is now e._Org.
672
+ e._Org._coords = vertices[index].Position;
673
+ e._Org._data = vertices[index].Data;
674
+
675
+ // The winding of an edge says how the winding number changes as we
676
+ // cross from the edge's right face to its left face. We add the
677
+ // vertices in such an order that a CCW contour will add +1 to
678
+ // the winding number of the region inside the contour.
679
+ e._winding = 1;
680
+ e._Sym._winding = -1;
681
+ }
682
+ }
683
+
684
+ public void Tessellate(WindingRule windingRule, ElementType elementType, int polySize)
685
+ {
686
+ Tessellate(windingRule, elementType, polySize, null);
687
+ }
688
+
689
+ public void Tessellate(WindingRule windingRule, ElementType elementType, int polySize, CombineCallback combineCallback)
690
+ {
691
+ _normal = Vec3.Zero;
692
+ _vertices = null;
693
+ _elements = null;
694
+
695
+ _windingRule = windingRule;
696
+ _combineCallback = combineCallback;
697
+
698
+ if (_mesh == null)
699
+ {
700
+ return;
701
+ }
702
+
703
+ // Determine the polygon normal and project vertices onto the plane
704
+ // of the polygon.
705
+ ProjectPolygon();
706
+
707
+ // ComputeInterior computes the planar arrangement specified
708
+ // by the given contours, and further subdivides this arrangement
709
+ // into regions. Each region is marked "inside" if it belongs
710
+ // to the polygon, according to the rule given by windingRule.
711
+ // Each interior region is guaranteed be monotone.
712
+ ComputeInterior();
713
+
714
+ // If the user wants only the boundary contours, we throw away all edges
715
+ // except those which separate the interior from the exterior.
716
+ // Otherwise we tessellate all the regions marked "inside".
717
+ if (elementType == ElementType.BoundaryContours)
718
+ {
719
+ SetWindingNumber(1, true);
720
+ }
721
+ else
722
+ {
723
+ TessellateInterior();
724
+ }
725
+
726
+ _mesh.Check();
727
+
728
+ if (elementType == ElementType.BoundaryContours)
729
+ {
730
+ OutputContours();
731
+ }
732
+ else
733
+ {
734
+ OutputPolymesh(elementType, polySize);
735
+ }
736
+
737
+ if (UsePooling)
738
+ {
739
+ _mesh.Free();
740
+ }
741
+ _mesh = null;
742
+ }
743
+ }
744
+ }
745
+
746
+ } // namespace Unity.VectorGraphics.External
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.2d.spriteshape@5.1.1/Runtime/External/LibTessDotNet/Tess.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 829c254d9e402e64183afa0e99951e04
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: