diff options
author | Sven Gothel <[email protected]> | 2023-09-20 19:51:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-20 19:51:55 +0200 |
commit | 5d6e8a367c03644740187e500c6de5d3ac039d5e (patch) | |
tree | a649f559413c51272ee3f4afff1f68ebfea45477 /src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java | |
parent | bbe845846ffc00807395a5070a7352c6bbe7e4ef (diff) |
Bug 1452 - Decouple math functionality to 'com.jogamp.math' to be toolkit agnostic (PMVMatrix, Matrix4f, Vec4f, ..)
Math functionality (PMVMatrix, Matrix4f, Vec4f, ..)
- shall be used toolkit agnostic, e.g. independent from OpenGL
- shall be reused within our upcoming Vulkan implementation
- may also move outside of JOGL, i.e. GlueGen or within its own package to be reused for other purposed.
The 'com.jogamp.opengl.util.PMVMatrix' currently also used to feed in GLUniformData
via the toolkit agnostic SyncAction and SyncBuffer
shall also be split to a toolkit agnostic variant.
An OpenGL PMVMatrix specialization implementing GLMatrixFunc can still exist,
being derived from the toolkit agnostic base implementation.
+++
Initial commit .. compile clean, passing most unit tests.
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java b/src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java new file mode 100644 index 000000000..d7881b6db --- /dev/null +++ b/src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java @@ -0,0 +1,28 @@ +package com.jogamp.math.geom.plane; + +/** + * Winding rule, either EVEN_ODD or NON_ZERO (like for TrueType fonts). + */ +public enum WindingRule { + /** + * The even-odd rule specifies that a point lies inside the path + * if a ray drawn in any direction from that point to infinity is crossed by path segments + * an odd number of times. + */ + EVEN_ODD(0), + + /** + * The non-zero rule specifies that a point lies inside the path + * if a ray drawn in any direction from that point to infinity is crossed by path segments + * a different number of times in the counter-clockwise direction than the clockwise direction. + * + * Non-zero winding rule is used by TrueType fonts. + */ + NON_ZERO(1); + + public final int value; + + WindingRule(final int v) { + this.value = v; + } +} |