X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fcomposite%2Fbase%2FAbstractCompositeShape.java;h=d9586ab5ef6187cc7343b359e075b24df099f82c;hb=dcdff57f0bab42387b2e4e215778d9e8efc60221;hp=dd8b784a0982ea2f209e37e880d7dfdc22b30cf0;hpb=6213716671ccab6b7256de41838e1f5401ce173c;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java index dd8b784..d9586ab 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java @@ -1,10 +1,10 @@ /* - * Sixth - System for data storage, computation, exploration and interaction. - * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License * or later as published by the Free Software Foundation. + * */ package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base; @@ -25,6 +25,7 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.slicer.Slicer; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * In order to get perspective correct textures, large textured polygons are @@ -119,6 +120,12 @@ public class AbstractCompositeShape extends AbstractShape { } } + public List getGroup(final String groupIdentifier) { + return originalSubShapes.stream().filter( + subShape -> subShape.matchesGroup(groupIdentifier)) + .collect(Collectors.toList()); + } + private void resliceIfNeeded() { final double proposedSliceFactor = relativityTracker