com.wallstop-studios.unity-helpers 2.0.0-rc81.7 → 2.0.0-rc81.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.config/dotnet-tools.json +10 -10
- package/.csharpierignore +1 -0
- package/.csharpierrc.json +3 -0
- package/.editorconfig +184 -184
- package/.gitattributes +87 -63
- package/.githooks/pre-commit +49 -0
- package/.github/dependabot.yml +9 -9
- package/.github/workflows/csharpier.yml +135 -0
- package/.github/workflows/lint-doc-links.yml +27 -0
- package/.github/workflows/markdown-json.yml +41 -0
- package/.github/workflows/npm-publish.yml +75 -75
- package/.lychee.toml +26 -0
- package/.markdownlint.json +21 -0
- package/.markdownlintignore +8 -0
- package/.pre-commit-config.yaml +39 -22
- package/.prettierignore +22 -0
- package/.prettierrc.json +20 -0
- package/AGENTS.md +52 -0
- package/{Third Party Notices.md.meta → AGENTS.md.meta} +7 -7
- package/CHANGELOG.md.meta +7 -7
- package/DATA_STRUCTURES.md +324 -0
- package/DATA_STRUCTURES.md.meta +7 -0
- package/Docs/Images/attribute_resolution.svg +40 -0
- package/Docs/Images/attribute_resolution.svg.meta +7 -0
- package/Docs/Images/bitset.svg +47 -0
- package/Docs/Images/bitset.svg.meta +7 -0
- package/Docs/Images/concave_hull.svg +30 -0
- package/Docs/Images/concave_hull.svg.meta +7 -0
- package/Docs/Images/convex_hull.svg +29 -0
- package/Docs/Images/convex_hull.svg.meta +7 -0
- package/Docs/Images/cyclic_buffer.svg +37 -0
- package/Docs/Images/cyclic_buffer.svg.meta +7 -0
- package/Docs/Images/data_distribution_decision.svg +88 -0
- package/Docs/Images/data_distribution_decision.svg.meta +7 -0
- package/Docs/Images/deque.svg +64 -0
- package/Docs/Images/deque.svg.meta +7 -0
- package/Docs/Images/deque_queue.svg +107 -0
- package/Docs/Images/deque_queue.svg.meta +7 -0
- package/Docs/Images/disjoint_set.svg +47 -0
- package/Docs/Images/disjoint_set.svg.meta +7 -0
- package/Docs/Images/effects_pipeline.svg +59 -0
- package/Docs/Images/effects_pipeline.svg.meta +7 -0
- package/Docs/Images/geometry_edge_cases.svg +61 -0
- package/Docs/Images/geometry_edge_cases.svg.meta +7 -0
- package/Docs/Images/heap.svg +56 -0
- package/Docs/Images/heap.svg.meta +7 -0
- package/Docs/Images/kdtree_2d.svg +38 -0
- package/Docs/Images/kdtree_2d.svg.meta +7 -0
- package/Docs/Images/kdtree_3d.svg +83 -0
- package/Docs/Images/kdtree_3d.svg.meta +7 -0
- package/Docs/Images/octree_3d.svg +79 -0
- package/Docs/Images/octree_3d.svg.meta +7 -0
- package/Docs/Images/polyline_simplify.svg +18 -0
- package/Docs/Images/polyline_simplify.svg.meta +7 -0
- package/Docs/Images/quadtree_2d.svg +37 -0
- package/Docs/Images/quadtree_2d.svg.meta +7 -0
- package/Docs/Images/query_boundaries.svg +38 -0
- package/Docs/Images/query_boundaries.svg.meta +7 -0
- package/Docs/Images/random_generators.svg +105 -0
- package/Docs/Images/random_generators.svg.meta +7 -0
- package/Docs/Images/reflection_scan.svg +33 -0
- package/Docs/Images/reflection_scan.svg.meta +7 -0
- package/Docs/Images/relational_wiring.svg +75 -0
- package/Docs/Images/relational_wiring.svg.meta +7 -0
- package/Docs/Images/rtree_2d.svg +27 -0
- package/Docs/Images/rtree_2d.svg.meta +7 -0
- package/Docs/Images/rtree_3d.svg +79 -0
- package/Docs/Images/rtree_3d.svg.meta +7 -0
- package/Docs/Images/serialization_flow.svg +50 -0
- package/Docs/Images/serialization_flow.svg.meta +7 -0
- package/Docs/Images/singletons_lifecycle.svg +54 -0
- package/Docs/Images/singletons_lifecycle.svg.meta +7 -0
- package/Docs/Images/sparse_set.svg +54 -0
- package/Docs/Images/sparse_set.svg.meta +7 -0
- package/Docs/Images/trie.svg +55 -0
- package/Docs/Images/trie.svg.meta +7 -0
- package/Docs/Images.meta +8 -0
- package/Docs.meta +8 -0
- package/EDITOR_TOOLS_GUIDE.md +1976 -0
- package/EDITOR_TOOLS_GUIDE.md.meta +7 -0
- package/EFFECTS_SYSTEM.md +242 -0
- package/EFFECTS_SYSTEM.md.meta +7 -0
- package/EFFECTS_SYSTEM_TUTORIAL.md +467 -0
- package/EFFECTS_SYSTEM_TUTORIAL.md.meta +7 -0
- package/Editor/AnimationEventEditor.cs +1393 -874
- package/Editor/AnimationEventEditor.cs.meta +11 -11
- package/Editor/AssemblyInfo.cs +4 -0
- package/Editor/AssemblyInfo.cs.meta +3 -0
- package/Editor/AssetProcessors/SpriteLabelProcessor.cs +138 -111
- package/Editor/AssetProcessors/SpriteLabelProcessor.cs.meta +2 -2
- package/Editor/AssetProcessors.meta +2 -2
- package/Editor/Core/Helper/AnimationEventHelpers.cs +204 -0
- package/{Runtime/Core/DataStructure/ISpatialTree.cs.meta → Editor/Core/Helper/AnimationEventHelpers.cs.meta} +11 -11
- package/Editor/Core/Helper.meta +8 -0
- package/Editor/Core.meta +8 -0
- package/Editor/CustomDrawers/IntDropdownDrawer.cs +46 -46
- package/Editor/CustomDrawers/IntDropdownDrawer.cs.meta +2 -2
- package/Editor/CustomDrawers/StringInListeDrawer.cs +135 -135
- package/Editor/CustomDrawers/StringInListeDrawer.cs.meta +2 -2
- package/Editor/CustomDrawers/WShowIfPropertyDrawer.cs +105 -105
- package/Editor/CustomDrawers/WShowIfPropertyDrawer.cs.meta +2 -2
- package/Editor/CustomDrawers.meta +2 -2
- package/Editor/CustomEditors/MatchColliderToSpriteEditor.cs +32 -32
- package/Editor/CustomEditors/MatchColliderToSpriteEditor.cs.meta +2 -2
- package/Editor/CustomEditors/PersistentDirectoryGUI.cs +799 -799
- package/Editor/CustomEditors/PersistentDirectoryGUI.cs.meta +2 -2
- package/Editor/CustomEditors/PolygonCollider2DOptimizerEditor.cs +38 -40
- package/Editor/CustomEditors/PolygonCollider2DOptimizerEditor.cs.meta +2 -2
- package/Editor/CustomEditors/SourceFolderEntryDrawer.cs +685 -413
- package/Editor/CustomEditors/SourceFolderEntryDrawer.cs.meta +2 -2
- package/Editor/CustomEditors/TexturePlatformOverrideEntryDrawer.cs +146 -0
- package/{Runtime/Core/DataStructure/KDTree.cs.meta → Editor/CustomEditors/TexturePlatformOverrideEntryDrawer.cs.meta} +11 -11
- package/Editor/CustomEditors.meta +2 -2
- package/Editor/Extensions/SerializedPropertyExtensions.cs +217 -190
- package/Editor/Extensions/SerializedPropertyExtensions.cs.meta +2 -2
- package/Editor/Extensions/UnityExtensions.cs +50 -26
- package/Editor/Extensions/UnityExtensions.cs.meta +2 -2
- package/Editor/Extensions.meta +2 -2
- package/Editor/FitTextureSizeWindow.cs +785 -332
- package/Editor/FitTextureSizeWindow.cs.meta +2 -2
- package/Editor/Persistence/MultiFileSelectorPersistenceManager.cs +62 -0
- package/{Runtime/Core/DataStructure/QuadTree.cs.meta → Editor/Persistence/MultiFileSelectorPersistenceManager.cs.meta} +11 -11
- package/Editor/Persistence/MultiFileSelectorPersistenceWindow.cs +65 -0
- package/Editor/Persistence/MultiFileSelectorPersistenceWindow.cs.meta +11 -0
- package/Editor/Persistence.meta +8 -0
- package/Editor/PersistentDirectorySettings.cs +529 -248
- package/Editor/PersistentDirectorySettings.cs.meta +2 -2
- package/Editor/PrefabChecker.cs +1329 -741
- package/Editor/PrefabChecker.cs.meta +11 -11
- package/Editor/Sprites/AnimationCopier.cs +1518 -789
- package/Editor/Sprites/AnimationCopier.cs.meta +2 -2
- package/Editor/Sprites/AnimationCreator.cs +1532 -881
- package/Editor/Sprites/AnimationCreator.cs.meta +11 -11
- package/Editor/Sprites/AnimationViewerWindow.cs +1634 -1522
- package/Editor/Sprites/AnimationViewerWindow.cs.meta +2 -2
- package/Editor/Sprites/ScriptableSpriteAtlas.cs +251 -178
- package/Editor/Sprites/ScriptableSpriteAtlas.cs.meta +2 -2
- package/Editor/Sprites/ScriptableSpriteAtlasEditor.cs +1470 -1026
- package/Editor/Sprites/ScriptableSpriteAtlasEditor.cs.meta +2 -2
- package/Editor/Sprites/SpriteCropper.cs +1013 -523
- package/Editor/Sprites/SpriteCropper.cs.meta +2 -2
- package/Editor/Sprites/SpritePivotAdjustor.cs +605 -265
- package/Editor/Sprites/SpritePivotAdjustor.cs.meta +2 -2
- package/Editor/Sprites/SpriteSettingsApplier.cs +942 -918
- package/Editor/Sprites/SpriteSettingsApplier.cs.meta +2 -2
- package/Editor/Sprites/SpriteSettingsApplierAPI.cs +441 -0
- package/Editor/Sprites/SpriteSettingsApplierAPI.cs.meta +11 -0
- package/Editor/Sprites/SpriteSettingsProfileCollection.cs +12 -0
- package/Editor/Sprites/SpriteSettingsProfileCollection.cs.meta +11 -0
- package/Editor/Sprites/SpriteSheetAnimationCreator.cs +1586 -1537
- package/Editor/Sprites/SpriteSheetAnimationCreator.cs.meta +2 -2
- package/Editor/Sprites/TexturePlatformNameHelper.cs +78 -0
- package/Editor/Sprites/TexturePlatformNameHelper.cs.meta +11 -0
- package/Editor/Sprites/TextureResizerWizard.cs +434 -175
- package/Editor/Sprites/TextureResizerWizard.cs.meta +2 -2
- package/Editor/Sprites/TextureSettingsApplierAPI.cs +359 -0
- package/Editor/Sprites/TextureSettingsApplierAPI.cs.meta +11 -0
- package/Editor/Sprites/TextureSettingsApplierWindow.cs +605 -0
- package/Editor/Sprites/TextureSettingsApplierWindow.cs.meta +11 -0
- package/Editor/Sprites.meta +2 -2
- package/Editor/Styles/AnimationViewer.uss +115 -115
- package/Editor/Styles/AnimationViewer.uss.meta +2 -2
- package/Editor/Styles/AnimationViewer.uxml +56 -56
- package/Editor/Styles/AnimationViewer.uxml.meta +2 -2
- package/Editor/Styles/SpriteSheetAnimationCreator.uss +10 -0
- package/Editor/Styles/SpriteSheetAnimationCreator.uss.meta +11 -0
- package/Editor/Styles.meta +2 -2
- package/Editor/Tags/AttributeMetadataCacheEditor.cs +46 -0
- package/Editor/Tags/AttributeMetadataCacheEditor.cs.meta +11 -0
- package/Editor/Tags/AttributeMetadataCacheGenerator.cs +258 -0
- package/Editor/Tags/AttributeMetadataCacheGenerator.cs.meta +11 -0
- package/Editor/Tags.meta +8 -0
- package/Editor/Tools/ImageBlurTool.cs +451 -409
- package/Editor/Tools/ImageBlurTool.cs.meta +2 -2
- package/Editor/Tools.meta +2 -2
- package/Editor/Utils/DxReadOnlyPropertyDrawer.cs +26 -26
- package/Editor/Utils/DxReadOnlyPropertyDrawer.cs.meta +11 -11
- package/Editor/Utils/EditorUi.cs +228 -0
- package/Editor/Utils/EditorUi.cs.meta +11 -0
- package/Editor/Utils/EditorUtilities.cs +22 -22
- package/Editor/Utils/EditorUtilities.cs.meta +11 -11
- package/Editor/Utils/ScriptableObjectSingletonCreator.cs +633 -52
- package/Editor/Utils/ScriptableObjectSingletonCreator.cs.meta +2 -2
- package/Editor/Utils.meta +8 -8
- package/Editor/Visuals/EnhancedImageEditor.cs +160 -160
- package/Editor/Visuals/EnhancedImageEditor.cs.meta +11 -11
- package/Editor/Visuals.meta +2 -2
- package/Editor/WallstopStudios.UnityHelpers.Editor.asmdef +14 -18
- package/Editor/WallstopStudios.UnityHelpers.Editor.asmdef.meta +7 -7
- package/Editor.meta +8 -8
- package/GETTING_STARTED.md +425 -0
- package/GETTING_STARTED.md.meta +7 -0
- package/GLOSSARY.md +313 -0
- package/GLOSSARY.md.meta +7 -0
- package/HULLS.md +45 -0
- package/HULLS.md.meta +7 -0
- package/INDEX.md +429 -0
- package/INDEX.md.meta +7 -0
- package/LICENSE +21 -21
- package/LICENSE.md +7 -7
- package/LICENSE.md.meta +7 -7
- package/LICENSE.meta +7 -7
- package/MATH_AND_EXTENSIONS.md +316 -0
- package/MATH_AND_EXTENSIONS.md.meta +7 -0
- package/RANDOM_PERFORMANCE.md +140 -0
- package/RANDOM_PERFORMANCE.md.meta +7 -0
- package/README.md +3195 -188
- package/README.md.meta +7 -7
- package/REFLECTION_HELPERS.md +272 -0
- package/REFLECTION_HELPERS.md.meta +7 -0
- package/RELATIONAL_COMPONENTS.md +543 -0
- package/RELATIONAL_COMPONENTS.md.meta +7 -0
- package/Runtime/AssemblyInfo.cs +7 -0
- package/Runtime/AssemblyInfo.cs.meta +11 -0
- package/Runtime/Binaries/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/Runtime/Binaries/Microsoft.Bcl.AsyncInterfaces.dll.meta +33 -33
- package/Runtime/Binaries/Microsoft.Bcl.AsyncInterfaces.xml +499 -278
- package/Runtime/Binaries/Microsoft.Bcl.AsyncInterfaces.xml.meta +7 -7
- package/Runtime/Binaries/System.IO.Pipelines.dll +0 -0
- package/Runtime/Binaries/System.IO.Pipelines.dll.meta +33 -0
- package/Runtime/Binaries/System.IO.Pipelines.xml +702 -0
- package/Runtime/Binaries/System.IO.Pipelines.xml.meta +7 -0
- package/Runtime/Binaries/System.Text.Encodings.Web.dll +0 -0
- package/Runtime/Binaries/System.Text.Encodings.Web.dll.meta +33 -33
- package/Runtime/Binaries/System.Text.Encodings.Web.xml +1084 -1079
- package/Runtime/Binaries/System.Text.Encodings.Web.xml.meta +7 -7
- package/Runtime/Binaries/System.Text.Json.dll +0 -0
- package/Runtime/Binaries/System.Text.Json.dll.meta +33 -33
- package/Runtime/Binaries/System.Text.Json.xml +10217 -8116
- package/Runtime/Binaries/System.Text.Json.xml.meta +7 -7
- package/Runtime/Binaries.meta +8 -8
- package/Runtime/Core/Attributes/AnimationEventAttribute.cs +10 -138
- package/Runtime/Core/Attributes/AnimationEventAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/BaseRelationalComponentAttribute.cs +841 -0
- package/Runtime/Core/Attributes/BaseRelationalComponentAttribute.cs.meta +11 -0
- package/Runtime/Core/Attributes/ChildComponentAttribute.cs +284 -226
- package/Runtime/Core/Attributes/ChildComponentAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/DxReadOnlyAttribute.cs +6 -6
- package/Runtime/Core/Attributes/DxReadOnlyAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/EnumDisplayNameAttribute.cs +15 -15
- package/Runtime/Core/Attributes/EnumDisplayNameAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/IRelationalComponentAssigner.cs +36 -0
- package/Runtime/Core/Attributes/IRelationalComponentAssigner.cs.meta +11 -0
- package/Runtime/Core/Attributes/IntDropdownAttribute.cs +14 -14
- package/Runtime/Core/Attributes/IntDropdownAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/KSerializableAttribute.cs +19 -19
- package/Runtime/Core/Attributes/KSerializableAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/NotNullAttribute.cs +32 -32
- package/Runtime/Core/Attributes/NotNullAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/ParentComponentAttribute.cs +376 -0
- package/Runtime/Core/Attributes/{ParentComponent.cs.meta → ParentComponentAttribute.cs.meta} +11 -11
- package/Runtime/Core/Attributes/RelationalComponentAssigner.cs +107 -0
- package/Runtime/Core/Attributes/RelationalComponentAssigner.cs.meta +11 -0
- package/Runtime/Core/Attributes/RelationalComponentExtensions.cs +61 -14
- package/Runtime/Core/Attributes/RelationalComponentExtensions.cs.meta +11 -11
- package/Runtime/Core/Attributes/RelationalComponentInitializer.cs +331 -0
- package/Runtime/Core/Attributes/RelationalComponentInitializer.cs.meta +11 -0
- package/Runtime/Core/Attributes/ScriptableSingletonPathAttribute.cs +15 -15
- package/Runtime/Core/Attributes/ScriptableSingletonPathAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes/SiblingComponentAttribute.cs +264 -137
- package/Runtime/Core/Attributes/SiblingComponentAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/ValidateAssignmentAttribute.cs +115 -106
- package/Runtime/Core/Attributes/ValidateAssignmentAttribute.cs.meta +11 -11
- package/Runtime/Core/Attributes/ValueHelpers.cs +10 -0
- package/Runtime/Core/Attributes/ValueHelpers.cs.meta +3 -0
- package/Runtime/Core/Attributes/WShowIfAttribute.cs +24 -24
- package/Runtime/Core/Attributes/WShowIfAttribute.cs.meta +2 -2
- package/Runtime/Core/Attributes.meta +8 -8
- package/Runtime/Core/DataStructure/Adapters/FastVector2Int.cs +192 -92
- package/Runtime/Core/DataStructure/Adapters/FastVector2Int.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Adapters/FastVector3Int.cs +268 -185
- package/Runtime/Core/DataStructure/Adapters/FastVector3Int.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Adapters/KGuid.cs +360 -305
- package/Runtime/Core/DataStructure/Adapters/KGuid.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Adapters/KVector2.cs +146 -80
- package/Runtime/Core/DataStructure/Adapters/KVector2.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Adapters.meta +8 -8
- package/Runtime/Core/DataStructure/BitSet.cs +626 -0
- package/Runtime/Core/DataStructure/BitSet.cs.meta +11 -0
- package/Runtime/Core/DataStructure/BoundingBox3D.cs +405 -0
- package/Runtime/Core/DataStructure/BoundingBox3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/Circle.cs +203 -50
- package/Runtime/Core/DataStructure/Circle.cs.meta +11 -11
- package/Runtime/Core/DataStructure/CyclicBuffer.cs +489 -266
- package/Runtime/Core/DataStructure/CyclicBuffer.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Deque.cs +561 -0
- package/Runtime/Core/DataStructure/Deque.cs.meta +11 -0
- package/Runtime/Core/DataStructure/DisjointSet.cs +483 -0
- package/Runtime/Core/DataStructure/DisjointSet.cs.meta +11 -0
- package/Runtime/Core/DataStructure/Heap.cs +514 -0
- package/Runtime/Core/DataStructure/Heap.cs.meta +11 -0
- package/Runtime/Core/DataStructure/{ISpatialTree.cs → ISpatialTree2D.cs} +25 -21
- package/Runtime/Core/DataStructure/ISpatialTree2D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/ISpatialTree3D.cs +33 -0
- package/Runtime/Core/DataStructure/ISpatialTree3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/ImmutableBitSet.cs +398 -0
- package/Runtime/Core/DataStructure/ImmutableBitSet.cs.meta +3 -0
- package/Runtime/Core/DataStructure/KDTree2D.cs +852 -0
- package/Runtime/Core/DataStructure/KDTree2D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/KDTree3D.cs +911 -0
- package/Runtime/Core/DataStructure/KDTree3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/OctTree3D.cs +983 -0
- package/Runtime/Core/DataStructure/OctTree3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/PriorityQueue.cs +194 -0
- package/Runtime/Core/DataStructure/PriorityQueue.cs.meta +11 -0
- package/Runtime/Core/DataStructure/QuadTree2D.cs +722 -0
- package/Runtime/Core/DataStructure/QuadTree2D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/RTree2D.cs +704 -0
- package/Runtime/Core/DataStructure/{RTree.cs.meta → RTree2D.cs.meta} +11 -11
- package/Runtime/Core/DataStructure/RTree3D.cs +775 -0
- package/Runtime/Core/DataStructure/RTree3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/SparseSet.cs +597 -0
- package/Runtime/Core/DataStructure/SparseSet.cs.meta +11 -0
- package/Runtime/Core/DataStructure/SpatialHash2D.cs +312 -0
- package/Runtime/Core/DataStructure/SpatialHash2D.cs.meta +3 -0
- package/Runtime/Core/DataStructure/SpatialHash3D.cs +341 -0
- package/Runtime/Core/DataStructure/SpatialHash3D.cs.meta +11 -0
- package/Runtime/Core/DataStructure/Sphere.cs +264 -0
- package/Runtime/Core/DataStructure/Sphere.cs.meta +11 -0
- package/Runtime/Core/DataStructure/StringWrapper.cs +115 -91
- package/Runtime/Core/DataStructure/StringWrapper.cs.meta +11 -11
- package/Runtime/Core/DataStructure/TimedCache.cs +88 -66
- package/Runtime/Core/DataStructure/TimedCache.cs.meta +11 -11
- package/Runtime/Core/DataStructure/Trie.cs +660 -359
- package/Runtime/Core/DataStructure/Trie.cs.meta +2 -2
- package/Runtime/Core/DataStructure.meta +8 -8
- package/Runtime/Core/Extension/AnimatorExtensions.cs +40 -25
- package/Runtime/Core/Extension/AnimatorExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/AsyncOperationExtensions.cs +404 -110
- package/Runtime/Core/Extension/AsyncOperationExtensions.cs.meta +2 -2
- package/Runtime/Core/Extension/CircleExtensions.cs +125 -25
- package/Runtime/Core/Extension/CircleExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/ColorExtensions.cs +983 -644
- package/Runtime/Core/Extension/ColorExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/DictionaryExtensions.cs +606 -299
- package/Runtime/Core/Extension/DictionaryExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/DirectionExtensions.cs +377 -213
- package/Runtime/Core/Extension/DirectionExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/EnumExtensions.cs +535 -137
- package/Runtime/Core/Extension/EnumExtensions.cs.meta +2 -2
- package/Runtime/Core/Extension/IEnumerableExtensions.cs +341 -124
- package/Runtime/Core/Extension/IEnumerableExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/IListExtensions.cs +767 -248
- package/Runtime/Core/Extension/IListExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/IReadonlyListExtensions.cs +687 -37
- package/Runtime/Core/Extension/IReadonlyListExtensions.cs.meta +2 -2
- package/Runtime/Core/Extension/ProtoEqualityExtensions.cs +292 -0
- package/Runtime/Core/Extension/ProtoEqualityExtensions.cs.meta +3 -0
- package/Runtime/Core/Extension/RandomExtensions.cs +938 -109
- package/Runtime/Core/Extension/RandomExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/StringExtensions.cs +1635 -239
- package/Runtime/Core/Extension/StringExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/UnityExtensions.cs +4555 -1689
- package/Runtime/Core/Extension/UnityExtensions.cs.meta +11 -11
- package/Runtime/Core/Extension/WallstopStudiosLogger.cs +271 -245
- package/Runtime/Core/Extension/WallstopStudiosLogger.cs.meta +11 -11
- package/Runtime/Core/Extension.meta +8 -8
- package/Runtime/Core/Helper/ArrayConverter.cs +73 -39
- package/Runtime/Core/Helper/ArrayConverter.cs.meta +2 -2
- package/Runtime/Core/Helper/AssignUtilities.cs +33 -14
- package/Runtime/Core/Helper/AssignUtilities.cs.meta +11 -11
- package/Runtime/Core/Helper/DirectoryHelper.cs +210 -196
- package/Runtime/Core/Helper/DirectoryHelper.cs.meta +2 -2
- package/Runtime/Core/Helper/Enumerables.cs +51 -17
- package/Runtime/Core/Helper/Enumerables.cs.meta +11 -11
- package/Runtime/Core/Helper/FileHelper.cs +97 -77
- package/Runtime/Core/Helper/FileHelper.cs.meta +2 -2
- package/Runtime/Core/Helper/FormattingHelpers.cs +49 -38
- package/Runtime/Core/Helper/FormattingHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/FuncBasedComparer.cs +29 -0
- package/Runtime/Core/Helper/FuncBasedComparer.cs.meta +3 -0
- package/Runtime/Core/Helper/Geometry.cs +65 -43
- package/Runtime/Core/Helper/Geometry.cs.meta +11 -11
- package/Runtime/Core/Helper/Helpers.cs +1271 -831
- package/Runtime/Core/Helper/Helpers.cs.meta +11 -11
- package/Runtime/Core/Helper/IterationHelpers.cs +83 -32
- package/Runtime/Core/Helper/IterationHelpers.cs.meta +11 -11
- package/Runtime/Core/Helper/LifetimeHelpers.cs +20 -13
- package/Runtime/Core/Helper/LifetimeHelpers.cs.meta +11 -11
- package/Runtime/Core/Helper/LineHelper.cs +259 -194
- package/Runtime/Core/Helper/LineHelper.cs.meta +2 -2
- package/Runtime/Core/Helper/Logging/UnityLogTagFormatter.cs +549 -539
- package/Runtime/Core/Helper/Logging/UnityLogTagFormatter.cs.meta +2 -2
- package/Runtime/Core/Helper/Logging.meta +2 -2
- package/Runtime/Core/Helper/Objects.cs +477 -769
- package/Runtime/Core/Helper/Objects.cs.meta +11 -11
- package/Runtime/Core/Helper/Partials/LogHelpers.cs +13 -13
- package/Runtime/Core/Helper/Partials/LogHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/Partials/MathHelpers.cs +45 -30
- package/Runtime/Core/Helper/Partials/MathHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/Partials/ObjectHelpers.cs +506 -400
- package/Runtime/Core/Helper/Partials/ObjectHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/Partials/TransformHelpers.cs +393 -377
- package/Runtime/Core/Helper/Partials/TransformHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/Partials.meta +2 -2
- package/Runtime/Core/Helper/PathHelper.cs +42 -15
- package/Runtime/Core/Helper/PathHelper.cs.meta +2 -2
- package/Runtime/Core/Helper/ReflectionHelpers.cs +5287 -1963
- package/Runtime/Core/Helper/ReflectionHelpers.cs.meta +2 -2
- package/Runtime/Core/Helper/ReverseComparer.cs +33 -0
- package/Runtime/Core/Helper/ReverseComparer.cs.meta +3 -0
- package/Runtime/Core/Helper/SceneHelper.cs +251 -224
- package/Runtime/Core/Helper/SceneHelper.cs.meta +2 -2
- package/Runtime/Core/Helper/SpriteHelpers.cs +50 -41
- package/Runtime/Core/Helper/SpriteHelpers.cs.meta +11 -11
- package/Runtime/Core/Helper/StringInList.cs +61 -35
- package/Runtime/Core/Helper/StringInList.cs.meta +11 -11
- package/Runtime/Core/Helper/TestAssemblyHelper.cs +134 -0
- package/Runtime/Core/Helper/TestAssemblyHelper.cs.meta +11 -0
- package/Runtime/Core/Helper/UnityMainThreadDispatcher.cs +100 -82
- package/Runtime/Core/Helper/UnityMainThreadDispatcher.cs.meta +2 -2
- package/Runtime/Core/Helper/WallMath.cs +672 -166
- package/Runtime/Core/Helper/WallMath.cs.meta +11 -11
- package/Runtime/Core/Helper.meta +8 -8
- package/Runtime/Core/Math/Line2D.cs +263 -0
- package/Runtime/Core/Math/Line2D.cs.meta +11 -0
- package/Runtime/Core/Math/Line3D.cs +452 -0
- package/Runtime/Core/Math/Line3D.cs.meta +11 -0
- package/Runtime/Core/Math/Parabola.cs +241 -47
- package/Runtime/Core/Math/Parabola.cs.meta +11 -11
- package/Runtime/Core/Math/PointPolygonCheck.cs +175 -36
- package/Runtime/Core/Math/PointPolygonCheck.cs.meta +11 -11
- package/Runtime/Core/Math/Range.cs +157 -92
- package/Runtime/Core/Math/Range.cs.meta +11 -11
- package/Runtime/Core/Math.meta +8 -8
- package/Runtime/Core/Model/Direction.cs +25 -43
- package/Runtime/Core/Model/Direction.cs.meta +11 -11
- package/Runtime/Core/Model.meta +8 -8
- package/Runtime/Core/OneOf/FastOneOf.cs +252 -152
- package/Runtime/Core/OneOf/FastOneOf.cs.meta +11 -11
- package/Runtime/Core/OneOf/FastOneOf2.cs +198 -0
- package/Runtime/Core/OneOf/FastOneOf2.cs.meta +11 -0
- package/Runtime/Core/OneOf/FastOneOf4.cs +324 -0
- package/Runtime/Core/OneOf/FastOneOf4.cs.meta +11 -0
- package/Runtime/Core/OneOf/None.cs +30 -4
- package/Runtime/Core/OneOf/None.cs.meta +11 -11
- package/Runtime/Core/OneOf.meta +8 -8
- package/Runtime/Core/Random/AbstractRandom.cs +1318 -655
- package/Runtime/Core/Random/AbstractRandom.cs.meta +11 -11
- package/Runtime/Core/Random/DotNetRandom.cs +118 -54
- package/Runtime/Core/Random/DotNetRandom.cs.meta +2 -2
- package/Runtime/Core/Random/IRandom.cs +203 -161
- package/Runtime/Core/Random/IRandom.cs.meta +11 -11
- package/Runtime/Core/Random/IllusionFlow.cs +171 -107
- package/Runtime/Core/Random/IllusionFlow.cs.meta +2 -2
- package/Runtime/Core/Random/LinearCongruentialGenerator.cs +90 -49
- package/Runtime/Core/Random/LinearCongruentialGenerator.cs.meta +2 -2
- package/Runtime/Core/Random/NativePcgRandom.cs +139 -97
- package/Runtime/Core/Random/NativePcgRandom.cs.meta +11 -11
- package/Runtime/Core/Random/PRNG.cs +21 -7
- package/Runtime/Core/Random/PRNG.cs.meta +2 -2
- package/Runtime/Core/Random/PcgRandom.cs +243 -149
- package/Runtime/Core/Random/PcgRandom.cs.meta +11 -11
- package/Runtime/Core/Random/PerlinNoise.cs +369 -369
- package/Runtime/Core/Random/PerlinNoise.cs.meta +2 -2
- package/Runtime/Core/Random/RandomComparer.cs +34 -0
- package/Runtime/Core/Random/RandomComparer.cs.meta +3 -0
- package/Runtime/Core/Random/RandomState.cs +206 -131
- package/Runtime/Core/Random/RandomState.cs.meta +11 -11
- package/Runtime/Core/Random/RandomUtilities.cs +55 -26
- package/Runtime/Core/Random/RandomUtilities.cs.meta +11 -11
- package/Runtime/Core/Random/RomuDuo.cs +171 -116
- package/Runtime/Core/Random/RomuDuo.cs.meta +2 -2
- package/Runtime/Core/Random/SplitMix64.cs +134 -94
- package/Runtime/Core/Random/SplitMix64.cs.meta +2 -2
- package/Runtime/Core/Random/SquirrelRandom.cs +127 -84
- package/Runtime/Core/Random/SquirrelRandom.cs.meta +11 -11
- package/Runtime/Core/Random/SystemRandom.cs +203 -162
- package/Runtime/Core/Random/SystemRandom.cs.meta +11 -11
- package/Runtime/Core/Random/ThreadLocalRandom.cs +25 -12
- package/Runtime/Core/Random/ThreadLocalRandom.cs.meta +11 -11
- package/Runtime/Core/Random/UnityRandom.cs +109 -57
- package/Runtime/Core/Random/UnityRandom.cs.meta +11 -11
- package/Runtime/Core/Random/WyRandom.cs +158 -121
- package/Runtime/Core/Random/WyRandom.cs.meta +2 -2
- package/Runtime/Core/Random/XorShiftRandom.cs +106 -52
- package/Runtime/Core/Random/XorShiftRandom.cs.meta +11 -11
- package/Runtime/Core/Random/XoroShiroRandom.cs +184 -119
- package/Runtime/Core/Random/XoroShiroRandom.cs.meta +2 -2
- package/Runtime/Core/Random.meta +8 -8
- package/Runtime/Core/Serialization/JsonConverters/AnimationCurveConverter.cs +248 -0
- package/Runtime/Core/Serialization/JsonConverters/AnimationCurveConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/BitSetConverter.cs +119 -0
- package/Runtime/Core/Serialization/JsonConverters/BitSetConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundingSphereConverter.cs +74 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundingSphereConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundsConverter.cs +132 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundsConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundsIntConverter.cs +135 -0
- package/Runtime/Core/Serialization/JsonConverters/BoundsIntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Color32Converter.cs +98 -0
- package/Runtime/Core/Serialization/JsonConverters/Color32Converter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/ColorBlockConverter.cs +123 -0
- package/Runtime/Core/Serialization/JsonConverters/ColorBlockConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/ColorConverter.cs +88 -88
- package/Runtime/Core/Serialization/JsonConverters/ColorConverter.cs.meta +2 -2
- package/Runtime/Core/Serialization/JsonConverters/CyclicBufferConverterFactory.cs +112 -0
- package/Runtime/Core/Serialization/JsonConverters/CyclicBufferConverterFactory.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/DequeConverterFactory.cs +62 -0
- package/Runtime/Core/Serialization/JsonConverters/DequeConverterFactory.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/FastVector2IntConverter.cs +72 -0
- package/Runtime/Core/Serialization/JsonConverters/FastVector2IntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/FastVector3IntConverter.cs +80 -0
- package/Runtime/Core/Serialization/JsonConverters/FastVector3IntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/GameObjectConverter.cs +36 -36
- package/Runtime/Core/Serialization/JsonConverters/GameObjectConverter.cs.meta +2 -2
- package/Runtime/Core/Serialization/JsonConverters/GradientConverter.cs +245 -0
- package/Runtime/Core/Serialization/JsonConverters/GradientConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Hash128Converter.cs +92 -0
- package/Runtime/Core/Serialization/JsonConverters/Hash128Converter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/ImmutableBitSetConverter.cs +119 -0
- package/Runtime/Core/Serialization/JsonConverters/ImmutableBitSetConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/KVector2Converter.cs +72 -0
- package/Runtime/Core/Serialization/JsonConverters/KVector2Converter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/LayerMaskConverter.cs +95 -0
- package/Runtime/Core/Serialization/JsonConverters/LayerMaskConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Matrix4x4Converter.cs +237 -218
- package/Runtime/Core/Serialization/JsonConverters/Matrix4x4Converter.cs.meta +2 -2
- package/Runtime/Core/Serialization/JsonConverters/MinMaxCurveConverter.cs +142 -0
- package/Runtime/Core/Serialization/JsonConverters/MinMaxCurveConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/MinMaxGradientConverter.cs +135 -0
- package/Runtime/Core/Serialization/JsonConverters/MinMaxGradientConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/PlaneConverter.cs +79 -0
- package/Runtime/Core/Serialization/JsonConverters/PlaneConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/PoseConverter.cs +76 -0
- package/Runtime/Core/Serialization/JsonConverters/PoseConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/QuaternionConverter.cs +88 -0
- package/Runtime/Core/Serialization/JsonConverters/QuaternionConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RangeConverterFactory.cs +106 -0
- package/Runtime/Core/Serialization/JsonConverters/RangeConverterFactory.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RangeIntConverter.cs +71 -0
- package/Runtime/Core/Serialization/JsonConverters/RangeIntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Ray2DConverter.cs +80 -0
- package/Runtime/Core/Serialization/JsonConverters/Ray2DConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RayConverter.cs +76 -0
- package/Runtime/Core/Serialization/JsonConverters/RayConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RaycastHitConverter.cs +115 -0
- package/Runtime/Core/Serialization/JsonConverters/RaycastHitConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RectConverter.cs +84 -0
- package/Runtime/Core/Serialization/JsonConverters/RectConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RectIntConverter.cs +88 -0
- package/Runtime/Core/Serialization/JsonConverters/RectIntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RectOffsetConverter.cs +87 -0
- package/Runtime/Core/Serialization/JsonConverters/RectOffsetConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/RenderTextureDescriptorConverter.cs +264 -0
- package/Runtime/Core/Serialization/JsonConverters/RenderTextureDescriptorConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/ResolutionConverter.cs +158 -0
- package/Runtime/Core/Serialization/JsonConverters/ResolutionConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/SceneConverter.cs +103 -0
- package/Runtime/Core/Serialization/JsonConverters/SceneConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/SphericalHarmonicsL2Converter.cs +121 -0
- package/Runtime/Core/Serialization/JsonConverters/SphericalHarmonicsL2Converter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/TouchConverter.cs +54 -0
- package/Runtime/Core/Serialization/JsonConverters/TouchConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/TypeConverter.cs +30 -28
- package/Runtime/Core/Serialization/JsonConverters/TypeConverter.cs.meta +2 -2
- package/Runtime/Core/Serialization/JsonConverters/Vector2Converter.cs +72 -74
- package/Runtime/Core/Serialization/JsonConverters/Vector2Converter.cs.meta +11 -11
- package/Runtime/Core/Serialization/JsonConverters/Vector2IntConverter.cs +72 -0
- package/Runtime/Core/Serialization/JsonConverters/Vector2IntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Vector3Converter.cs +80 -81
- package/Runtime/Core/Serialization/JsonConverters/Vector3Converter.cs.meta +11 -11
- package/Runtime/Core/Serialization/JsonConverters/Vector3IntConverter.cs +80 -0
- package/Runtime/Core/Serialization/JsonConverters/Vector3IntConverter.cs.meta +11 -0
- package/Runtime/Core/Serialization/JsonConverters/Vector4Converter.cs +88 -88
- package/Runtime/Core/Serialization/JsonConverters/Vector4Converter.cs.meta +2 -2
- package/Runtime/Core/Serialization/JsonConverters.meta +8 -8
- package/Runtime/Core/Serialization/ProtobufUnitySurrogates.cs +383 -0
- package/Runtime/Core/Serialization/ProtobufUnitySurrogates.cs.meta +11 -0
- package/Runtime/Core/Serialization/Serializer.cs +2020 -195
- package/Runtime/Core/Serialization/Serializer.cs.meta +11 -11
- package/Runtime/Core/Serialization.meta +8 -8
- package/Runtime/Core/Threading/SingleThreadedThreadPool.cs +228 -228
- package/Runtime/Core/Threading/SingleThreadedThreadPool.cs.meta +11 -11
- package/Runtime/Core/Threading.meta +8 -8
- package/Runtime/Core.meta +8 -8
- package/Runtime/Integrations/VContainer/ObjectResolverRelationalExtensions.cs +185 -0
- package/Runtime/Integrations/VContainer/ObjectResolverRelationalExtensions.cs.meta +11 -0
- package/Runtime/Integrations/VContainer/RelationalComponentEntryPoint.cs +109 -0
- package/Runtime/Integrations/VContainer/RelationalComponentEntryPoint.cs.meta +11 -0
- package/Runtime/Integrations/VContainer/RelationalComponentsBuilderExtensions.cs +78 -0
- package/Runtime/Integrations/VContainer/RelationalComponentsBuilderExtensions.cs.meta +11 -0
- package/Runtime/Integrations/VContainer/RelationalSceneAssignmentOptions.cs +83 -0
- package/Runtime/Integrations/VContainer/RelationalSceneAssignmentOptions.cs.meta +11 -0
- package/Runtime/Integrations/VContainer/WallstopStudios.UnityHelpers.Integration.VContainer.asmdef +30 -0
- package/Runtime/Integrations/VContainer/WallstopStudios.UnityHelpers.Integration.VContainer.asmdef.meta +7 -0
- package/Runtime/Integrations/VContainer.meta +8 -0
- package/Runtime/Integrations/Zenject/DiContainerRelationalExtensions.cs +180 -0
- package/Runtime/Integrations/Zenject/DiContainerRelationalExtensions.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/RelationalComponentSceneInitializer.cs +105 -0
- package/Runtime/Integrations/Zenject/RelationalComponentSceneInitializer.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/RelationalComponentsInstaller.cs +72 -0
- package/Runtime/Integrations/Zenject/RelationalComponentsInstaller.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/RelationalSceneAssignmentOptions.cs +87 -0
- package/Runtime/Integrations/Zenject/RelationalSceneAssignmentOptions.cs.meta +11 -0
- package/Runtime/Integrations/Zenject/WallstopStudios.UnityHelpers.Integration.Zenject.asmdef +30 -0
- package/Runtime/Integrations/Zenject/WallstopStudios.UnityHelpers.Integration.Zenject.asmdef.meta +7 -0
- package/Runtime/Integrations/Zenject.meta +8 -0
- package/Runtime/Integrations.meta +8 -0
- package/Runtime/Protobuf-Net/System.Collections.Immutable.dll.meta +33 -33
- package/Runtime/Protobuf-Net/System.Runtime.CompilerServices.Unsafe.dll.meta +33 -33
- package/Runtime/Protobuf-Net/protobuf-net.Core.dll.meta +33 -33
- package/Runtime/Protobuf-Net/protobuf-net.dll.meta +33 -33
- package/Runtime/Protobuf-Net.meta +8 -8
- package/Runtime/Tags/AlwaysIncludeInAttributeMetadataCacheAttribute.cs +11 -0
- package/Runtime/Tags/AlwaysIncludeInAttributeMetadataCacheAttribute.cs.meta +11 -0
- package/Runtime/Tags/Attribute.cs +399 -205
- package/Runtime/Tags/Attribute.cs.meta +2 -2
- package/Runtime/Tags/AttributeEffect.cs +372 -281
- package/Runtime/Tags/AttributeEffect.cs.meta +2 -2
- package/Runtime/Tags/AttributeMetadataCache.cs +503 -0
- package/Runtime/Tags/AttributeMetadataCache.cs.meta +11 -0
- package/Runtime/Tags/AttributeMetadataFilters.cs +108 -0
- package/Runtime/Tags/AttributeMetadataFilters.cs.meta +11 -0
- package/Runtime/Tags/AttributeModification.cs +132 -48
- package/Runtime/Tags/AttributeModification.cs.meta +2 -2
- package/Runtime/Tags/AttributeUtilities.cs +376 -209
- package/Runtime/Tags/AttributeUtilities.cs.meta +2 -2
- package/Runtime/Tags/AttributesComponent.cs +237 -163
- package/Runtime/Tags/AttributesComponent.cs.meta +2 -2
- package/Runtime/Tags/CollisionSenses.cs +117 -91
- package/Runtime/Tags/CollisionSenses.cs.meta +2 -2
- package/Runtime/Tags/CosmeticEffectComponent.cs +112 -50
- package/Runtime/Tags/CosmeticEffectComponent.cs.meta +2 -2
- package/Runtime/Tags/CosmeticEffectData.cs +109 -63
- package/Runtime/Tags/CosmeticEffectData.cs.meta +2 -2
- package/Runtime/Tags/EffectHandle.cs +150 -65
- package/Runtime/Tags/EffectHandle.cs.meta +2 -2
- package/Runtime/Tags/EffectHandler.cs +470 -393
- package/Runtime/Tags/EffectHandler.cs.meta +2 -2
- package/Runtime/Tags/ModificationAction.cs +60 -9
- package/Runtime/Tags/ModificationAction.cs.meta +2 -2
- package/Runtime/Tags/ModifierDurationType.cs +71 -13
- package/Runtime/Tags/ModifierDurationType.cs.meta +2 -2
- package/Runtime/Tags/TagHandler.cs +373 -158
- package/Runtime/Tags/TagHandler.cs.meta +2 -2
- package/Runtime/Tags.meta +2 -2
- package/Runtime/Utils/AnimationEventEqualityComparer.cs +198 -161
- package/Runtime/Utils/AnimationEventEqualityComparer.cs.meta +11 -11
- package/Runtime/Utils/AnimatorEnumStateMachine.cs +110 -88
- package/Runtime/Utils/AnimatorEnumStateMachine.cs.meta +11 -11
- package/Runtime/Utils/Ascii85.cs +132 -115
- package/Runtime/Utils/Ascii85.cs.meta +2 -2
- package/Runtime/Utils/Buffers.cs +1151 -550
- package/Runtime/Utils/Buffers.cs.meta +11 -11
- package/Runtime/Utils/CenterPointOffset.cs +35 -30
- package/Runtime/Utils/CenterPointOffset.cs.meta +2 -2
- package/Runtime/Utils/ChildSpawner.cs +250 -157
- package/Runtime/Utils/ChildSpawner.cs.meta +2 -2
- package/Runtime/Utils/CircleLineRenderer.cs +142 -142
- package/Runtime/Utils/CircleLineRenderer.cs.meta +11 -11
- package/Runtime/Utils/CollisionProxy.cs +48 -48
- package/Runtime/Utils/CollisionProxy.cs.meta +2 -2
- package/Runtime/Utils/CoroutineHandler.cs +4 -4
- package/Runtime/Utils/CoroutineHandler.cs.meta +2 -2
- package/Runtime/Utils/DeferredDisposalResult.cs +20 -23
- package/Runtime/Utils/DeferredDisposalResult.cs.meta +2 -2
- package/Runtime/Utils/LZMA.cs +276 -53
- package/Runtime/Utils/LZMA.cs.meta +2 -2
- package/Runtime/Utils/MatchColliderToSprite.cs +104 -104
- package/Runtime/Utils/MatchColliderToSprite.cs.meta +2 -2
- package/Runtime/Utils/MatchTransform.cs +99 -82
- package/Runtime/Utils/MatchTransform.cs.meta +2 -2
- package/Runtime/Utils/Oscillator.cs +27 -27
- package/Runtime/Utils/Oscillator.cs.meta +11 -11
- package/Runtime/Utils/PolygonCollider2DOptimizer.cs +104 -83
- package/Runtime/Utils/PolygonCollider2DOptimizer.cs.meta +2 -2
- package/Runtime/Utils/RuntimeSingleton.cs +139 -89
- package/Runtime/Utils/RuntimeSingleton.cs.meta +11 -11
- package/Runtime/Utils/ScriptableObjectSingleton.cs +226 -85
- package/Runtime/Utils/ScriptableObjectSingleton.cs.meta +2 -2
- package/Runtime/Utils/SerializedStringComparer.cs +107 -107
- package/Runtime/Utils/SerializedStringComparer.cs.meta +2 -2
- package/Runtime/Utils/SetTextureImportData.cs +69 -69
- package/Runtime/Utils/SetTextureImportData.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Common/CRC.cs +70 -70
- package/Runtime/Utils/SevenZip/Common/CRC.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Common/InBuffer.cs +84 -84
- package/Runtime/Utils/SevenZip/Common/InBuffer.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Common/OutBuffer.cs +70 -70
- package/Runtime/Utils/SevenZip/Common/OutBuffer.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Common.meta +2 -2
- package/Runtime/Utils/SevenZip/Compress/LZ/IMatchFinder.cs +28 -28
- package/Runtime/Utils/SevenZip/Compress/LZ/IMatchFinder.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZ/LzBinTree.cs +454 -454
- package/Runtime/Utils/SevenZip/Compress/LZ/LzBinTree.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZ/LzInWindow.cs +179 -179
- package/Runtime/Utils/SevenZip/Compress/LZ/LzInWindow.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZ/LzOutWindow.cs +137 -137
- package/Runtime/Utils/SevenZip/Compress/LZ/LzOutWindow.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZ.meta +8 -8
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaBase.cs +110 -110
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaBase.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaDecoder.cs +525 -527
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaDecoder.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaEncoder.cs +1891 -1904
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaEncoder.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/LZMA.meta +8 -8
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoder.cs +242 -242
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoder.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBit.cs +146 -149
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBit.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBitTree.cs +177 -177
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBitTree.cs.meta +11 -11
- package/Runtime/Utils/SevenZip/Compress/RangeCoder.meta +8 -8
- package/Runtime/Utils/SevenZip/Compress.meta +8 -8
- package/Runtime/Utils/SevenZip/ICoder.cs +177 -177
- package/Runtime/Utils/SevenZip/ICoder.cs.meta +11 -11
- package/Runtime/Utils/SevenZip.meta +2 -2
- package/Runtime/Utils/SpriteRendererMetadata.cs +346 -370
- package/Runtime/Utils/SpriteRendererMetadata.cs.meta +2 -2
- package/Runtime/Utils/SpriteRendererSyncer.cs +100 -100
- package/Runtime/Utils/SpriteRendererSyncer.cs.meta +2 -2
- package/Runtime/Utils/StartTracker.cs +15 -15
- package/Runtime/Utils/StartTracker.cs.meta +2 -2
- package/Runtime/Utils/TextureScale.cs +356 -179
- package/Runtime/Utils/TextureScale.cs.meta +2 -2
- package/Runtime/Utils/TypeNameSorter.cs +17 -17
- package/Runtime/Utils/TypeNameSorter.cs.meta +2 -2
- package/Runtime/Utils/UnityObjectNameComparer.cs +89 -89
- package/Runtime/Utils/UnityObjectNameComparer.cs.meta +2 -2
- package/Runtime/Utils.meta +8 -8
- package/Runtime/Visuals/AnimatedSpriteLayer.cs +217 -130
- package/Runtime/Visuals/AnimatedSpriteLayer.cs.meta +2 -2
- package/Runtime/Visuals/UGUI/EnhancedImage.cs +218 -85
- package/Runtime/Visuals/UGUI/EnhancedImage.cs.meta +2 -2
- package/Runtime/Visuals/UGUI.meta +2 -2
- package/Runtime/Visuals/UIToolkit/LayeredImage.cs +781 -484
- package/Runtime/Visuals/UIToolkit/LayeredImage.cs.meta +2 -2
- package/Runtime/Visuals/UIToolkit/MultiFileSelectorElement.cs +945 -322
- package/Runtime/Visuals/UIToolkit/MultiFileSelectorElement.cs.meta +2 -2
- package/Runtime/Visuals/UIToolkit.meta +2 -2
- package/Runtime/Visuals.meta +2 -2
- package/Runtime/WallstopStudios.UnityHelpers.asmdef +22 -14
- package/Runtime/WallstopStudios.UnityHelpers.asmdef.meta +7 -7
- package/Runtime.meta +8 -8
- package/SERIALIZATION.md +648 -0
- package/SERIALIZATION.md.meta +7 -0
- package/SINGLETONS.md +427 -0
- package/SINGLETONS.md.meta +7 -0
- package/SPATIAL_TREES_2D_GUIDE.md +261 -0
- package/SPATIAL_TREES_2D_GUIDE.md.meta +7 -0
- package/SPATIAL_TREES_3D_GUIDE.md +214 -0
- package/SPATIAL_TREES_3D_GUIDE.md.meta +7 -0
- package/SPATIAL_TREE_2D_PERFORMANCE.md +238 -0
- package/SPATIAL_TREE_2D_PERFORMANCE.md.meta +7 -0
- package/SPATIAL_TREE_3D_PERFORMANCE.md +240 -0
- package/SPATIAL_TREE_3D_PERFORMANCE.md.meta +7 -0
- package/SPATIAL_TREE_SEMANTICS.md +106 -0
- package/SPATIAL_TREE_SEMANTICS.md.meta +7 -0
- package/Samples~/DI - VContainer/Prefabs/RelationalConsumer.prefab +77 -0
- package/Samples~/DI - VContainer/Prefabs/RelationalConsumer.prefab.meta +8 -0
- package/Samples~/DI - VContainer/Prefabs/Spawner.prefab +47 -0
- package/Samples~/DI - VContainer/Prefabs/Spawner.prefab.meta +8 -0
- package/Samples~/DI - VContainer/Prefabs.meta +9 -0
- package/Samples~/DI - VContainer/README.md +334 -0
- package/Samples~/DI - VContainer/README.md.meta +8 -0
- package/Samples~/DI - VContainer/Scenes/VContainer_Sample.unity +120 -0
- package/Samples~/DI - VContainer/Scenes/VContainer_Sample.unity.meta +8 -0
- package/Samples~/DI - VContainer/Scenes.meta +9 -0
- package/Samples~/DI - VContainer/Scripts/GameLifetimeScope.cs +24 -0
- package/Samples~/DI - VContainer/Scripts/GameLifetimeScope.cs.meta +12 -0
- package/Samples~/DI - VContainer/Scripts/RelationalConsumer.cs +21 -0
- package/Samples~/DI - VContainer/Scripts/RelationalConsumer.cs.meta +12 -0
- package/Samples~/DI - VContainer/Scripts/Samples.UnityHelpers.DI.VContainer.asmdef +37 -0
- package/Samples~/DI - VContainer/Scripts/Samples.UnityHelpers.DI.VContainer.asmdef.meta +8 -0
- package/Samples~/DI - VContainer/Scripts/Spawner.cs +21 -0
- package/Samples~/DI - VContainer/Scripts/Spawner.cs.meta +12 -0
- package/Samples~/DI - VContainer/Scripts.meta +9 -0
- package/Samples~/DI - VContainer.meta +9 -0
- package/Samples~/DI - Zenject/Prefabs/RelationalConsumer.prefab +77 -0
- package/Samples~/DI - Zenject/Prefabs/RelationalConsumer.prefab.meta +8 -0
- package/Samples~/DI - Zenject/Prefabs/SpawnerZenject.prefab +47 -0
- package/Samples~/DI - Zenject/Prefabs/SpawnerZenject.prefab.meta +8 -0
- package/Samples~/DI - Zenject/Prefabs.meta +9 -0
- package/Samples~/DI - Zenject/README.md +389 -0
- package/Samples~/DI - Zenject/README.md.meta +7 -0
- package/Samples~/DI - Zenject/Scenes/Zenject_Sample.unity +164 -0
- package/Samples~/DI - Zenject/Scenes/Zenject_Sample.unity.meta +8 -0
- package/Samples~/DI - Zenject/Scenes.meta +9 -0
- package/Samples~/DI - Zenject/Scripts/RelationalConsumer.cs +19 -0
- package/Samples~/DI - Zenject/Scripts/RelationalConsumer.cs.meta +12 -0
- package/Samples~/DI - Zenject/Scripts/Samples.UnityHelpers.DI.Zenject.asmdef +36 -0
- package/Samples~/DI - Zenject/Scripts/Samples.UnityHelpers.DI.Zenject.asmdef.meta +8 -0
- package/Samples~/DI - Zenject/Scripts/SceneContextPlaceholder.cs +47 -0
- package/Samples~/DI - Zenject/Scripts/SceneContextPlaceholder.cs.meta +12 -0
- package/Samples~/DI - Zenject/Scripts/SpawnerZenject.cs +20 -0
- package/Samples~/DI - Zenject/Scripts/SpawnerZenject.cs.meta +12 -0
- package/Samples~/DI - Zenject/Scripts.meta +9 -0
- package/Samples~/DI - Zenject.meta +9 -0
- package/Samples~/Random - PRNG/README.md +12 -0
- package/Samples~/Random - PRNG/README.md.meta +8 -0
- package/Samples~/Random - PRNG/Scripts/RandomPrngDemo.cs +28 -0
- package/Samples~/Random - PRNG/Scripts/RandomPrngDemo.cs.meta +12 -0
- package/Samples~/Random - PRNG/Scripts/Samples.UnityHelpers.Random.Prng.asmdef +17 -0
- package/Samples~/Random - PRNG/Scripts/Samples.UnityHelpers.Random.Prng.asmdef.meta +8 -0
- package/Samples~/Random - PRNG/Scripts.meta +9 -0
- package/Samples~/Random - PRNG.meta +9 -0
- package/Samples~/Relational Components - Basic/README.md +19 -0
- package/Samples~/Relational Components - Basic/README.md.meta +8 -0
- package/Samples~/Relational Components - Basic/Scripts/RelationalBasicConsumer.cs +37 -0
- package/Samples~/Relational Components - Basic/Scripts/RelationalBasicConsumer.cs.meta +12 -0
- package/Samples~/Relational Components - Basic/Scripts/Samples.UnityHelpers.Relational.Basic.asmdef +17 -0
- package/Samples~/Relational Components - Basic/Scripts/Samples.UnityHelpers.Relational.Basic.asmdef.meta +8 -0
- package/Samples~/Relational Components - Basic/Scripts.meta +9 -0
- package/Samples~/Relational Components - Basic.meta +9 -0
- package/Samples~/Serialization - JSON/README.md +13 -0
- package/Samples~/Serialization - JSON/README.md.meta +8 -0
- package/Samples~/Serialization - JSON/Scripts/JsonSerializationDemo.cs +50 -0
- package/Samples~/Serialization - JSON/Scripts/JsonSerializationDemo.cs.meta +12 -0
- package/Samples~/Serialization - JSON/Scripts/Samples.UnityHelpers.Serialization.Json.asmdef +17 -0
- package/Samples~/Serialization - JSON/Scripts/Samples.UnityHelpers.Serialization.Json.asmdef.meta +8 -0
- package/Samples~/Serialization - JSON/Scripts.meta +9 -0
- package/Samples~/Serialization - JSON.meta +9 -0
- package/Samples~/Spatial Structures - 2D and 3D/README.md +13 -0
- package/Samples~/Spatial Structures - 2D and 3D/README.md.meta +8 -0
- package/Samples~/Spatial Structures - 2D and 3D/Scripts/Samples.UnityHelpers.SpatialStructures.asmdef +17 -0
- package/Samples~/Spatial Structures - 2D and 3D/Scripts/Samples.UnityHelpers.SpatialStructures.asmdef.meta +8 -0
- package/Samples~/Spatial Structures - 2D and 3D/Scripts/SpatialStructuresDemo.cs +62 -0
- package/Samples~/Spatial Structures - 2D and 3D/Scripts/SpatialStructuresDemo.cs.meta +12 -0
- package/Samples~/Spatial Structures - 2D and 3D/Scripts.meta +9 -0
- package/Samples~/Spatial Structures - 2D and 3D.meta +9 -0
- package/Samples~/UGUI - EnhancedImage/README.md +12 -0
- package/Samples~/UGUI - EnhancedImage/README.md.meta +8 -0
- package/Samples~/UGUI - EnhancedImage/Scripts/EnhancedImageDemo.cs +36 -0
- package/Samples~/UGUI - EnhancedImage/Scripts/EnhancedImageDemo.cs.meta +12 -0
- package/Samples~/UGUI - EnhancedImage/Scripts/Samples.UnityHelpers.UGUI.EnhancedImage.asmdef +17 -0
- package/Samples~/UGUI - EnhancedImage/Scripts/Samples.UnityHelpers.UGUI.EnhancedImage.asmdef.meta +8 -0
- package/Samples~/UGUI - EnhancedImage/Scripts.meta +9 -0
- package/Samples~/UGUI - EnhancedImage.meta +9 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/README.md +12 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/README.md.meta +8 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts/Editor/MultiFileSelectorSampleWindow.cs +45 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts/Editor/MultiFileSelectorSampleWindow.cs.meta +12 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts/Editor/Samples.UnityHelpers.UIToolkit.Editor.asmdef +19 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts/Editor/Samples.UnityHelpers.UIToolkit.Editor.asmdef.meta +8 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts/Editor.meta +9 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor)/Scripts.meta +9 -0
- package/Samples~/UI Toolkit - MultiFile Selector (Editor).meta +9 -0
- package/Shaders/Materials/BackgroundMask-Material.mat +59 -59
- package/Shaders/Materials/BackgroundMask-Material.mat.meta +8 -8
- package/Shaders/Materials.meta +8 -8
- package/Shaders/ShaderGraph/BackgroundMask.shadergraph +1653 -1653
- package/Shaders/ShaderGraph/BackgroundMask.shadergraph.meta +10 -10
- package/Shaders/ShaderGraph/DebugDisplayValue.shadersubgraph +835 -835
- package/Shaders/ShaderGraph/DebugDisplayValue.shadersubgraph.meta +10 -10
- package/Shaders/ShaderGraph.meta +8 -8
- package/Shaders/Support/EnhancedImageSupport.shader +64 -0
- package/Shaders/Support/EnhancedImageSupport.shader.meta +9 -0
- package/Shaders/Support.meta +8 -0
- package/Shaders.meta +8 -8
- package/Styles/Elements/Progress/ArcedProgressBar.cs +345 -345
- package/Styles/Elements/Progress/ArcedProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/CircularProgressBar.cs +307 -307
- package/Styles/Elements/Progress/CircularProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/GlitchProgressBar.cs +416 -416
- package/Styles/Elements/Progress/GlitchProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/LiquidProgressBar.cs +632 -632
- package/Styles/Elements/Progress/LiquidProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/MarchingAntsProgressBar.cs +722 -722
- package/Styles/Elements/Progress/MarchingAntsProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/RegularProgressBar.cs +405 -405
- package/Styles/Elements/Progress/RegularProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress/WigglyProgressBar.cs +837 -837
- package/Styles/Elements/Progress/WigglyProgressBar.cs.meta +2 -2
- package/Styles/Elements/Progress.meta +2 -2
- package/Styles/Elements.meta +2 -2
- package/Styles/USS/ArcedProgressBar.uss +18 -18
- package/Styles/USS/ArcedProgressBar.uss.meta +2 -2
- package/Styles/USS/CirclularProgressBar.uss +17 -17
- package/Styles/USS/CirclularProgressBar.uss.meta +2 -2
- package/Styles/USS/RegularProgressBar.uss +32 -32
- package/Styles/USS/RegularProgressBar.uss.meta +2 -2
- package/Styles/USS/WigglyProgressBar.uss +16 -16
- package/Styles/USS/WigglyProgressBar.uss.meta +2 -2
- package/Styles/USS.meta +2 -2
- package/Styles/WallstopStudios.UnityHelpers.Styles.asmdef +14 -17
- package/Styles/WallstopStudios.UnityHelpers.Styles.asmdef.meta +7 -7
- package/Styles.meta +2 -2
- package/THIRD_PARTY_NOTICES.md +74 -0
- package/THIRD_PARTY_NOTICES.md.meta +7 -0
- package/Tests/Editor/Attributes/AnimationEventHelpersTests.cs +155 -0
- package/Tests/Editor/Attributes/AnimationEventHelpersTests.cs.meta +11 -0
- package/Tests/Editor/Attributes.meta +8 -0
- package/Tests/Editor/Core/Attributes/RelationalComponentAssignerTests.cs +118 -0
- package/Tests/Editor/Core/Attributes/RelationalComponentAssignerTests.cs.meta +11 -0
- package/Tests/Editor/Core/Attributes.meta +8 -0
- package/Tests/Editor/Core.meta +8 -0
- package/Tests/Editor/Extensions/SerializedPropertyExtensionsTests.cs +194 -0
- package/Tests/Editor/Extensions/SerializedPropertyExtensionsTests.cs.meta +3 -0
- package/Tests/Editor/Extensions.meta +3 -0
- package/Tests/Editor/Helper/DummyScriptableObject.cs +6 -0
- package/Tests/Editor/Helper/DummyScriptableObject.cs.meta +3 -0
- package/Tests/Editor/Helper/HelpersTests.cs +101 -0
- package/Tests/Editor/Helper/HelpersTests.cs.meta +3 -0
- package/Tests/Editor/Helper/ObjectHelpersEditorTests.cs +63 -0
- package/Tests/Editor/Helper/ObjectHelpersEditorTests.cs.meta +11 -0
- package/Tests/Editor/Helper/PromptScope.cs +28 -0
- package/Tests/Editor/Helper/PromptScope.cs.meta +11 -0
- package/Tests/Editor/Helper/ReflectionHelpersEditorTests.cs +105 -0
- package/Tests/Editor/Helper/ReflectionHelpersEditorTests.cs.meta +11 -0
- package/Tests/Editor/Helper/SpriteHelpersTests.cs +334 -0
- package/Tests/Editor/Helper/SpriteHelpersTests.cs.meta +3 -0
- package/Tests/Editor/Helper/SpriteSettingsApplierAdditionalTests.cs +183 -0
- package/Tests/Editor/Helper/SpriteSettingsApplierAdditionalTests.cs.meta +11 -0
- package/Tests/Editor/Helper/SpriteSettingsApplierTests.cs +161 -0
- package/Tests/Editor/Helper/SpriteSettingsApplierTests.cs.meta +11 -0
- package/Tests/Editor/Helper.meta +3 -0
- package/Tests/Editor/Integrations/VContainer/VContainerIntegrationCompilationTests.cs +40 -0
- package/Tests/Editor/Integrations/VContainer/VContainerIntegrationCompilationTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/VContainer/VContainerRelationalEntryPointTests.cs +77 -0
- package/Tests/Editor/Integrations/VContainer/VContainerRelationalEntryPointTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Editor.VContainer.asmdef +36 -0
- package/Tests/Editor/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Editor.VContainer.asmdef.meta +7 -0
- package/Tests/Editor/Integrations/VContainer.meta +8 -0
- package/Tests/Editor/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Editor.Zenject.asmdef +36 -0
- package/Tests/Editor/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Editor.Zenject.asmdef.meta +7 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectIntegrationCompilationTests.cs +40 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectIntegrationCompilationTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectRelationalInitializerTests.cs +76 -0
- package/Tests/Editor/Integrations/Zenject/ZenjectRelationalInitializerTests.cs.meta +11 -0
- package/Tests/Editor/Integrations/Zenject.meta +8 -0
- package/Tests/Editor/Integrations.meta +8 -0
- package/Tests/Editor/MultiFileSelectorElementTests.cs +265 -0
- package/Tests/Editor/MultiFileSelectorElementTests.cs.meta +11 -0
- package/Tests/Editor/MultiFileSelectorPersistenceManagerTests.cs +100 -0
- package/Tests/Editor/MultiFileSelectorPersistenceManagerTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/AnimationCopierWindowTests.cs +199 -0
- package/Tests/Editor/Sprites/AnimationCopierWindowTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/ScriptableSpriteAtlasEditorTests.cs +108 -0
- package/Tests/Editor/Sprites/ScriptableSpriteAtlasEditorTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/SpriteCropperAdditionalTests.cs +323 -0
- package/Tests/Editor/Sprites/SpriteCropperAdditionalTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/SpriteCropperTests.cs +162 -0
- package/Tests/Editor/Sprites/SpriteCropperTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/SpritePivotAdjusterAdditionalTests.cs +227 -0
- package/Tests/Editor/Sprites/SpritePivotAdjusterAdditionalTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/SpritePivotAdjusterTests.cs +113 -0
- package/Tests/Editor/Sprites/SpritePivotAdjusterTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/TexturePlatformNameHelperTests.cs +28 -0
- package/Tests/Editor/Sprites/TexturePlatformNameHelperTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/TextureResizerWizardTests.cs +248 -0
- package/Tests/Editor/Sprites/TextureResizerWizardTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierAPITests.cs +180 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierAPITests.cs.meta +11 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardAdditionalTests.cs +295 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardAdditionalTests.cs.meta +11 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardTests.cs +134 -0
- package/Tests/Editor/Sprites/TextureSettingsApplierWizardTests.cs.meta +11 -0
- package/Tests/Editor/Sprites.meta +8 -0
- package/Tests/Editor/TestComponents/PrewarmTesterComponent.cs +10 -0
- package/Tests/Editor/TestComponents/PrewarmTesterComponent.cs.meta +11 -0
- package/Tests/Editor/TestComponents.meta +8 -0
- package/Tests/Editor/Tools/ImageBlurToolTests.cs +135 -0
- package/Tests/Editor/Tools/ImageBlurToolTests.cs.meta +11 -0
- package/Tests/Editor/Tools.meta +8 -0
- package/Tests/Editor/Utils/CommonTestBase.cs +208 -0
- package/Tests/Editor/Utils/CommonTestBase.cs.meta +11 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorEditorTests.cs +306 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorEditorTests.cs.meta +9 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorTests.cs +183 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonCreatorTests.cs.meta +11 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonTests.cs +466 -0
- package/Tests/Editor/Utils/ScriptableObjectSingletonTests.cs.meta +11 -0
- package/Tests/Editor/Utils.meta +3 -0
- package/Tests/Editor/WallstopStudios.UnityHelpers.Tests.Editor.asmdef +19 -0
- package/Tests/Editor/WallstopStudios.UnityHelpers.Tests.Editor.asmdef.meta +7 -0
- package/Tests/Editor/Windows/FitTextureSizeWindowTests.cs +781 -0
- package/Tests/Editor/Windows/FitTextureSizeWindowTests.cs.meta +11 -0
- package/Tests/Editor/Windows/PrefabCheckerFolderAdditionTests.cs +96 -0
- package/Tests/Editor/Windows/PrefabCheckerFolderAdditionTests.cs.meta +11 -0
- package/Tests/Editor/Windows/PrefabCheckerTests.cs +81 -0
- package/Tests/Editor/Windows/PrefabCheckerTests.cs.meta +11 -0
- package/Tests/Editor/Windows.meta +8 -0
- package/Tests/Editor.meta +8 -0
- package/Tests/Runtime/AssemblyInfo.cs +4 -0
- package/Tests/Runtime/AssemblyInfo.cs.meta +3 -0
- package/Tests/Runtime/Attributes/ChildComponentTests.cs +766 -81
- package/Tests/Runtime/Attributes/ChildComponentTests.cs.meta +2 -2
- package/Tests/Runtime/Attributes/Components/ExpectChildSpriteRenderers.cs +28 -28
- package/Tests/Runtime/Attributes/Components/ExpectChildSpriteRenderers.cs.meta +2 -2
- package/Tests/Runtime/Attributes/Components/ExpectParentSpriteRenderers.cs +28 -28
- package/Tests/Runtime/Attributes/Components/ExpectParentSpriteRenderers.cs.meta +2 -2
- package/Tests/Runtime/{Components → Attributes/Components}/RelationalComponentTesterComplex.cs +34 -34
- package/Tests/Runtime/{Components → Attributes/Components}/RelationalComponentTesterComplex.cs.meta +2 -2
- package/Tests/Runtime/Attributes/Components/RelationalComponentsTesterSimple.cs +37 -0
- package/Tests/Runtime/{Components → Attributes/Components}/RelationalComponentsTesterSimple.cs.meta +2 -2
- package/Tests/Runtime/Attributes/Components.meta +2 -2
- package/Tests/Runtime/Attributes/MiscRuntimeAttributeTests.cs +75 -0
- package/Tests/Runtime/Attributes/MiscRuntimeAttributeTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/NotNullAttributeTests.cs +26 -0
- package/Tests/Runtime/Attributes/NotNullAttributeTests.cs.meta +3 -0
- package/Tests/Runtime/Attributes/ParentComponentTests.cs +565 -68
- package/Tests/Runtime/Attributes/ParentComponentTests.cs.meta +2 -2
- package/Tests/Runtime/Attributes/RelationalComponentAdvancedTests.cs +614 -0
- package/Tests/Runtime/Attributes/RelationalComponentAdvancedTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/RelationalComponentBackwardCompatibilityTests.cs +478 -0
- package/Tests/Runtime/Attributes/RelationalComponentBackwardCompatibilityTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/RelationalComponentExtensionsTests.cs +56 -0
- package/Tests/Runtime/Attributes/RelationalComponentExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/RelationalComponentHashSetTests.cs +226 -0
- package/Tests/Runtime/Attributes/RelationalComponentHashSetTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/RelationalComponentInitializerTests.cs +109 -0
- package/Tests/Runtime/Attributes/RelationalComponentInitializerTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/RelationalComponentTagAndNameFilterEdgeTests.cs +234 -0
- package/Tests/Runtime/Attributes/RelationalComponentTagAndNameFilterEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/SiblingComponentTests.cs +721 -0
- package/Tests/Runtime/Attributes/SiblingComponentTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes/ValidateAssignmentAttributeTests.cs +96 -0
- package/Tests/Runtime/Attributes/ValidateAssignmentAttributeTests.cs.meta +11 -0
- package/Tests/Runtime/Attributes.meta +2 -2
- package/Tests/Runtime/Core/Random/RandomComparerTests.cs +166 -0
- package/Tests/Runtime/Core/Random/RandomComparerTests.cs.meta +11 -0
- package/Tests/Runtime/Core/Random.meta +8 -0
- package/Tests/Runtime/Core/Threading/SingleThreadedThreadPoolTests.cs +56 -56
- package/Tests/Runtime/Core/Threading/SingleThreadedThreadPoolTests.cs.meta +2 -2
- package/Tests/Runtime/Core/Threading.meta +2 -2
- package/Tests/Runtime/Core.meta +2 -2
- package/Tests/Runtime/DataStructures/BalancedKDTree2DTests.cs +562 -0
- package/Tests/Runtime/DataStructures/{BalancedKDTreeTests.cs.meta → BalancedKDTree2DTests.cs.meta} +11 -11
- package/Tests/Runtime/DataStructures/BalancedKDTree3DTests.cs +10 -0
- package/Tests/Runtime/DataStructures/BalancedKDTree3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/BitSetTests.cs +1400 -0
- package/Tests/Runtime/DataStructures/BitSetTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/BoundingBox3DTests.cs +1215 -0
- package/Tests/Runtime/DataStructures/BoundingBox3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/CircleTests.cs +965 -0
- package/Tests/Runtime/DataStructures/CircleTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/CyclicBufferTests.cs +2083 -324
- package/Tests/Runtime/DataStructures/CyclicBufferTests.cs.meta +2 -2
- package/Tests/Runtime/DataStructures/DequeTests.cs +790 -0
- package/Tests/Runtime/DataStructures/DequeTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/DisjointSetTests.cs +1114 -0
- package/Tests/Runtime/DataStructures/DisjointSetTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/FastOneOfTests.cs +966 -0
- package/Tests/Runtime/DataStructures/FastOneOfTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/FastVector2IntTests.cs +286 -0
- package/Tests/Runtime/DataStructures/FastVector2IntTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/FastVector3IntTests.cs +414 -0
- package/Tests/Runtime/DataStructures/FastVector3IntTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/HeapTests.cs +1953 -0
- package/Tests/Runtime/DataStructures/HeapTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/ImmutableBitSetTests.cs +833 -0
- package/Tests/Runtime/DataStructures/ImmutableBitSetTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/KDTree3DTestsBase.cs +297 -0
- package/Tests/Runtime/DataStructures/KDTree3DTestsBase.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/OctTree3DTests.cs +351 -0
- package/Tests/Runtime/DataStructures/OctTree3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/PriorityQueueTests.cs +71 -0
- package/Tests/Runtime/DataStructures/PriorityQueueTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/ProtobufSerializationTests.cs +475 -0
- package/Tests/Runtime/DataStructures/ProtobufSerializationTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/QuadTree2DTests.cs +660 -0
- package/Tests/Runtime/DataStructures/QuadTree2DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/RTree2DTests.cs +823 -0
- package/Tests/Runtime/DataStructures/RTree2DTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/RTree3DTests.cs +270 -0
- package/Tests/Runtime/DataStructures/RTree3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SparseSetTests.cs +1146 -0
- package/Tests/Runtime/DataStructures/SparseSetTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/SpatialHashTests.cs +992 -0
- package/Tests/Runtime/DataStructures/SpatialHashTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsConsistencyTests.cs +351 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsConsistencyTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsEdgeTests.cs +127 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsFuzzTests.cs +218 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DBoundsFuzzTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DTests.cs +396 -0
- package/Tests/Runtime/DataStructures/SpatialTree2DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsConsistencyTests.cs +281 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsConsistencyTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsEdgeTests.cs +127 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsFuzzTests.cs +170 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DBoundsFuzzTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DTests.cs +474 -0
- package/Tests/Runtime/DataStructures/SpatialTree3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/SphereTests.cs +806 -0
- package/Tests/Runtime/DataStructures/SphereTests.cs.meta +3 -0
- package/Tests/Runtime/DataStructures/StringWrapperTests.cs +333 -0
- package/Tests/Runtime/DataStructures/StringWrapperTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/TimedCacheTests.cs +669 -0
- package/Tests/Runtime/DataStructures/TimedCacheTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/TrieTests.cs +3385 -0
- package/Tests/Runtime/DataStructures/TrieTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures/UnbalancedKDTree2DTests.cs +565 -0
- package/Tests/Runtime/DataStructures/{UnbalancedKDTreeTests.cs.meta → UnbalancedKDTree2DTests.cs.meta} +11 -11
- package/Tests/Runtime/DataStructures/UnbalancedKDTree3DTests.cs +10 -0
- package/Tests/Runtime/DataStructures/UnbalancedKDTree3DTests.cs.meta +11 -0
- package/Tests/Runtime/DataStructures.meta +8 -8
- package/Tests/Runtime/Extensions/AnimatorExtensionsTests.cs +28 -0
- package/Tests/Runtime/Extensions/AnimatorExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/AsyncOperationExtensionsTests.cs +667 -0
- package/Tests/Runtime/Extensions/AsyncOperationExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/CircleExtensionsTests.cs +230 -0
- package/Tests/Runtime/Extensions/CircleExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/ColorExtensionsTests.cs +55 -0
- package/Tests/Runtime/Extensions/ColorExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/DictionaryExtensionTests.cs +724 -438
- package/Tests/Runtime/Extensions/DictionaryExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/DirectionExtensionsComprehensiveTests.cs +403 -0
- package/Tests/Runtime/Extensions/DirectionExtensionsComprehensiveTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/DirectionExtensionsTests.cs +69 -0
- package/Tests/Runtime/Extensions/DirectionExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/EnumExtensionTests.cs +809 -153
- package/Tests/Runtime/Extensions/EnumExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/IEnumerableExtensionsTests.cs +191 -0
- package/Tests/Runtime/Extensions/IEnumerableExtensionsTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/IListExtensionTests.cs +955 -169
- package/Tests/Runtime/Extensions/IListExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/IReadonlyListExtensionTests.cs +266 -58
- package/Tests/Runtime/Extensions/IReadonlyListExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/LoggingExtensionTests.cs +721 -718
- package/Tests/Runtime/Extensions/LoggingExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/ProtoEqualityExtensionsTests.cs +565 -0
- package/Tests/Runtime/Extensions/ProtoEqualityExtensionsTests.cs.meta +3 -0
- package/Tests/Runtime/Extensions/ProtoEqualityPolymorphismTests.cs +100 -0
- package/Tests/Runtime/Extensions/ProtoEqualityPolymorphismTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/RandomExtensionTests.cs +719 -27
- package/Tests/Runtime/Extensions/RandomExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/StringExtensionTests.cs +2592 -31
- package/Tests/Runtime/Extensions/StringExtensionTests.cs.meta +2 -2
- package/Tests/Runtime/Extensions/UnityExtensionsBasicTests.cs +166 -0
- package/Tests/Runtime/Extensions/UnityExtensionsBasicTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/UnityExtensionsComprehensiveTests.cs +1446 -0
- package/Tests/Runtime/Extensions/UnityExtensionsComprehensiveTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/UnityExtensionsMathTests.cs +1779 -0
- package/Tests/Runtime/Extensions/UnityExtensionsMathTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/UnityExtensionsVector2HullTests.cs +292 -0
- package/Tests/Runtime/Extensions/UnityExtensionsVector2HullTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions/UnityLogTagFormatterEdgeTests.cs +260 -0
- package/Tests/Runtime/Extensions/UnityLogTagFormatterEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Extensions.meta +2 -2
- package/Tests/Runtime/Helper/ArrayConverterTests.cs +19 -19
- package/Tests/Runtime/Helper/ArrayConverterTests.cs.meta +2 -2
- package/Tests/Runtime/Helper/AssignUtilitiesTests.cs +38 -0
- package/Tests/Runtime/Helper/AssignUtilitiesTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/DirectoryHelperTests.cs +347 -0
- package/Tests/Runtime/Helper/DirectoryHelperTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/EnumerablesTests.cs +45 -0
- package/Tests/Runtime/Helper/EnumerablesTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/FileHelperTests.cs +481 -0
- package/Tests/Runtime/Helper/FileHelperTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/FormattingHelpersTests.cs +353 -0
- package/Tests/Runtime/Helper/FormattingHelpersTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/FuncBasedComparerTests.cs +27 -0
- package/Tests/Runtime/Helper/FuncBasedComparerTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/GeometryTests.cs +517 -0
- package/Tests/Runtime/Helper/GeometryTests.cs.meta +3 -0
- package/Tests/Runtime/Helper/HelpersTests.cs +749 -0
- package/Tests/Runtime/Helper/HelpersTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/IterationHelpersTests.cs +173 -0
- package/Tests/Runtime/Helper/IterationHelpersTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/LineHelperTests.cs +662 -0
- package/Tests/Runtime/Helper/LineHelperTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/ObjectHelperTests.cs +444 -432
- package/Tests/Runtime/Helper/ObjectHelperTests.cs.meta +2 -2
- package/Tests/Runtime/Helper/ObjectsTests.cs +363 -0
- package/Tests/Runtime/Helper/ObjectsTests.cs.meta +3 -0
- package/Tests/Runtime/Helper/PathHelperTests.cs +183 -0
- package/Tests/Runtime/Helper/PathHelperTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/ReflectionHelperTests.cs +2199 -1493
- package/Tests/Runtime/Helper/ReflectionHelperTests.cs.meta +2 -2
- package/Tests/Runtime/Helper/ReflectionHelpersMemberLookupTests.cs +192 -0
- package/Tests/Runtime/Helper/ReflectionHelpersMemberLookupTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/ReflectionHelpersTypeScanningTests.cs +58 -0
- package/Tests/Runtime/Helper/ReflectionHelpersTypeScanningTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/SceneHelperTests.cs +77 -94
- package/Tests/Runtime/Helper/SceneHelperTests.cs.meta +2 -2
- package/Tests/Runtime/Helper/UnityMainThreadDispatcherTests.cs +45 -0
- package/Tests/Runtime/Helper/UnityMainThreadDispatcherTests.cs.meta +11 -0
- package/Tests/Runtime/Helper/WallMathTests.cs +1884 -233
- package/Tests/Runtime/Helper/WallMathTests.cs.meta +2 -2
- package/Tests/Runtime/Helper.meta +2 -2
- package/Tests/Runtime/Integrations/VContainer/RelationalComponentsVContainerTests.cs +560 -0
- package/Tests/Runtime/Integrations/VContainer/RelationalComponentsVContainerTests.cs.meta +11 -0
- package/Tests/Runtime/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Runtime.VContainer.asmdef +38 -0
- package/Tests/Runtime/Integrations/VContainer/WallstopStudios.UnityHelpers.Tests.Runtime.VContainer.asmdef.meta +7 -0
- package/Tests/Runtime/Integrations/VContainer.meta +8 -0
- package/Tests/Runtime/Integrations/Zenject/RelationalComponentsZenjectTests.cs +591 -0
- package/Tests/Runtime/Integrations/Zenject/RelationalComponentsZenjectTests.cs.meta +11 -0
- package/Tests/Runtime/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Runtime.Zenject.asmdef +38 -0
- package/Tests/Runtime/Integrations/Zenject/WallstopStudios.UnityHelpers.Tests.Runtime.Zenject.asmdef.meta +7 -0
- package/Tests/Runtime/Integrations/Zenject.meta +8 -0
- package/Tests/Runtime/Integrations.meta +8 -0
- package/Tests/Runtime/Math/Line2DTests.cs +594 -0
- package/Tests/Runtime/Math/Line2DTests.cs.meta +11 -0
- package/Tests/Runtime/Math/Line3DTests.cs +655 -0
- package/Tests/Runtime/Math/Line3DTests.cs.meta +11 -0
- package/Tests/Runtime/Math/LineTests.cs +480 -0
- package/Tests/Runtime/Math/LineTests.cs.meta +11 -0
- package/Tests/Runtime/Math/ParabolaTests.cs +477 -0
- package/Tests/Runtime/Math/ParabolaTests.cs.meta +11 -0
- package/Tests/Runtime/Math/PointPolygonCheckTests.cs +939 -0
- package/Tests/Runtime/Math/PointPolygonCheckTests.cs.meta +11 -0
- package/Tests/Runtime/Math/RangeTests.cs +197 -0
- package/Tests/Runtime/Math/RangeTests.cs.meta +11 -0
- package/Tests/Runtime/Math.meta +8 -0
- package/Tests/Runtime/Performance/BenchmarkReadmeUpdater.cs +81 -0
- package/Tests/Runtime/Performance/BenchmarkReadmeUpdater.cs.meta +11 -0
- package/Tests/Runtime/Performance/JsonSerializationPerformanceTests.cs +421 -0
- package/Tests/Runtime/Performance/JsonSerializationPerformanceTests.cs.meta +3 -0
- package/Tests/Runtime/Performance/ListExtensionPerformanceTests.cs +76 -76
- package/Tests/Runtime/Performance/ListExtensionPerformanceTests.cs.meta +2 -2
- package/Tests/Runtime/Performance/ProtoEqualsPerformanceTests.cs +161 -0
- package/Tests/Runtime/Performance/ProtoEqualsPerformanceTests.cs.meta +11 -0
- package/Tests/Runtime/Performance/ProtoSerializationPerformanceTests.cs +207 -0
- package/Tests/Runtime/Performance/ProtoSerializationPerformanceTests.cs.meta +3 -0
- package/Tests/Runtime/Performance/RandomPerformanceTests.cs +195 -181
- package/Tests/Runtime/Performance/RandomPerformanceTests.cs.meta +11 -11
- package/Tests/Runtime/Performance/RelationComponentPerformanceTests.cs +60 -61
- package/Tests/Runtime/Performance/RelationComponentPerformanceTests.cs.meta +2 -2
- package/Tests/Runtime/Performance/SpatialTree2DPerformanceTests.cs +692 -0
- package/Tests/Runtime/Performance/SpatialTree2DPerformanceTests.cs.meta +11 -0
- package/Tests/Runtime/Performance/SpatialTree3DPerformanceTests.cs +650 -0
- package/Tests/Runtime/Performance/SpatialTree3DPerformanceTests.cs.meta +11 -0
- package/Tests/Runtime/Performance.meta +8 -8
- package/Tests/Runtime/Random/DotNetRandomTests.cs +9 -9
- package/Tests/Runtime/Random/DotNetRandomTests.cs.meta +2 -2
- package/Tests/Runtime/Random/IllusionFlowTests.cs +12 -12
- package/Tests/Runtime/Random/IllusionFlowTests.cs.meta +2 -2
- package/Tests/Runtime/Random/LinearCongruentialGeneratorTests.cs +12 -12
- package/Tests/Runtime/Random/LinearCongruentialGeneratorTests.cs.meta +2 -2
- package/Tests/Runtime/Random/PcgRandomTests.cs +9 -9
- package/Tests/Runtime/Random/PcgRandomTests.cs.meta +11 -11
- package/Tests/Runtime/Random/RandomProtoSerializationTests.cs +494 -0
- package/Tests/Runtime/Random/RandomProtoSerializationTests.cs.meta +3 -0
- package/Tests/Runtime/Random/RandomStateSerializationTests.cs +304 -0
- package/Tests/Runtime/Random/RandomStateSerializationTests.cs.meta +4 -0
- package/Tests/Runtime/Random/RandomTestBase.cs +836 -787
- package/Tests/Runtime/Random/RandomTestBase.cs.meta +11 -11
- package/Tests/Runtime/Random/RomuDuoRandomTests.cs +9 -9
- package/Tests/Runtime/Random/RomuDuoRandomTests.cs.meta +2 -2
- package/Tests/Runtime/Random/SplitMix64RandomTests.cs +9 -9
- package/Tests/Runtime/Random/SplitMix64RandomTests.cs.meta +2 -2
- package/Tests/Runtime/Random/SquirrelRandomTests.cs +14 -14
- package/Tests/Runtime/Random/SquirrelRandomTests.cs.meta +11 -11
- package/Tests/Runtime/Random/SystemRandomTests.cs +10 -10
- package/Tests/Runtime/Random/SystemRandomTests.cs.meta +11 -11
- package/Tests/Runtime/Random/UnityRandomTests.cs +9 -9
- package/Tests/Runtime/Random/UnityRandomTests.cs.meta +11 -11
- package/Tests/Runtime/Random/WyRandomTests.cs +9 -9
- package/Tests/Runtime/Random/WyRandomTests.cs.meta +2 -2
- package/Tests/Runtime/Random/XorShiftRandomTests.cs +9 -9
- package/Tests/Runtime/Random/XorShiftRandomTests.cs.meta +11 -11
- package/Tests/Runtime/Random/XoroShiroRandomTests.cs +9 -9
- package/Tests/Runtime/Random/XoroShiroRandomTests.cs.meta +2 -2
- package/Tests/Runtime/Random.meta +8 -8
- package/Tests/Runtime/RuntimeTestTimeouts.cs +3 -0
- package/Tests/Runtime/RuntimeTestTimeouts.cs.meta +11 -0
- package/Tests/Runtime/Scenes/Test1.unity +723 -723
- package/Tests/Runtime/Scenes/Test1.unity.meta +7 -7
- package/Tests/Runtime/Scenes/Test2.unity +723 -723
- package/Tests/Runtime/Scenes/Test2.unity.meta +7 -7
- package/Tests/Runtime/Scenes.meta +2 -2
- package/Tests/Runtime/Serialization/AdaptersJsonTests.cs +67 -0
- package/Tests/Runtime/Serialization/AdaptersJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/BitSetJsonTests.cs +50 -0
- package/Tests/Runtime/Serialization/BitSetJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/CyclicBufferJsonTests.cs +67 -0
- package/Tests/Runtime/Serialization/CyclicBufferJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/DequeJsonTests.cs +70 -0
- package/Tests/Runtime/Serialization/DequeJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ImmutableBitSetJsonTests.cs +25 -0
- package/Tests/Runtime/Serialization/ImmutableBitSetJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/JsonConverterTests.cs +1157 -0
- package/Tests/Runtime/Serialization/JsonConverterTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/JsonRoundtripComprehensiveTests.cs +239 -0
- package/Tests/Runtime/Serialization/JsonRoundtripComprehensiveTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/JsonSerializationCorrectnessTests.cs +458 -0
- package/Tests/Runtime/Serialization/JsonSerializationCorrectnessTests.cs.meta +3 -0
- package/Tests/Runtime/Serialization/JsonSerializationTest.cs +156 -156
- package/Tests/Runtime/Serialization/JsonSerializationTest.cs.meta +2 -2
- package/Tests/Runtime/Serialization/MathJsonTests.cs +79 -0
- package/Tests/Runtime/Serialization/MathJsonTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ProtoInterfaceResolutionEdgeTests.cs +76 -0
- package/Tests/Runtime/Serialization/ProtoInterfaceResolutionEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ProtoRootRegistrationTests.cs +80 -0
- package/Tests/Runtime/Serialization/ProtoRootRegistrationTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ProtoRoundtripComprehensiveTests.cs +257 -0
- package/Tests/Runtime/Serialization/ProtoRoundtripComprehensiveTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ProtoSerializationCorrectnessTests.cs +471 -0
- package/Tests/Runtime/Serialization/ProtoSerializationCorrectnessTests.cs.meta +3 -0
- package/Tests/Runtime/Serialization/ProtoSerializationTests.cs +169 -0
- package/Tests/Runtime/Serialization/ProtoSerializationTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/ProtoSerializeBehaviorTests.cs +62 -0
- package/Tests/Runtime/Serialization/ProtoSerializeBehaviorTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization/SerializerAdditionalTests.cs +895 -0
- package/Tests/Runtime/Serialization/SerializerAdditionalTests.cs.meta +3 -0
- package/Tests/Runtime/Serialization/TypeConverterTests.cs +34 -0
- package/Tests/Runtime/Serialization/TypeConverterTests.cs.meta +11 -0
- package/Tests/Runtime/Serialization.meta +2 -2
- package/Tests/Runtime/Tags/AttributeComponentTests.cs +174 -0
- package/Tests/Runtime/Tags/AttributeComponentTests.cs.meta +3 -0
- package/Tests/Runtime/Tags/AttributeDataTests.cs +312 -0
- package/Tests/Runtime/Tags/AttributeDataTests.cs.meta +11 -0
- package/Tests/Runtime/Tags/AttributeUtilitiesTests.cs +405 -0
- package/Tests/Runtime/Tags/AttributeUtilitiesTests.cs.meta +3 -0
- package/Tests/Runtime/Tags/CosmeticAndCollisionTests.cs +147 -0
- package/Tests/Runtime/Tags/CosmeticAndCollisionTests.cs.meta +11 -0
- package/Tests/Runtime/Tags/CosmeticEffectDataTests.cs +60 -0
- package/Tests/Runtime/Tags/CosmeticEffectDataTests.cs.meta +3 -0
- package/Tests/Runtime/Tags/EffectHandleTests.cs +61 -0
- package/Tests/Runtime/Tags/EffectHandleTests.cs.meta +3 -0
- package/Tests/Runtime/Tags/EffectHandlerTests.cs +270 -0
- package/Tests/Runtime/Tags/EffectHandlerTests.cs.meta +3 -0
- package/Tests/Runtime/Tags/Helpers/RecordingCosmeticComponent.cs +39 -0
- package/Tests/Runtime/Tags/Helpers/RecordingCosmeticComponent.cs.meta +3 -0
- package/Tests/Runtime/Tags/Helpers/TagTestBase.cs +49 -0
- package/Tests/Runtime/Tags/Helpers/TagTestBase.cs.meta +3 -0
- package/Tests/Runtime/Tags/Helpers/TestAttributesComponent.cs +28 -0
- package/Tests/Runtime/Tags/Helpers/TestAttributesComponent.cs.meta +3 -0
- package/Tests/Runtime/Tags/Helpers.meta +3 -0
- package/Tests/Runtime/Tags/TagHandlerTests.cs +108 -0
- package/Tests/Runtime/Tags/TagHandlerTests.cs.meta +3 -0
- package/Tests/Runtime/Tags.meta +8 -0
- package/Tests/Runtime/TestUtils/CommonTestBase.cs +213 -0
- package/Tests/Runtime/TestUtils/CommonTestBase.cs.meta +11 -0
- package/Tests/Runtime/TestUtils/GCAssert.cs +55 -0
- package/Tests/Runtime/TestUtils/GCAssert.cs.meta +11 -0
- package/Tests/Runtime/TestUtils/SpatialAssert.cs +33 -0
- package/Tests/Runtime/TestUtils/SpatialAssert.cs.meta +11 -0
- package/Tests/Runtime/TestUtils/SpatialDiagnostics.cs +195 -0
- package/Tests/Runtime/TestUtils/SpatialDiagnostics.cs.meta +11 -0
- package/Tests/Runtime/TestUtils.meta +8 -0
- package/Tests/Runtime/Utils/AnimationEventEqualityComparerTests.cs +144 -0
- package/Tests/Runtime/Utils/AnimationEventEqualityComparerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/Ascii85Tests.cs +56 -0
- package/Tests/Runtime/Utils/Ascii85Tests.cs.meta +11 -0
- package/Tests/Runtime/Utils/BuffersTests.cs +1148 -741
- package/Tests/Runtime/Utils/BuffersTests.cs.meta +2 -2
- package/Tests/Runtime/Utils/BuffersWaitInstructionTests.cs +31 -0
- package/Tests/Runtime/Utils/BuffersWaitInstructionTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/CenterPointOffsetTests.cs +67 -0
- package/Tests/Runtime/Utils/CenterPointOffsetTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/ChildSpawnerTests.cs +490 -0
- package/Tests/Runtime/Utils/ChildSpawnerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/CircleLineRendererTests.cs +80 -0
- package/Tests/Runtime/Utils/CircleLineRendererTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/CollisionProxyTests.cs +442 -0
- package/Tests/Runtime/Utils/CollisionProxyTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/CoroutineHandlerTests.cs +353 -0
- package/Tests/Runtime/Utils/CoroutineHandlerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/DeferredDisposalResultTests.cs +44 -0
- package/Tests/Runtime/Utils/DeferredDisposalResultTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/LZMAComprehensiveTests.cs +249 -0
- package/Tests/Runtime/Utils/LZMAComprehensiveTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/LZMATests.cs +31 -0
- package/Tests/Runtime/Utils/LZMATests.cs.meta +11 -0
- package/Tests/Runtime/Utils/MatchColliderToSpriteAdditionalTests.cs +86 -0
- package/Tests/Runtime/Utils/MatchColliderToSpriteAdditionalTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/MatchColliderToSpriteTests.cs +503 -0
- package/Tests/Runtime/Utils/MatchColliderToSpriteTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/MatchTransformEdgeTests.cs +34 -0
- package/Tests/Runtime/Utils/MatchTransformEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/MatchTransformTests.cs +495 -0
- package/Tests/Runtime/Utils/MatchTransformTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/OscillatorTests.cs +540 -0
- package/Tests/Runtime/Utils/OscillatorTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/PolygonCollider2DOptimizerTests.cs +52 -0
- package/Tests/Runtime/Utils/PolygonCollider2DOptimizerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/RuntimeSingletonTests.cs +766 -0
- package/Tests/Runtime/Utils/RuntimeSingletonTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/SerializedStringComparerEdgeTests.cs +47 -0
- package/Tests/Runtime/Utils/SerializedStringComparerEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/SerializedStringComparerTests.cs +361 -0
- package/Tests/Runtime/Utils/SerializedStringComparerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/SpriteRendererMetadataTests.cs +383 -398
- package/Tests/Runtime/Utils/SpriteRendererMetadataTests.cs.meta +2 -2
- package/Tests/Runtime/Utils/SpriteRendererSyncTests.cs +134 -0
- package/Tests/Runtime/Utils/SpriteRendererSyncTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/StartTrackerTests.cs +24 -0
- package/Tests/Runtime/Utils/StartTrackerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/TextureScaleEdgeTests.cs +114 -0
- package/Tests/Runtime/Utils/TextureScaleEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/TextureScaleTests.cs +298 -0
- package/Tests/Runtime/Utils/TextureScaleTests.cs.meta +3 -0
- package/Tests/Runtime/Utils/TypeNameSorterAdditionalTests.cs +36 -0
- package/Tests/Runtime/Utils/TypeNameSorterAdditionalTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/TypeNameSorterTests.cs +34 -0
- package/Tests/Runtime/Utils/TypeNameSorterTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/UnityObjectNameComparerEdgeTests.cs +63 -0
- package/Tests/Runtime/Utils/UnityObjectNameComparerEdgeTests.cs.meta +11 -0
- package/Tests/Runtime/Utils/UnityObjectNameComparerTests.cs +59 -0
- package/Tests/Runtime/Utils/UnityObjectNameComparerTests.cs.meta +11 -0
- package/Tests/Runtime/Utils.meta +2 -2
- package/Tests/Runtime/Visuals/AnimatedSpriteLayerTests.cs +266 -0
- package/Tests/Runtime/Visuals/AnimatedSpriteLayerTests.cs.meta +11 -0
- package/Tests/Runtime/Visuals/EnhancedImageTests.cs +184 -0
- package/Tests/Runtime/Visuals/EnhancedImageTests.cs.meta +11 -0
- package/Tests/Runtime/Visuals/LayeredImageTests.cs +422 -0
- package/Tests/Runtime/Visuals/LayeredImageTests.cs.meta +11 -0
- package/Tests/Runtime/Visuals/VisualsTestHelpers.cs +132 -0
- package/Tests/Runtime/Visuals/VisualsTestHelpers.cs.meta +11 -0
- package/Tests/Runtime/Visuals.meta +3 -0
- package/Tests/Runtime/WallstopStudios.UnityHelpers.Tests.Runtime.asmdef +24 -23
- package/Tests/Runtime/WallstopStudios.UnityHelpers.Tests.Runtime.asmdef.meta +7 -7
- package/Tests/Runtime.meta +8 -8
- package/Tests.meta +8 -8
- package/URP/VolumeProfiles/Post Processing Bloom Profile(URP).asset +63 -63
- package/URP/VolumeProfiles/Post Processing Bloom Profile(URP).asset.meta +8 -8
- package/URP/VolumeProfiles.meta +8 -8
- package/URP.meta +8 -8
- package/node_modules.meta +8 -0
- package/package.json +95 -38
- package/package.json.meta +7 -7
- package/scripts/check-eol.ps1 +52 -0
- package/scripts/check-eol.ps1.meta +7 -0
- package/scripts/clean-nul.ps1 +29 -0
- package/scripts/clean-nul.ps1.meta +7 -0
- package/scripts/lint-doc-links.ps1 +80 -0
- package/scripts/lint-doc-links.ps1.meta +7 -0
- package/scripts/normalize-eol.ps1 +71 -0
- package/scripts/normalize-eol.ps1.meta +7 -0
- package/scripts.meta +8 -0
- package/Editor/Sprites/ProjectAnimationSettings.cs +0 -50
- package/Editor/Sprites/ProjectAnimationSettings.cs.meta +0 -3
- package/Editor/Sprites/TextureSettingsApplier.cs +0 -178
- package/Editor/Sprites/TextureSettingsApplier.cs.meta +0 -3
- package/Runtime/Core/Attributes/ParentComponent.cs +0 -189
- package/Runtime/Core/DataStructure/KDTree.cs +0 -434
- package/Runtime/Core/DataStructure/QuadTree.cs +0 -431
- package/Runtime/Core/DataStructure/RTree.cs +0 -356
- package/Runtime/Core/Extension/HashSetExtensions.cs +0 -12
- package/Runtime/Core/Extension/HashSetExtensions.cs.meta +0 -11
- package/Runtime/Core/Math/Line.cs +0 -55
- package/Runtime/Core/Math/Line.cs.meta +0 -11
- package/Runtime/Core/Math/XXHash.cs +0 -310
- package/Runtime/Core/Math/XXHash.cs.meta +0 -11
- package/Tests/Runtime/Components/RelationalComponentsTesterSimple.cs +0 -40
- package/Tests/Runtime/Components.meta +0 -3
- package/Tests/Runtime/DataStructures/BalancedKDTreeTests.cs +0 -14
- package/Tests/Runtime/DataStructures/QuadTreeTests.cs +0 -14
- package/Tests/Runtime/DataStructures/QuadTreeTests.cs.meta +0 -11
- package/Tests/Runtime/DataStructures/SpatialTreeTests.cs +0 -130
- package/Tests/Runtime/DataStructures/SpatialTreeTests.cs.meta +0 -11
- package/Tests/Runtime/DataStructures/UnbalancedKDTreeTests.cs +0 -14
- package/Tests/Runtime/Helper/FormattingHelperTests.cs +0 -129
- package/Tests/Runtime/Helper/FormattingHelperTests.cs.meta +0 -3
- package/Tests/Runtime/Performance/KDTreePerformanceTests.cs +0 -14
- package/Tests/Runtime/Performance/KDTreePerformanceTests.cs.meta +0 -11
- package/Tests/Runtime/Performance/QuadTreePerformanceTests.cs +0 -14
- package/Tests/Runtime/Performance/QuadTreePerformanceTests.cs.meta +0 -11
- package/Tests/Runtime/Performance/SpatialTreePerformanceTest.cs +0 -158
- package/Tests/Runtime/Performance/SpatialTreePerformanceTest.cs.meta +0 -11
- package/Tests/Runtime/Performance/UnbalancedKDTreeTests.cs +0 -14
- package/Tests/Runtime/Performance/UnbalancedKDTreeTests.cs.meta +0 -11
- package/Third Party Notices.md +0 -1
|
@@ -0,0 +1,1215 @@
|
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Tests.DataStructures
|
|
2
|
+
{
|
|
3
|
+
using NUnit.Framework;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
|
+
using WallstopStudios.UnityHelpers.Core.Math;
|
|
7
|
+
|
|
8
|
+
[TestFixture]
|
|
9
|
+
public sealed class BoundingBox3DTests
|
|
10
|
+
{
|
|
11
|
+
[Test]
|
|
12
|
+
public void ConstructorWithValidBoundsCreatesBox()
|
|
13
|
+
{
|
|
14
|
+
Vector3 min = new(0f, 0f, 0f);
|
|
15
|
+
Vector3 max = new(10f, 10f, 10f);
|
|
16
|
+
BoundingBox3D box = new(min, max);
|
|
17
|
+
|
|
18
|
+
Assert.AreEqual(min, box.min);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[Test]
|
|
22
|
+
public void ConstructorWithEqualMinMaxCreatesValidBox()
|
|
23
|
+
{
|
|
24
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
25
|
+
BoundingBox3D box = new(point, point);
|
|
26
|
+
|
|
27
|
+
Assert.AreEqual(point, box.min);
|
|
28
|
+
Assert.IsFalse(box.IsEmpty);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[Test]
|
|
32
|
+
public void ConstructorWithInvalidBoundsThrowsException()
|
|
33
|
+
{
|
|
34
|
+
Vector3 min = new(10f, 10f, 10f);
|
|
35
|
+
Vector3 max = new(0f, 0f, 0f);
|
|
36
|
+
|
|
37
|
+
Assert.Throws<System.ArgumentException>(() => new BoundingBox3D(min, max));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[Test]
|
|
41
|
+
public void ConstructorWithPartiallyInvalidBoundsThrowsException()
|
|
42
|
+
{
|
|
43
|
+
Vector3 min = new(0f, 10f, 0f);
|
|
44
|
+
Vector3 max = new(10f, 0f, 10f);
|
|
45
|
+
|
|
46
|
+
Assert.Throws<System.ArgumentException>(() => new BoundingBox3D(min, max));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[Test]
|
|
50
|
+
public void CenterReturnsCorrectMidpoint()
|
|
51
|
+
{
|
|
52
|
+
Vector3 min = new(0f, 0f, 0f);
|
|
53
|
+
Vector3 max = new(10f, 10f, 10f);
|
|
54
|
+
BoundingBox3D box = new(min, max);
|
|
55
|
+
|
|
56
|
+
Vector3 expectedCenter = new(5f, 5f, 5f);
|
|
57
|
+
Assert.AreEqual(expectedCenter.x, box.Center.x, 0.0001f);
|
|
58
|
+
Assert.AreEqual(expectedCenter.y, box.Center.y, 0.0001f);
|
|
59
|
+
Assert.AreEqual(expectedCenter.z, box.Center.z, 0.0001f);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[Test]
|
|
63
|
+
public void SizeReturnsCorrectDimensions()
|
|
64
|
+
{
|
|
65
|
+
Vector3 min = new(-5f, -5f, -5f);
|
|
66
|
+
Vector3 max = new(5f, 5f, 5f);
|
|
67
|
+
BoundingBox3D box = new(min, max);
|
|
68
|
+
|
|
69
|
+
Vector3 expectedSize = new(10f, 10f, 10f);
|
|
70
|
+
Assert.AreEqual(expectedSize.x, box.Size.x, 0.0001f);
|
|
71
|
+
Assert.AreEqual(expectedSize.y, box.Size.y, 0.0001f);
|
|
72
|
+
Assert.AreEqual(expectedSize.z, box.Size.z, 0.0001f);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[Test]
|
|
76
|
+
public void IsEmptyReturnsTrueForDefaultBox()
|
|
77
|
+
{
|
|
78
|
+
BoundingBox3D box = default;
|
|
79
|
+
Assert.IsTrue(box.IsEmpty);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[Test]
|
|
83
|
+
public void IsEmptyReturnsFalseForValidBox()
|
|
84
|
+
{
|
|
85
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
86
|
+
Assert.IsFalse(box.IsEmpty);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[Test]
|
|
90
|
+
public void EmptyPropertyReturnsEmptyBox()
|
|
91
|
+
{
|
|
92
|
+
BoundingBox3D empty = BoundingBox3D.Empty;
|
|
93
|
+
Assert.IsTrue(empty.IsEmpty);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[Test]
|
|
97
|
+
public void FromCenterAndSizeCreatesCorrectBox()
|
|
98
|
+
{
|
|
99
|
+
Vector3 center = new(5f, 5f, 5f);
|
|
100
|
+
Vector3 size = new(10f, 10f, 10f);
|
|
101
|
+
BoundingBox3D box = BoundingBox3D.FromCenterAndSize(center, size);
|
|
102
|
+
|
|
103
|
+
Assert.AreEqual(new Vector3(0f, 0f, 0f), box.min);
|
|
104
|
+
Assert.AreEqual(center.x, box.Center.x, 0.0001f);
|
|
105
|
+
Assert.AreEqual(center.y, box.Center.y, 0.0001f);
|
|
106
|
+
Assert.AreEqual(center.z, box.Center.z, 0.0001f);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[Test]
|
|
110
|
+
public void FromCenterAndSizeWithZeroSizeCreatesPoint()
|
|
111
|
+
{
|
|
112
|
+
Vector3 center = new(5f, 5f, 5f);
|
|
113
|
+
BoundingBox3D box = BoundingBox3D.FromCenterAndSize(center, Vector3.zero);
|
|
114
|
+
|
|
115
|
+
Assert.IsFalse(box.IsEmpty);
|
|
116
|
+
Assert.AreEqual(center, box.min);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
[Test]
|
|
120
|
+
public void FromClosedBoundsCreatesCorrectBox()
|
|
121
|
+
{
|
|
122
|
+
Bounds bounds = new(new Vector3(5f, 5f, 5f), new Vector3(10f, 10f, 10f));
|
|
123
|
+
BoundingBox3D box = BoundingBox3D.FromClosedBounds(bounds);
|
|
124
|
+
|
|
125
|
+
Assert.AreEqual(bounds.min, box.min);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[Test]
|
|
129
|
+
public void FromPointCreatesValidBox()
|
|
130
|
+
{
|
|
131
|
+
Vector3 point = new(3f, 4f, 5f);
|
|
132
|
+
BoundingBox3D box = BoundingBox3D.FromPoint(point);
|
|
133
|
+
|
|
134
|
+
Assert.AreEqual(point, box.min);
|
|
135
|
+
Assert.IsFalse(box.IsEmpty);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[Test]
|
|
139
|
+
public void ContainsPointInsideReturnsTrue()
|
|
140
|
+
{
|
|
141
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
142
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
143
|
+
|
|
144
|
+
Assert.IsTrue(box.Contains(point));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[Test]
|
|
148
|
+
public void ContainsPointOnMinBoundaryReturnsTrue()
|
|
149
|
+
{
|
|
150
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
151
|
+
Assert.IsTrue(box.Contains(Vector3.zero));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[Test]
|
|
155
|
+
public void ContainsPointOnMaxBoundaryReturnsFalse()
|
|
156
|
+
{
|
|
157
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
158
|
+
Assert.IsFalse(box.Contains(Vector3.one));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[Test]
|
|
162
|
+
public void ContainsPointOutsideReturnsFalse()
|
|
163
|
+
{
|
|
164
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
165
|
+
Vector3 point = new(2f, 2f, 2f);
|
|
166
|
+
|
|
167
|
+
Assert.IsFalse(box.Contains(point));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[Test]
|
|
171
|
+
public void ContainsPointJustBelowMinReturnsFalse()
|
|
172
|
+
{
|
|
173
|
+
BoundingBox3D box = new(Vector3.one, new Vector3(10f, 10f, 10f));
|
|
174
|
+
Vector3 point = new(0.999f, 5f, 5f);
|
|
175
|
+
|
|
176
|
+
Assert.IsFalse(box.Contains(point));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
[Test]
|
|
180
|
+
public void ContainsBoxCompletelyInsideReturnsTrue()
|
|
181
|
+
{
|
|
182
|
+
BoundingBox3D outer = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
183
|
+
BoundingBox3D inner = new(new Vector3(2f, 2f, 2f), new Vector3(8f, 8f, 8f));
|
|
184
|
+
|
|
185
|
+
Assert.IsTrue(outer.Contains(inner));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[Test]
|
|
189
|
+
public void ContainsBoxPartiallyOutsideReturnsFalse()
|
|
190
|
+
{
|
|
191
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
192
|
+
BoundingBox3D box2 = new(new Vector3(5f, 5f, 5f), new Vector3(15f, 15f, 15f));
|
|
193
|
+
|
|
194
|
+
Assert.IsFalse(box1.Contains(box2));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
[Test]
|
|
198
|
+
public void ContainsBoxCompletelyOutsideReturnsFalse()
|
|
199
|
+
{
|
|
200
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
201
|
+
BoundingBox3D box2 = new(new Vector3(10f, 10f, 10f), new Vector3(20f, 20f, 20f));
|
|
202
|
+
|
|
203
|
+
Assert.IsFalse(box1.Contains(box2));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[Test]
|
|
207
|
+
public void ContainsIdenticalBoxReturnsTrue()
|
|
208
|
+
{
|
|
209
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
210
|
+
BoundingBox3D box2 = new(Vector3.zero, Vector3.one);
|
|
211
|
+
|
|
212
|
+
Assert.IsTrue(box1.Contains(box2));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[Test]
|
|
216
|
+
public void ContainsEmptyBoxReturnsFalse()
|
|
217
|
+
{
|
|
218
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
219
|
+
Assert.IsFalse(box.Contains(BoundingBox3D.Empty));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
[Test]
|
|
223
|
+
public void IntersectsOverlappingBoxesReturnsTrue()
|
|
224
|
+
{
|
|
225
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
226
|
+
BoundingBox3D box2 = new(new Vector3(5f, 5f, 5f), new Vector3(15f, 15f, 15f));
|
|
227
|
+
|
|
228
|
+
Assert.IsTrue(box1.Intersects(box2));
|
|
229
|
+
Assert.IsTrue(box2.Intersects(box1));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
[Test]
|
|
233
|
+
public void IntersectsTouchingBoxesReturnsFalse()
|
|
234
|
+
{
|
|
235
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
236
|
+
BoundingBox3D box2 = new(Vector3.one, new Vector3(2f, 2f, 2f));
|
|
237
|
+
|
|
238
|
+
Assert.IsFalse(box1.Intersects(box2));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[Test]
|
|
242
|
+
public void IntersectsNonOverlappingBoxesReturnsFalse()
|
|
243
|
+
{
|
|
244
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
245
|
+
BoundingBox3D box2 = new(new Vector3(2f, 2f, 2f), new Vector3(3f, 3f, 3f));
|
|
246
|
+
|
|
247
|
+
Assert.IsFalse(box1.Intersects(box2));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
[Test]
|
|
251
|
+
public void IntersectsBoxInsideAnotherReturnsTrue()
|
|
252
|
+
{
|
|
253
|
+
BoundingBox3D outer = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
254
|
+
BoundingBox3D inner = new(new Vector3(2f, 2f, 2f), new Vector3(8f, 8f, 8f));
|
|
255
|
+
|
|
256
|
+
Assert.IsTrue(outer.Intersects(inner));
|
|
257
|
+
Assert.IsTrue(inner.Intersects(outer));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[Test]
|
|
261
|
+
public void IntersectsOnSingleAxisReturnsFalse()
|
|
262
|
+
{
|
|
263
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
264
|
+
BoundingBox3D box2 = new(new Vector3(0.5f, 2f, 0.5f), new Vector3(1.5f, 3f, 1.5f));
|
|
265
|
+
|
|
266
|
+
Assert.IsFalse(box1.Intersects(box2));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
[Test]
|
|
270
|
+
public void IntersectsEmptyBoxReturnsFalse()
|
|
271
|
+
{
|
|
272
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
273
|
+
Assert.IsFalse(box.Intersects(BoundingBox3D.Empty));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
[Test]
|
|
277
|
+
public void ExpandToIncludePointInsideReturnsUnchanged()
|
|
278
|
+
{
|
|
279
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
280
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
281
|
+
BoundingBox3D expanded = box.ExpandToInclude(point);
|
|
282
|
+
|
|
283
|
+
Assert.AreEqual(box.min, expanded.min);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
[Test]
|
|
287
|
+
public void ExpandToIncludePointOutsideExpandsBox()
|
|
288
|
+
{
|
|
289
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
290
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
291
|
+
BoundingBox3D expanded = box.ExpandToInclude(point);
|
|
292
|
+
|
|
293
|
+
Assert.IsTrue(expanded.Contains(point));
|
|
294
|
+
Assert.AreEqual(Vector3.zero, expanded.min);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[Test]
|
|
298
|
+
public void ExpandToIncludePointBelowMinExpandsMin()
|
|
299
|
+
{
|
|
300
|
+
BoundingBox3D box = new(Vector3.one, new Vector3(10f, 10f, 10f));
|
|
301
|
+
Vector3 point = Vector3.zero;
|
|
302
|
+
BoundingBox3D expanded = box.ExpandToInclude(point);
|
|
303
|
+
|
|
304
|
+
Assert.AreEqual(Vector3.zero, expanded.min);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[Test]
|
|
308
|
+
public void ExpandToIncludePointAboveMaxExpandsMax()
|
|
309
|
+
{
|
|
310
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
311
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
312
|
+
BoundingBox3D expanded = box.ExpandToInclude(point);
|
|
313
|
+
|
|
314
|
+
Assert.IsTrue(expanded.Contains(point));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
[Test]
|
|
318
|
+
public void ExpandToIncludeBoxCompletelyInsideReturnsUnchanged()
|
|
319
|
+
{
|
|
320
|
+
BoundingBox3D outer = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
321
|
+
BoundingBox3D inner = new(new Vector3(2f, 2f, 2f), new Vector3(8f, 8f, 8f));
|
|
322
|
+
BoundingBox3D expanded = outer.ExpandToInclude(inner);
|
|
323
|
+
|
|
324
|
+
Assert.AreEqual(outer.min, expanded.min);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
[Test]
|
|
328
|
+
public void ExpandToIncludeBoxPartiallyOutsideExpands()
|
|
329
|
+
{
|
|
330
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
331
|
+
BoundingBox3D box2 = new(new Vector3(3f, 3f, 3f), new Vector3(10f, 10f, 10f));
|
|
332
|
+
BoundingBox3D expanded = box1.ExpandToInclude(box2);
|
|
333
|
+
|
|
334
|
+
Assert.AreEqual(Vector3.zero, expanded.min);
|
|
335
|
+
Assert.IsTrue(expanded.Contains(box2));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
[Test]
|
|
339
|
+
public void ExpandToIncludeEmptyBoxReturnsUnchanged()
|
|
340
|
+
{
|
|
341
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
342
|
+
BoundingBox3D expanded = box.ExpandToInclude(BoundingBox3D.Empty);
|
|
343
|
+
|
|
344
|
+
Assert.AreEqual(box.min, expanded.min);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
[Test]
|
|
348
|
+
public void EmptyBoxExpandToIncludeBoxReturnsOtherBox()
|
|
349
|
+
{
|
|
350
|
+
BoundingBox3D empty = BoundingBox3D.Empty;
|
|
351
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
352
|
+
BoundingBox3D result = empty.ExpandToInclude(box);
|
|
353
|
+
|
|
354
|
+
Assert.AreEqual(box.min, result.min);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
[Test]
|
|
358
|
+
public void EnsureMinimumSizeWithSmallerBoxExpands()
|
|
359
|
+
{
|
|
360
|
+
BoundingBox3D box = new(new Vector3(5f, 5f, 5f), new Vector3(6f, 6f, 6f));
|
|
361
|
+
BoundingBox3D expanded = box.EnsureMinimumSize(5f);
|
|
362
|
+
|
|
363
|
+
Vector3 size = expanded.Size;
|
|
364
|
+
Assert.GreaterOrEqual(size.x, 5f);
|
|
365
|
+
Assert.GreaterOrEqual(size.y, 5f);
|
|
366
|
+
Assert.GreaterOrEqual(size.z, 5f);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
[Test]
|
|
370
|
+
public void EnsureMinimumSizeWithLargerBoxReturnsUnchanged()
|
|
371
|
+
{
|
|
372
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
373
|
+
BoundingBox3D result = box.EnsureMinimumSize(5f);
|
|
374
|
+
|
|
375
|
+
Assert.AreEqual(box.min, result.min);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
[Test]
|
|
379
|
+
public void EnsureMinimumSizeWithZeroMinimumReturnsUnchanged()
|
|
380
|
+
{
|
|
381
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
382
|
+
BoundingBox3D result = box.EnsureMinimumSize(0f);
|
|
383
|
+
|
|
384
|
+
Assert.AreEqual(box.min, result.min);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
[Test]
|
|
388
|
+
public void EnsureMinimumSizeWithNegativeMinimumReturnsUnchanged()
|
|
389
|
+
{
|
|
390
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
391
|
+
BoundingBox3D result = box.EnsureMinimumSize(-5f);
|
|
392
|
+
|
|
393
|
+
Assert.AreEqual(box.min, result.min);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
[Test]
|
|
397
|
+
public void EnsureMinimumSizeOnEmptyBoxReturnsEmpty()
|
|
398
|
+
{
|
|
399
|
+
BoundingBox3D empty = BoundingBox3D.Empty;
|
|
400
|
+
BoundingBox3D result = empty.EnsureMinimumSize(5f);
|
|
401
|
+
|
|
402
|
+
Assert.IsTrue(result.IsEmpty);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
[Test]
|
|
406
|
+
public void EnsureMinimumSizeExpandsSymmetrically()
|
|
407
|
+
{
|
|
408
|
+
Vector3 center = new(5f, 5f, 5f);
|
|
409
|
+
BoundingBox3D box = BoundingBox3D.FromCenterAndSize(center, Vector3.one);
|
|
410
|
+
BoundingBox3D expanded = box.EnsureMinimumSize(5f);
|
|
411
|
+
|
|
412
|
+
Vector3 expandedCenter = expanded.Center;
|
|
413
|
+
Assert.AreEqual(center.x, expandedCenter.x, 0.01f);
|
|
414
|
+
Assert.AreEqual(center.y, expandedCenter.y, 0.01f);
|
|
415
|
+
Assert.AreEqual(center.z, expandedCenter.z, 0.01f);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
[Test]
|
|
419
|
+
public void ClosestPointInsideReturnsPoint()
|
|
420
|
+
{
|
|
421
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
422
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
423
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
424
|
+
|
|
425
|
+
Assert.AreEqual(point, closest);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
[Test]
|
|
429
|
+
public void ClosestPointOutsideReturnsBoundaryPoint()
|
|
430
|
+
{
|
|
431
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
432
|
+
Vector3 point = new(15f, 15f, 15f);
|
|
433
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
434
|
+
|
|
435
|
+
Assert.IsTrue(
|
|
436
|
+
box.Contains(closest)
|
|
437
|
+
|| Mathf.Approximately(closest.x, box.max.x)
|
|
438
|
+
|| Mathf.Approximately(closest.y, box.max.y)
|
|
439
|
+
|| Mathf.Approximately(closest.z, box.max.z)
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
[Test]
|
|
444
|
+
public void ClosestPointOnFaceReturnsFacePoint()
|
|
445
|
+
{
|
|
446
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
447
|
+
Vector3 point = new(15f, 5f, 5f);
|
|
448
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
449
|
+
|
|
450
|
+
Assert.AreEqual(5f, closest.y);
|
|
451
|
+
Assert.AreEqual(5f, closest.z);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
[Test]
|
|
455
|
+
public void ClosestPointOnEdgeReturnsEdgePoint()
|
|
456
|
+
{
|
|
457
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
458
|
+
Vector3 point = new(15f, 15f, 5f);
|
|
459
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
460
|
+
|
|
461
|
+
Assert.AreEqual(5f, closest.z);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
[Test]
|
|
465
|
+
public void ClosestPointOnCornerReturnsCorner()
|
|
466
|
+
{
|
|
467
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
468
|
+
Vector3 point = new(-5f, -5f, -5f);
|
|
469
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
470
|
+
|
|
471
|
+
Assert.AreEqual(Vector3.zero, closest);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
[Test]
|
|
475
|
+
public void ClosestPointOnMaxBoundaryReturnsBoundary()
|
|
476
|
+
{
|
|
477
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
478
|
+
Vector3 point = new(20f, 5f, 5f);
|
|
479
|
+
Vector3 closest = box.ClosestPoint(point);
|
|
480
|
+
|
|
481
|
+
Assert.AreEqual(box.max.x, closest.x);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
[Test]
|
|
485
|
+
public void DistanceSquaredToPointInsideReturnsZero()
|
|
486
|
+
{
|
|
487
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
488
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
489
|
+
float distSq = box.DistanceSquaredTo(point);
|
|
490
|
+
|
|
491
|
+
Assert.AreEqual(0f, distSq, 0.0001f);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
[Test]
|
|
495
|
+
public void DistanceSquaredToPointOutsideReturnsCorrectDistance()
|
|
496
|
+
{
|
|
497
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
498
|
+
Vector3 point = new(13f, 10f, 10f);
|
|
499
|
+
float distSq = box.DistanceSquaredTo(point);
|
|
500
|
+
|
|
501
|
+
Assert.AreEqual(9f, distSq, 0.0001f);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
[Test]
|
|
505
|
+
public void DistanceSquaredToPointOnBoundaryReturnsZero()
|
|
506
|
+
{
|
|
507
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
508
|
+
Vector3 point = Vector3.zero;
|
|
509
|
+
float distSq = box.DistanceSquaredTo(point);
|
|
510
|
+
|
|
511
|
+
Assert.AreEqual(0f, distSq, 0.0001f);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
[Test]
|
|
515
|
+
public void ToBoundsCreatesCorrectBounds()
|
|
516
|
+
{
|
|
517
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
518
|
+
Bounds bounds = box.ToBounds();
|
|
519
|
+
|
|
520
|
+
Assert.AreEqual(box.Size.x, bounds.size.x, 0.0001f);
|
|
521
|
+
Assert.AreEqual(box.Size.y, bounds.size.y, 0.0001f);
|
|
522
|
+
Assert.AreEqual(box.Size.z, bounds.size.z, 0.0001f);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
[Test]
|
|
526
|
+
public void ToBoundsPreservesCenter()
|
|
527
|
+
{
|
|
528
|
+
Vector3 center = new(5f, 5f, 5f);
|
|
529
|
+
BoundingBox3D box = BoundingBox3D.FromCenterAndSize(center, new Vector3(10f, 10f, 10f));
|
|
530
|
+
Bounds bounds = box.ToBounds();
|
|
531
|
+
|
|
532
|
+
Assert.AreEqual(center.x, bounds.center.x, 0.01f);
|
|
533
|
+
Assert.AreEqual(center.y, bounds.center.y, 0.01f);
|
|
534
|
+
Assert.AreEqual(center.z, bounds.center.z, 0.01f);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
[Test]
|
|
538
|
+
public void HalfOpenSemanticsMaxBoundaryExcluded()
|
|
539
|
+
{
|
|
540
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
541
|
+
|
|
542
|
+
Assert.IsTrue(box.Contains(Vector3.zero));
|
|
543
|
+
Assert.IsFalse(box.Contains(Vector3.one));
|
|
544
|
+
Assert.IsTrue(box.Contains(new Vector3(0.999f, 0.999f, 0.999f)));
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
[Test]
|
|
548
|
+
public void NegativeCoordinatesWork()
|
|
549
|
+
{
|
|
550
|
+
BoundingBox3D box = new(new Vector3(-10f, -10f, -10f), Vector3.zero);
|
|
551
|
+
|
|
552
|
+
Assert.IsTrue(box.Contains(new Vector3(-5f, -5f, -5f)));
|
|
553
|
+
Assert.IsFalse(box.Contains(new Vector3(1f, 1f, 1f)));
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
[Test]
|
|
557
|
+
public void VerySmallBoxWorks()
|
|
558
|
+
{
|
|
559
|
+
float epsilon = 0.0001f;
|
|
560
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(epsilon, epsilon, epsilon));
|
|
561
|
+
|
|
562
|
+
Assert.IsFalse(box.IsEmpty);
|
|
563
|
+
Assert.IsTrue(box.Contains(new Vector3(epsilon / 2f, epsilon / 2f, epsilon / 2f)));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
[Test]
|
|
567
|
+
public void VeryLargeBoxWorks()
|
|
568
|
+
{
|
|
569
|
+
float large = 1000000f;
|
|
570
|
+
BoundingBox3D box = new(
|
|
571
|
+
new Vector3(-large, -large, -large),
|
|
572
|
+
new Vector3(large, large, large)
|
|
573
|
+
);
|
|
574
|
+
|
|
575
|
+
Assert.IsTrue(box.Contains(Vector3.zero));
|
|
576
|
+
Assert.IsTrue(box.Contains(new Vector3(large / 2f, large / 2f, large / 2f)));
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
[Test]
|
|
580
|
+
public void AsymmetricBoxWorks()
|
|
581
|
+
{
|
|
582
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(1f, 10f, 100f));
|
|
583
|
+
|
|
584
|
+
Assert.AreEqual(1f, box.Size.x, 0.0001f);
|
|
585
|
+
Assert.AreEqual(10f, box.Size.y, 0.0001f);
|
|
586
|
+
Assert.AreEqual(100f, box.Size.z, 0.0001f);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
[Test]
|
|
590
|
+
public void ExpandToIncludeMultiplePointsWorks()
|
|
591
|
+
{
|
|
592
|
+
BoundingBox3D box = BoundingBox3D.FromPoint(Vector3.zero);
|
|
593
|
+
box = box.ExpandToInclude(new Vector3(10f, 0f, 0f));
|
|
594
|
+
box = box.ExpandToInclude(new Vector3(0f, 10f, 0f));
|
|
595
|
+
box = box.ExpandToInclude(new Vector3(0f, 0f, 10f));
|
|
596
|
+
|
|
597
|
+
Assert.IsTrue(box.Contains(Vector3.zero));
|
|
598
|
+
Assert.IsTrue(box.Contains(new Vector3(5f, 5f, 5f)));
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
[Test]
|
|
602
|
+
public void IntersectsEdgeCaseTouchingAtSinglePointReturnsFalse()
|
|
603
|
+
{
|
|
604
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
605
|
+
BoundingBox3D box2 = new(Vector3.one, new Vector3(2f, 2f, 2f));
|
|
606
|
+
|
|
607
|
+
Assert.IsFalse(box1.Intersects(box2));
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
[Test]
|
|
611
|
+
public void ContainsBoxEdgeCaseExactFit()
|
|
612
|
+
{
|
|
613
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
614
|
+
BoundingBox3D box2 = new(Vector3.zero, Vector3.one);
|
|
615
|
+
|
|
616
|
+
Assert.IsTrue(box1.Contains(box2));
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
[Test]
|
|
620
|
+
public void FromClosedBoundsHandlesPointBounds()
|
|
621
|
+
{
|
|
622
|
+
Bounds bounds = new(Vector3.zero, Vector3.zero);
|
|
623
|
+
BoundingBox3D box = BoundingBox3D.FromClosedBounds(bounds);
|
|
624
|
+
|
|
625
|
+
Assert.IsFalse(box.IsEmpty);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
[Test]
|
|
629
|
+
public void ClosestPointHandlesCenterOfBox()
|
|
630
|
+
{
|
|
631
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
632
|
+
Vector3 center = box.Center;
|
|
633
|
+
Vector3 closest = box.ClosestPoint(center);
|
|
634
|
+
|
|
635
|
+
Assert.AreEqual(center, closest);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
[Test]
|
|
639
|
+
public void MultipleExpandOperationsPreserveCorrectness()
|
|
640
|
+
{
|
|
641
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
642
|
+
Vector3 point1 = new(5f, 5f, 5f);
|
|
643
|
+
Vector3 point2 = new(-5f, -5f, -5f);
|
|
644
|
+
|
|
645
|
+
box = box.ExpandToInclude(point1);
|
|
646
|
+
box = box.ExpandToInclude(point2);
|
|
647
|
+
|
|
648
|
+
Assert.IsTrue(box.Contains(point1));
|
|
649
|
+
Assert.IsTrue(box.Contains(point2));
|
|
650
|
+
Assert.IsTrue(box.Contains(Vector3.zero));
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
[Test]
|
|
654
|
+
public void DistanceSquaredCalculationCorrect()
|
|
655
|
+
{
|
|
656
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
657
|
+
Vector3 point = new(2f, 2f, 2f);
|
|
658
|
+
float distSq = box.DistanceSquaredTo(point);
|
|
659
|
+
|
|
660
|
+
float expected = 3f;
|
|
661
|
+
Assert.AreEqual(expected, distSq, 0.01f);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
[Test]
|
|
665
|
+
public void EnsureMinimumSizeOnOneAxisOnly()
|
|
666
|
+
{
|
|
667
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(0.5f, 10f, 10f));
|
|
668
|
+
BoundingBox3D expanded = box.EnsureMinimumSize(5f);
|
|
669
|
+
|
|
670
|
+
Assert.GreaterOrEqual(expanded.Size.x, 5f);
|
|
671
|
+
Assert.GreaterOrEqual(expanded.Size.y, 5f);
|
|
672
|
+
Assert.GreaterOrEqual(expanded.Size.z, 5f);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
[Test]
|
|
676
|
+
public void ContainsHandlesMinMaxBoundaryCorrectly()
|
|
677
|
+
{
|
|
678
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
679
|
+
|
|
680
|
+
Assert.IsTrue(box.Contains(box.min));
|
|
681
|
+
Assert.IsFalse(box.Contains(box.max));
|
|
682
|
+
|
|
683
|
+
Vector3 justBelowMax = box.max - new Vector3(0.0001f, 0.0001f, 0.0001f);
|
|
684
|
+
Assert.IsTrue(box.Contains(justBelowMax));
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
[Test]
|
|
688
|
+
public void IntersectsIsSymmetric()
|
|
689
|
+
{
|
|
690
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
691
|
+
BoundingBox3D box2 = new(new Vector3(3f, 3f, 3f), new Vector3(8f, 8f, 8f));
|
|
692
|
+
|
|
693
|
+
Assert.AreEqual(box1.Intersects(box2), box2.Intersects(box1));
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
[Test]
|
|
697
|
+
public void FromPointAndExpandMaintainsPointInclusion()
|
|
698
|
+
{
|
|
699
|
+
Vector3 point = new(3.7f, 2.1f, 9.5f);
|
|
700
|
+
BoundingBox3D box = BoundingBox3D.FromPoint(point);
|
|
701
|
+
|
|
702
|
+
Assert.IsTrue(box.Contains(point));
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
[Test]
|
|
706
|
+
public void ToBoundsRoundTripPreservesApproximateProperties()
|
|
707
|
+
{
|
|
708
|
+
BoundingBox3D original = new(new Vector3(-5f, -5f, -5f), new Vector3(5f, 5f, 5f));
|
|
709
|
+
Bounds bounds = original.ToBounds();
|
|
710
|
+
BoundingBox3D reconstructed = BoundingBox3D.FromClosedBounds(bounds);
|
|
711
|
+
|
|
712
|
+
Assert.AreEqual(original.min.x, reconstructed.min.x, 0.01f);
|
|
713
|
+
Assert.AreEqual(original.min.y, reconstructed.min.y, 0.01f);
|
|
714
|
+
Assert.AreEqual(original.min.z, reconstructed.min.z, 0.01f);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
[Test]
|
|
718
|
+
public void VolumeReturnsCorrectValue()
|
|
719
|
+
{
|
|
720
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(2f, 3f, 4f));
|
|
721
|
+
Assert.AreEqual(24f, box.Volume, 0.0001f);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
[Test]
|
|
725
|
+
public void VolumeForEmptyBoxReturnsZeroOrNegative()
|
|
726
|
+
{
|
|
727
|
+
BoundingBox3D empty = BoundingBox3D.Empty;
|
|
728
|
+
Assert.LessOrEqual(empty.Volume, 0f);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
[Test]
|
|
732
|
+
public void EncapsulatePointAliasWorks()
|
|
733
|
+
{
|
|
734
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
735
|
+
Vector3 point = new(5f, 5f, 5f);
|
|
736
|
+
BoundingBox3D expanded = box.Encapsulate(point);
|
|
737
|
+
|
|
738
|
+
Assert.IsTrue(expanded.Contains(point));
|
|
739
|
+
Assert.AreEqual(Vector3.zero, expanded.min);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
[Test]
|
|
743
|
+
public void EncapsulateBoxAliasWorks()
|
|
744
|
+
{
|
|
745
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
746
|
+
BoundingBox3D box2 = new(new Vector3(3f, 3f, 3f), new Vector3(10f, 10f, 10f));
|
|
747
|
+
BoundingBox3D expanded = box1.Encapsulate(box2);
|
|
748
|
+
|
|
749
|
+
Assert.AreEqual(Vector3.zero, expanded.min);
|
|
750
|
+
Assert.IsTrue(expanded.Contains(box2));
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
[Test]
|
|
754
|
+
public void UnionAliasWorks()
|
|
755
|
+
{
|
|
756
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
757
|
+
BoundingBox3D box2 = new(new Vector3(3f, 3f, 3f), new Vector3(10f, 10f, 10f));
|
|
758
|
+
BoundingBox3D union = box1.Union(box2);
|
|
759
|
+
|
|
760
|
+
Assert.AreEqual(Vector3.zero, union.min);
|
|
761
|
+
Assert.IsTrue(union.Contains(box1));
|
|
762
|
+
Assert.IsTrue(union.Contains(box2));
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
[Test]
|
|
766
|
+
public void IntersectionReturnsCorrectBox()
|
|
767
|
+
{
|
|
768
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
769
|
+
BoundingBox3D box2 = new(new Vector3(5f, 5f, 5f), new Vector3(15f, 15f, 15f));
|
|
770
|
+
BoundingBox3D? intersection = box1.Intersection(box2);
|
|
771
|
+
|
|
772
|
+
Assert.IsTrue(intersection.HasValue);
|
|
773
|
+
Assert.AreEqual(new Vector3(5f, 5f, 5f), intersection.Value.min);
|
|
774
|
+
Assert.AreEqual(new Vector3(10f, 10f, 10f), intersection.Value.max);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
[Test]
|
|
778
|
+
public void IntersectionOfNonOverlappingBoxesReturnsNull()
|
|
779
|
+
{
|
|
780
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
781
|
+
BoundingBox3D box2 = new(new Vector3(2f, 2f, 2f), new Vector3(3f, 3f, 3f));
|
|
782
|
+
BoundingBox3D? intersection = box1.Intersection(box2);
|
|
783
|
+
|
|
784
|
+
Assert.IsFalse(intersection.HasValue);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
[Test]
|
|
788
|
+
public void GetCornersReturnsAllEightCorners()
|
|
789
|
+
{
|
|
790
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(1f, 2f, 3f));
|
|
791
|
+
Vector3[] corners = new Vector3[8];
|
|
792
|
+
box.GetCorners(corners);
|
|
793
|
+
|
|
794
|
+
Assert.AreEqual(new Vector3(0f, 0f, 0f), corners[0]);
|
|
795
|
+
Assert.AreEqual(new Vector3(1f, 0f, 0f), corners[1]);
|
|
796
|
+
Assert.AreEqual(new Vector3(0f, 2f, 0f), corners[2]);
|
|
797
|
+
Assert.AreEqual(new Vector3(1f, 2f, 0f), corners[3]);
|
|
798
|
+
Assert.AreEqual(new Vector3(0f, 0f, 3f), corners[4]);
|
|
799
|
+
Assert.AreEqual(new Vector3(1f, 0f, 3f), corners[5]);
|
|
800
|
+
Assert.AreEqual(new Vector3(0f, 2f, 3f), corners[6]);
|
|
801
|
+
Assert.AreEqual(new Vector3(1f, 2f, 3f), corners[7]);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
[Test]
|
|
805
|
+
public void GetCornersThrowsOnNullArray()
|
|
806
|
+
{
|
|
807
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
808
|
+
Assert.Throws<System.ArgumentException>(() => box.GetCorners(null));
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
[Test]
|
|
812
|
+
public void GetCornersThrowsOnSmallArray()
|
|
813
|
+
{
|
|
814
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
815
|
+
Vector3[] corners = new Vector3[7];
|
|
816
|
+
Assert.Throws<System.ArgumentException>(() => box.GetCorners(corners));
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
[Test]
|
|
820
|
+
public void EqualsReturnsTrueForIdenticalBoxes()
|
|
821
|
+
{
|
|
822
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
823
|
+
BoundingBox3D box2 = new(Vector3.zero, Vector3.one);
|
|
824
|
+
|
|
825
|
+
Assert.IsTrue(box1.Equals(box2));
|
|
826
|
+
Assert.IsTrue(box1 == box2);
|
|
827
|
+
Assert.IsFalse(box1 != box2);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
[Test]
|
|
831
|
+
public void EqualsReturnsFalseForDifferentBoxes()
|
|
832
|
+
{
|
|
833
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
834
|
+
BoundingBox3D box2 = new(Vector3.one, new Vector3(2f, 2f, 2f));
|
|
835
|
+
|
|
836
|
+
Assert.IsFalse(box1.Equals(box2));
|
|
837
|
+
Assert.IsFalse(box1 == box2);
|
|
838
|
+
Assert.IsTrue(box1 != box2);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
[Test]
|
|
842
|
+
public void HashCodeIsConsistent()
|
|
843
|
+
{
|
|
844
|
+
BoundingBox3D box1 = new(Vector3.zero, Vector3.one);
|
|
845
|
+
BoundingBox3D box2 = new(Vector3.zero, Vector3.one);
|
|
846
|
+
|
|
847
|
+
Assert.AreEqual(box1.GetHashCode(), box2.GetHashCode());
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
[Test]
|
|
851
|
+
public void ToStringReturnsValidString()
|
|
852
|
+
{
|
|
853
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
854
|
+
string str = box.ToString();
|
|
855
|
+
|
|
856
|
+
Assert.IsNotNull(str);
|
|
857
|
+
Assert.IsTrue(str.Contains("BoundingBox3D"));
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
[Test]
|
|
861
|
+
public void IntersectsLineReturnsTrueForLineThroughBox()
|
|
862
|
+
{
|
|
863
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
864
|
+
Line3D line = new(new Vector3(-5f, 5f, 5f), new Vector3(15f, 5f, 5f));
|
|
865
|
+
Assert.IsTrue(box.Intersects(line));
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
[Test]
|
|
869
|
+
public void IntersectsLineReturnsTrueForLineEndpointInsideBox()
|
|
870
|
+
{
|
|
871
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
872
|
+
Line3D line = new(new Vector3(5f, 5f, 5f), new Vector3(15f, 15f, 15f));
|
|
873
|
+
Assert.IsTrue(box.Intersects(line));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
[Test]
|
|
877
|
+
public void IntersectsLineReturnsFalseForLineNotIntersectingBox()
|
|
878
|
+
{
|
|
879
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
880
|
+
Line3D line = new(new Vector3(15f, 15f, 15f), new Vector3(20f, 20f, 20f));
|
|
881
|
+
Assert.IsFalse(box.Intersects(line));
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
[Test]
|
|
885
|
+
public void IntersectsLineReturnsFalseForLineSegmentNotReachingBox()
|
|
886
|
+
{
|
|
887
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
888
|
+
Line3D line = new(new Vector3(10f, 0f, 0f), new Vector3(20f, 0f, 0f));
|
|
889
|
+
Assert.IsFalse(box.Intersects(line));
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
[Test]
|
|
893
|
+
public void IntersectsLineHandlesLineThroughBoxCenter()
|
|
894
|
+
{
|
|
895
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
896
|
+
Line3D diagonal = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
897
|
+
Assert.IsTrue(box.Intersects(diagonal));
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
[Test]
|
|
901
|
+
public void IntersectsLineHandlesLineAlongBoxEdge()
|
|
902
|
+
{
|
|
903
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
904
|
+
Line3D edgeLine = new(Vector3.zero, new Vector3(10f, 0f, 0f));
|
|
905
|
+
Assert.IsTrue(box.Intersects(edgeLine));
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
[Test]
|
|
909
|
+
public void IntersectsLineHandlesLineOnBoxFace()
|
|
910
|
+
{
|
|
911
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
912
|
+
Line3D faceLine = new(new Vector3(5f, 5f, 0f), new Vector3(8f, 8f, 0f));
|
|
913
|
+
Assert.IsTrue(box.Intersects(faceLine));
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
[Test]
|
|
917
|
+
public void IntersectsLineHandlesVerticalLine()
|
|
918
|
+
{
|
|
919
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
920
|
+
Line3D verticalInside = new(new Vector3(5f, -5f, 5f), new Vector3(5f, 15f, 5f));
|
|
921
|
+
Line3D verticalOutside = new(new Vector3(15f, -5f, 5f), new Vector3(15f, 15f, 5f));
|
|
922
|
+
Assert.IsTrue(box.Intersects(verticalInside));
|
|
923
|
+
Assert.IsFalse(box.Intersects(verticalOutside));
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
[Test]
|
|
927
|
+
public void IntersectsLineHandlesEmptyBox()
|
|
928
|
+
{
|
|
929
|
+
BoundingBox3D emptyBox = BoundingBox3D.Empty;
|
|
930
|
+
Line3D line = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
931
|
+
Assert.IsFalse(emptyBox.Intersects(line));
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
[Test]
|
|
935
|
+
public void IntersectsLineHandlesZeroLengthLine()
|
|
936
|
+
{
|
|
937
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
938
|
+
Line3D pointInside = new(new Vector3(5f, 5f, 5f), new Vector3(5f, 5f, 5f));
|
|
939
|
+
Line3D pointOutside = new(new Vector3(15f, 15f, 15f), new Vector3(15f, 15f, 15f));
|
|
940
|
+
Assert.IsTrue(box.Intersects(pointInside));
|
|
941
|
+
Assert.IsFalse(box.Intersects(pointOutside));
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
[Test]
|
|
945
|
+
public void DistanceToLineReturnsZeroForIntersectingLine()
|
|
946
|
+
{
|
|
947
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
948
|
+
Line3D line = new(new Vector3(-5f, 5f, 5f), new Vector3(15f, 5f, 5f));
|
|
949
|
+
Assert.AreEqual(0f, box.DistanceToLine(line), 0.0001f);
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
[Test]
|
|
953
|
+
public void DistanceToLineReturnsCorrectDistanceForNonIntersectingLine()
|
|
954
|
+
{
|
|
955
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
956
|
+
Line3D line = new(new Vector3(10f, 0f, 0f), new Vector3(20f, 0f, 0f));
|
|
957
|
+
Assert.AreEqual(5f, box.DistanceToLine(line), 0.0001f);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
[Test]
|
|
961
|
+
public void DistanceToLineHandlesLineParallelToBoxFace()
|
|
962
|
+
{
|
|
963
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
964
|
+
Line3D line = new(new Vector3(10f, 2f, 2f), new Vector3(10f, 3f, 3f));
|
|
965
|
+
Assert.Greater(box.DistanceToLine(line), 0f);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
[Test]
|
|
969
|
+
public void DistanceToLineReturnsZeroForLineEndpointInBox()
|
|
970
|
+
{
|
|
971
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
972
|
+
Line3D line = new(new Vector3(5f, 5f, 5f), new Vector3(20f, 20f, 20f));
|
|
973
|
+
Assert.AreEqual(0f, box.DistanceToLine(line), 0.0001f);
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
[Test]
|
|
977
|
+
public void DistanceToLineHandlesEmptyBox()
|
|
978
|
+
{
|
|
979
|
+
BoundingBox3D emptyBox = BoundingBox3D.Empty;
|
|
980
|
+
Line3D line = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
981
|
+
Assert.AreEqual(float.PositiveInfinity, emptyBox.DistanceToLine(line), 0.0001f);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
[Test]
|
|
985
|
+
public void ClosestPointOnLineReturnsPointOnLineSegment()
|
|
986
|
+
{
|
|
987
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
988
|
+
Line3D line = new(new Vector3(15f, 5f, 5f), new Vector3(20f, 5f, 5f));
|
|
989
|
+
Vector3 closest = box.ClosestPointOnLine(line);
|
|
990
|
+
Assert.AreEqual(15f, closest.x, 0.01f);
|
|
991
|
+
Assert.AreEqual(5f, closest.y, 0.01f);
|
|
992
|
+
Assert.AreEqual(5f, closest.z, 0.01f);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
[Test]
|
|
996
|
+
public void ClosestPointOnLineHandlesLineThroughBox()
|
|
997
|
+
{
|
|
998
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
999
|
+
Line3D line = new(new Vector3(-5f, 5f, 5f), new Vector3(15f, 5f, 5f));
|
|
1000
|
+
Vector3 closest = box.ClosestPointOnLine(line);
|
|
1001
|
+
Assert.IsTrue(
|
|
1002
|
+
box.Contains(closest)
|
|
1003
|
+
|| Vector3.Distance(closest, box.ClosestPoint(closest)) < 0.01f
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
[Test]
|
|
1008
|
+
public void ClosestPointOnLineHandlesEndpointClamping()
|
|
1009
|
+
{
|
|
1010
|
+
BoundingBox3D box = new(new Vector3(20f, 20f, 20f), new Vector3(30f, 30f, 30f));
|
|
1011
|
+
Line3D line = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1012
|
+
Vector3 closest = box.ClosestPointOnLine(line);
|
|
1013
|
+
Assert.AreEqual(10f, closest.x, 0.01f);
|
|
1014
|
+
Assert.AreEqual(10f, closest.y, 0.01f);
|
|
1015
|
+
Assert.AreEqual(10f, closest.z, 0.01f);
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
[Test]
|
|
1019
|
+
public void ClosestPointOnLineHandlesEmptyBox()
|
|
1020
|
+
{
|
|
1021
|
+
BoundingBox3D emptyBox = BoundingBox3D.Empty;
|
|
1022
|
+
Line3D line = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1023
|
+
Vector3 closest = emptyBox.ClosestPointOnLine(line);
|
|
1024
|
+
Assert.AreEqual(Vector3.zero, closest);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
[Test]
|
|
1028
|
+
public void LineIntersectionConsistentWithLineBoundsIntersection()
|
|
1029
|
+
{
|
|
1030
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1031
|
+
Line3D line = new(new Vector3(-5f, 5f, 5f), new Vector3(15f, 5f, 5f));
|
|
1032
|
+
Assert.AreEqual(line.Intersects(box), box.Intersects(line));
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
[Test]
|
|
1036
|
+
public void LineDistanceConsistentWithLineBoundsDistance()
|
|
1037
|
+
{
|
|
1038
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1039
|
+
Line3D line = new(new Vector3(15f, 5f, 5f), new Vector3(20f, 5f, 5f));
|
|
1040
|
+
Assert.AreEqual(line.DistanceToBounds(box), box.DistanceToLine(line), 0.0001f);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
[Test]
|
|
1044
|
+
public void IntersectsLineHandlesBoxAtOrigin()
|
|
1045
|
+
{
|
|
1046
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
1047
|
+
Line3D lineX = new(new Vector3(-10f, 2f, 2f), new Vector3(10f, 2f, 2f));
|
|
1048
|
+
Line3D lineY = new(new Vector3(2f, -10f, 2f), new Vector3(2f, 10f, 2f));
|
|
1049
|
+
Line3D lineZ = new(new Vector3(2f, 2f, -10f), new Vector3(2f, 2f, 10f));
|
|
1050
|
+
Assert.IsTrue(box.Intersects(lineX));
|
|
1051
|
+
Assert.IsTrue(box.Intersects(lineY));
|
|
1052
|
+
Assert.IsTrue(box.Intersects(lineZ));
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
[Test]
|
|
1056
|
+
public void IntersectsLineHandlesNegativeCoordinates()
|
|
1057
|
+
{
|
|
1058
|
+
BoundingBox3D box = new(new Vector3(-10f, -10f, -10f), Vector3.zero);
|
|
1059
|
+
Line3D line = new(new Vector3(-15f, -5f, -5f), new Vector3(-3f, -5f, -5f));
|
|
1060
|
+
Assert.IsTrue(box.Intersects(line));
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
[Test]
|
|
1064
|
+
public void DistanceToLineHandlesNegativeCoordinates()
|
|
1065
|
+
{
|
|
1066
|
+
BoundingBox3D box = new(new Vector3(-10f, -10f, -10f), new Vector3(-5f, -5f, -5f));
|
|
1067
|
+
Line3D line = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1068
|
+
float distance = box.DistanceToLine(line);
|
|
1069
|
+
Assert.Greater(distance, 0f);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
[Test]
|
|
1073
|
+
public void IntersectsLineHandlesVerySmallBox()
|
|
1074
|
+
{
|
|
1075
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(0.1f, 0.1f, 0.1f));
|
|
1076
|
+
Line3D lineThroughBox = new(
|
|
1077
|
+
new Vector3(-1f, 0.05f, 0.05f),
|
|
1078
|
+
new Vector3(1f, 0.05f, 0.05f)
|
|
1079
|
+
);
|
|
1080
|
+
Line3D lineMissingBox = new(new Vector3(-1f, 1f, 1f), new Vector3(1f, 1f, 1f));
|
|
1081
|
+
Assert.IsTrue(box.Intersects(lineThroughBox));
|
|
1082
|
+
Assert.IsFalse(box.Intersects(lineMissingBox));
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
[Test]
|
|
1086
|
+
public void IntersectsLineHandlesVeryLargeBox()
|
|
1087
|
+
{
|
|
1088
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(1000f, 1000f, 1000f));
|
|
1089
|
+
Line3D lineInsideBox = new(
|
|
1090
|
+
new Vector3(100f, 100f, 100f),
|
|
1091
|
+
new Vector3(200f, 200f, 200f)
|
|
1092
|
+
);
|
|
1093
|
+
Assert.IsTrue(box.Intersects(lineInsideBox));
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
[Test]
|
|
1097
|
+
public void DistanceToLineHandlesLineCloseToCorner()
|
|
1098
|
+
{
|
|
1099
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1100
|
+
Line3D line = new(new Vector3(11f, 11f, 11f), new Vector3(20f, 20f, 20f));
|
|
1101
|
+
float distance = box.DistanceToLine(line);
|
|
1102
|
+
Vector3 boxCorner = new(10f, 10f, 10f);
|
|
1103
|
+
Vector3 lineStart = new(11f, 11f, 11f);
|
|
1104
|
+
float expectedDistance = Vector3.Distance(boxCorner, lineStart);
|
|
1105
|
+
Assert.AreEqual(expectedDistance, distance, 0.1f);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
[Test]
|
|
1109
|
+
public void ClosestPointOnLineHandlesDiagonalLine()
|
|
1110
|
+
{
|
|
1111
|
+
BoundingBox3D box = new(new Vector3(10f, 10f, 10f), new Vector3(20f, 20f, 20f));
|
|
1112
|
+
Line3D line = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
1113
|
+
Vector3 closest = box.ClosestPointOnLine(line);
|
|
1114
|
+
Assert.AreEqual(new Vector3(5f, 5f, 5f), closest);
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
[Test]
|
|
1118
|
+
public void IntersectsLineHandlesLineGrazingBoxCorner()
|
|
1119
|
+
{
|
|
1120
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1121
|
+
Line3D line = new(Vector3.zero, new Vector3(1f, 1f, 1f));
|
|
1122
|
+
Assert.IsTrue(box.Intersects(line));
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
[Test]
|
|
1126
|
+
public void DistanceToLineHandlesParallelLines()
|
|
1127
|
+
{
|
|
1128
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
1129
|
+
Line3D parallelToX = new(new Vector3(10f, 2f, 2f), new Vector3(20f, 2f, 2f));
|
|
1130
|
+
Line3D parallelToY = new(new Vector3(2f, 10f, 2f), new Vector3(2f, 20f, 2f));
|
|
1131
|
+
Line3D parallelToZ = new(new Vector3(2f, 2f, 10f), new Vector3(2f, 2f, 20f));
|
|
1132
|
+
Assert.Greater(box.DistanceToLine(parallelToX), 0f);
|
|
1133
|
+
Assert.Greater(box.DistanceToLine(parallelToY), 0f);
|
|
1134
|
+
Assert.Greater(box.DistanceToLine(parallelToZ), 0f);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
[Test]
|
|
1138
|
+
public void ClosestPointOnLineHandlesMultipleBoxes()
|
|
1139
|
+
{
|
|
1140
|
+
BoundingBox3D box1 = new(Vector3.zero, new Vector3(5f, 5f, 5f));
|
|
1141
|
+
BoundingBox3D box2 = new(new Vector3(10f, 10f, 10f), new Vector3(15f, 15f, 15f));
|
|
1142
|
+
Line3D line = new(new Vector3(0f, 0f, 20f), new Vector3(20f, 20f, 20f));
|
|
1143
|
+
Vector3 closest1 = box1.ClosestPointOnLine(line);
|
|
1144
|
+
Vector3 closest2 = box2.ClosestPointOnLine(line);
|
|
1145
|
+
Assert.AreNotEqual(closest1, closest2);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
[Test]
|
|
1149
|
+
public void IntersectsLineHandlesZeroLengthAtMaxFace()
|
|
1150
|
+
{
|
|
1151
|
+
BoundingBox3D box = new(Vector3.zero, new Vector3(10f, 10f, 10f));
|
|
1152
|
+
// Point lies exactly on the max X face; intersection should count as true
|
|
1153
|
+
Line3D pointOnMaxFace = new(new Vector3(10f, 5f, 5f), new Vector3(10f, 5f, 5f));
|
|
1154
|
+
Assert.IsTrue(box.Intersects(pointOnMaxFace));
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
[Test]
|
|
1158
|
+
public void IntersectsLineHandlesLineOnMaxFace()
|
|
1159
|
+
{
|
|
1160
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
1161
|
+
// Segment lies on the z = max face across the unit square
|
|
1162
|
+
Line3D onFace = new(new Vector3(0.25f, 0.75f, 1f), new Vector3(0.75f, 0.25f, 1f));
|
|
1163
|
+
Assert.IsTrue(box.Intersects(onFace));
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
[Test]
|
|
1167
|
+
public void DistanceToLineMatchesEpsilonOffsetParallel()
|
|
1168
|
+
{
|
|
1169
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
1170
|
+
float eps = 1e-5f;
|
|
1171
|
+
Line3D parallelX = new(
|
|
1172
|
+
new Vector3(-1f, 1f + eps, 0.5f),
|
|
1173
|
+
new Vector3(2f, 1f + eps, 0.5f)
|
|
1174
|
+
);
|
|
1175
|
+
float distance = box.DistanceToLine(parallelX);
|
|
1176
|
+
Assert.AreEqual(eps, distance, 1e-6f);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
[Test]
|
|
1180
|
+
public void IntersectsLineHandlesTinyBox()
|
|
1181
|
+
{
|
|
1182
|
+
float s = 1e-8f;
|
|
1183
|
+
BoundingBox3D tiny = BoundingBox3D.FromCenterAndSize(
|
|
1184
|
+
Vector3.zero,
|
|
1185
|
+
new Vector3(s, s, s)
|
|
1186
|
+
);
|
|
1187
|
+
Line3D throughCenter = new(new Vector3(-1f, 0f, 0f), new Vector3(1f, 0f, 0f));
|
|
1188
|
+
Assert.IsTrue(tiny.Intersects(throughCenter));
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
[Test]
|
|
1192
|
+
public void ClosestPointOnLineExactInteriorMinimum()
|
|
1193
|
+
{
|
|
1194
|
+
// Box [0,1]^3 and a segment where closest point occurs at interior t
|
|
1195
|
+
BoundingBox3D box = new(Vector3.zero, Vector3.one);
|
|
1196
|
+
Vector3 p0 = new(2f, 2f, 2f);
|
|
1197
|
+
Vector3 p1 = new(3f, 0f, 0f);
|
|
1198
|
+
Line3D seg = new(p0, p1);
|
|
1199
|
+
Vector3 corner = Vector3.one; // (1,1,1)
|
|
1200
|
+
Vector3 d = p1 - p0;
|
|
1201
|
+
float tStar = Vector3.Dot(corner - p0, d) / d.sqrMagnitude;
|
|
1202
|
+
tStar = Mathf.Clamp01(tStar);
|
|
1203
|
+
Vector3 expectedOnSegment = p0 + tStar * d;
|
|
1204
|
+
|
|
1205
|
+
Vector3 closest = box.ClosestPointOnLine(seg);
|
|
1206
|
+
Assert.AreEqual(expectedOnSegment.x, closest.x, 1e-4f);
|
|
1207
|
+
Assert.AreEqual(expectedOnSegment.y, closest.y, 1e-4f);
|
|
1208
|
+
Assert.AreEqual(expectedOnSegment.z, closest.z, 1e-4f);
|
|
1209
|
+
|
|
1210
|
+
float expectedDistance = Vector3.Distance(expectedOnSegment, corner);
|
|
1211
|
+
float actualDistance = box.DistanceToLine(seg);
|
|
1212
|
+
Assert.AreEqual(expectedDistance, actualDistance, 1e-4f);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|