From 3f6e75358218339554c816cc6b7a07e83590699d Mon Sep 17 00:00:00 2001 From: stephengold Date: Wed, 11 Sep 2024 13:40:06 -0700 Subject: [PATCH] add classes EActiveEdgeMode and ECollectFacesMode --- .../joltjni/enumerate/EActiveEdgeMode.java | 41 +++++++++++++++++++ .../joltjni/enumerate/ECollectFacesMode.java | 41 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/main/java/com/github/stephengold/joltjni/enumerate/EActiveEdgeMode.java create mode 100644 src/main/java/com/github/stephengold/joltjni/enumerate/ECollectFacesMode.java diff --git a/src/main/java/com/github/stephengold/joltjni/enumerate/EActiveEdgeMode.java b/src/main/java/com/github/stephengold/joltjni/enumerate/EActiveEdgeMode.java new file mode 100644 index 00000000..ceb71301 --- /dev/null +++ b/src/main/java/com/github/stephengold/joltjni/enumerate/EActiveEdgeMode.java @@ -0,0 +1,41 @@ +/* +Copyright (c) 2024 Stephen Gold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ +package com.github.stephengold.joltjni.enumerate; + +/** + * Enumerate ways to handle inactive edges during collision detection. + * + * @author Stephen Gold sgold@sonic.net + */ +public enum EActiveEdgeMode { + // ************************************************************************* + // values - sequence must match + + /** + * do not collide with inactive edges + */ + CollideOnlyWithActive, + /** + * collide with all edges + */ + CollideWithAll +} diff --git a/src/main/java/com/github/stephengold/joltjni/enumerate/ECollectFacesMode.java b/src/main/java/com/github/stephengold/joltjni/enumerate/ECollectFacesMode.java new file mode 100644 index 00000000..cb0c87f2 --- /dev/null +++ b/src/main/java/com/github/stephengold/joltjni/enumerate/ECollectFacesMode.java @@ -0,0 +1,41 @@ +/* +Copyright (c) 2024 Stephen Gold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + */ +package com.github.stephengold.joltjni.enumerate; + +/** + * Whether to collect faces during a cast or collision test. + * + * @author Stephen Gold sgold@sonic.net + */ +public enum ECollectFacesMode { + // ************************************************************************* + // values - sequence must match + + /** + * faces are desired + */ + CollectFaces, + /** + * faces aren't desired + */ + NoFaces +}