Commit be396a7c authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Scene extended to display any drawable objects

parent 2fec543b
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ public class Scene {
    private final List<DrawableFace> drawableFaces = new ArrayList<>();
    private final List<DrawableFeaturePoints> drawableFeaturePoints = new ArrayList<>();
    private final List<DrawablePlane> drawableSymmetryPlanes = new ArrayList<>();
    private final List<Drawable> otherDrawables = new ArrayList<>();
    
    /**
     * Constructor for single face analysis.
@@ -153,6 +154,20 @@ public class Scene {
        }
    }
    
    /**
     * Adds new drawable object to the scene.
     * 
     * <p>
     * Note: This drawable object is ignored in the {@link setDefaultColors} method.
     * The caller must take care of the colors of the object themself.
     * </p>
     * 
     * @param otherDrawable Drawable object to be added to the scene
     */
    public void addOtherDrawable(Drawable otherDrawable) {
        otherDrawables.add(otherDrawable);
    }
    
    /**
     * Returns all drawable objects.
     * 
@@ -163,6 +178,7 @@ public class Scene {
        ret.addAll(this.drawableFaces);
        ret.addAll(this.drawableFeaturePoints);
        ret.addAll(this.drawableSymmetryPlanes);
        ret.addAll(this.otherDrawables);
        while (ret.remove(null)) {}
        return ret;
    }