diff options
author | Harvey Harrison <[email protected]> | 2019-01-04 13:53:06 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2019-01-04 13:53:06 -0800 |
commit | 97f5e215fe52b45fa395be97a27c5e54a794b2ff (patch) | |
tree | f6882125bdded14636c9897b695cb9a7aa4f0b22 /src/javax/media/j3d/GeometryService.java | |
parent | 665057b9cc5f8d71c9f8360e1046268393c6b5d7 (diff) | |
parent | 623b5ddab831a0b364e6df3c068699d42f4583fb (diff) |
Merge GeometryService implementation
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/javax/media/j3d/GeometryService.java')
-rw-r--r-- | src/javax/media/j3d/GeometryService.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/javax/media/j3d/GeometryService.java b/src/javax/media/j3d/GeometryService.java new file mode 100644 index 0000000..346087c --- /dev/null +++ b/src/javax/media/j3d/GeometryService.java @@ -0,0 +1,40 @@ + +package javax.media.j3d; + +import java.util.ArrayList; + +import javax.vecmath.Point3f; + +/** + * A service interface for certain geometric operations that are not available + * in core Java 3D. + * <p> + * In particular, the {@code j3d-core-utils} project provides additional + * functionality under a different license, which is needed in some + * circumstances by core Java 3D. Thus, historically, these two projects have + * been co-dependent. This interface breaks the circular dependency by using + * Java's service discovery mechanism: if {@code j3d-core-utils} is present on + * the classpath, its {@code GeometryServiceImpl} will provide the functionality + * defined here. Or if not (i.e., no suitable {@code GeometryService} + * implementation can be discovered and instantiated}), then the Java3D core + * will fail as gracefully as possible. + * </p> + * + * @see Font3D#triangulateGlyphs + */ +public interface GeometryService { + + /** + * Loops through each island, calling triangulator once per island. Combines + * triangle data for all islands together in one object. + * + * @param islandCounts TODO + * @param outVerts TODO + * @param contourCounts TODO + * @param triangData TODO + * @return total vertex count of the combined array + */ + int triangulateIslands(int[][] islandCounts, Point3f[][] outVerts, + int[] contourCounts, ArrayList<GeometryArray> triangData); + +} |