projects
/
sixth-3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleanup and formatting.
[sixth-3d.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
sixth
/
e3d
/
renderer
/
raster
/
shapes
/
composite
/
base
/
AbstractCompositeShape.java
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
..
aa7c30e
100644
(file)
--- 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,20
+1,20
@@
/*
/*
- * 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.
*
* 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;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
*/
package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.geometry.Transform;
-import eu.svjatoslav.sixth.e3d.geometry.TransformPipe;
import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
import eu.svjatoslav.sixth.e3d.gui.UserRelativityTracker;
import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
import eu.svjatoslav.sixth.e3d.gui.UserRelativityTracker;
import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
+import eu.svjatoslav.sixth.e3d.math.Transform;
+import eu.svjatoslav.sixth.e3d.math.TransformPipe;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape;
@@
-25,6
+25,7
@@
import eu.svjatoslav.sixth.e3d.renderer.raster.slicer.Slicer;
import java.util.ArrayList;
import java.util.List;
import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
/**
* In order to get perspective correct textures, large textured polygons are
/**
* In order to get perspective correct textures, large textured polygons are
@@
-119,6
+120,12
@@
public class AbstractCompositeShape extends AbstractShape {
}
}
}
}
+ public List<SubShape> getGroup(final String groupIdentifier) {
+ return originalSubShapes.stream().filter(
+ subShape -> subShape.matchesGroup(groupIdentifier))
+ .collect(Collectors.toList());
+ }
+
private void resliceIfNeeded() {
final double proposedSliceFactor = relativityTracker
private void resliceIfNeeded() {
final double proposedSliceFactor = relativityTracker
@@
-146,7
+153,7
@@
public class AbstractCompositeShape extends AbstractShape {
}
public void setGroupForUngrouped(final String groupIdentifier) {
}
public void setGroupForUngrouped(final String groupIdentifier) {
- originalSubShapes.stream().filter(
subShape -> subShape.isUngrouped()
).forEach(subShape -> subShape.setGroup(groupIdentifier));
+ originalSubShapes.stream().filter(
SubShape::isUngrouped
).forEach(subShape -> subShape.setGroup(groupIdentifier));
}
@Override
}
@Override