diff --git a/src/main/java/org/osm2world/core/target/Renderable.java b/src/main/java/org/osm2world/core/target/Renderable.java deleted file mode 100644 index 72b36b565..000000000 --- a/src/main/java/org/osm2world/core/target/Renderable.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.osm2world.core.target; - -/** - * object that can be rendered/exported to a {@link Target} - */ -public interface Renderable { - - /** - * outputs the 3D geometry. - * Most objects will use the same code for all {@link Target} implementations, - * but some may use special-case handling with instanceof checks. - */ - public void renderTo(CommonTarget target); - -} diff --git a/src/main/java/org/osm2world/core/world/data/WorldObject.java b/src/main/java/org/osm2world/core/world/data/WorldObject.java index d657fb602..5ade23776 100644 --- a/src/main/java/org/osm2world/core/world/data/WorldObject.java +++ b/src/main/java/org/osm2world/core/world/data/WorldObject.java @@ -18,7 +18,6 @@ import org.osm2world.core.math.algorithms.CAGUtil; import org.osm2world.core.math.shapes.PolygonShapeXZ; import org.osm2world.core.math.shapes.SimplePolygonShapeXZ; -import org.osm2world.core.target.Renderable; import org.osm2world.core.target.common.mesh.Mesh; import org.osm2world.core.target.common.model.Model; import org.osm2world.core.target.common.model.ModelInstance; @@ -51,7 +50,7 @@ public default List buildMeshesForModelHierarchy() { /** * returns another world object this is part of, if any (e.g. a room is part of a building). * Parents are responsible for rendering their children, so only root objects (those returning null here) - * will have their {@link Renderable#renderTo(org.osm2world.core.target.Target)} methods called. + * will have their {@link #buildMeshes()} and {@link #getSubModels()} methods called directly. */ public default @Nullable WorldObject getParent() { return null; } diff --git a/src/main/java/org/osm2world/core/world/modules/building/BuildingBottom.java b/src/main/java/org/osm2world/core/world/modules/building/BuildingBottom.java index 7a5de65cc..e15316e52 100644 --- a/src/main/java/org/osm2world/core/world/modules/building/BuildingBottom.java +++ b/src/main/java/org/osm2world/core/world/modules/building/BuildingBottom.java @@ -12,11 +12,10 @@ import org.osm2world.core.math.TriangleXZ; import org.osm2world.core.math.algorithms.TriangulationUtil; import org.osm2world.core.target.CommonTarget; -import org.osm2world.core.target.Renderable; import org.osm2world.core.target.common.material.Material; /** the underside of a {@link BuildingPart} */ -class BuildingBottom implements Renderable { +class BuildingBottom { private final BuildingPart buildingPart; private final Material material; @@ -30,7 +29,6 @@ public BuildingBottom(BuildingPart buildingPart, Material material, PolygonWithH this.floorHeight = floorHeight; } - @Override public void renderTo(CommonTarget target) { double floorEle = buildingPart.building.getGroundLevelEle() + floorHeight - 0.01; diff --git a/src/main/java/org/osm2world/core/world/modules/building/indoor/IndoorWall.java b/src/main/java/org/osm2world/core/world/modules/building/indoor/IndoorWall.java index a8ef339dc..3bdd1bb2b 100644 --- a/src/main/java/org/osm2world/core/world/modules/building/indoor/IndoorWall.java +++ b/src/main/java/org/osm2world/core/world/modules/building/indoor/IndoorWall.java @@ -19,7 +19,6 @@ import org.osm2world.core.math.*; import org.osm2world.core.math.algorithms.TriangulationUtil; import org.osm2world.core.target.CommonTarget; -import org.osm2world.core.target.Renderable; import org.osm2world.core.target.common.material.Material; import org.osm2world.core.target.common.material.Materials; import org.osm2world.core.world.attachment.AttachmentSurface; @@ -28,7 +27,7 @@ import com.google.common.collect.Sets; -public class IndoorWall implements Renderable { +public class IndoorWall { private final double straightnessTolerance = 0.001; private final double wallThickness = 0.1; @@ -961,7 +960,6 @@ private void renderTo(CommonTarget target, Boolean renderSides, Boolean attachme } } - @Override public void renderTo(CommonTarget target) { renderTo(target, true, false); } diff --git a/src/main/java/org/osm2world/core/world/modules/building/roof/Roof.java b/src/main/java/org/osm2world/core/world/modules/building/roof/Roof.java index 5b02a2a8e..cc34e454f 100644 --- a/src/main/java/org/osm2world/core/world/modules/building/roof/Roof.java +++ b/src/main/java/org/osm2world/core/world/modules/building/roof/Roof.java @@ -19,7 +19,6 @@ import org.osm2world.core.math.PolygonWithHolesXZ; import org.osm2world.core.math.VectorXZ; import org.osm2world.core.target.CommonTarget; -import org.osm2world.core.target.Renderable; import org.osm2world.core.target.common.material.Material; import org.osm2world.core.world.attachment.AttachmentSurface; import org.osm2world.core.world.modules.building.BuildingPart; @@ -71,8 +70,7 @@ public Collection getAttachmentSurfaces(double baseEle, int l } /** - * renders the roof. The same as {@link Renderable#renderTo(CommonTarget)}, - * but it also needs the lower elevation of the roof (which is not yet known at construction time). + * renders the roof. Needs the lower elevation of the roof (which is not yet known at construction time). */ public abstract void renderTo(CommonTarget target, double baseEle);