Package org.kalimullin.fsraytracer.geometry

Examples of org.kalimullin.fsraytracer.geometry.Polygon


            // Face parsing
            case "point-id":
                currentFacePoints.add(pointMap.get(Integer.parseInt(currentElementValue)));
                break;
            case "face":
                polygonMap.put(currentId, new Polygon(new Face(currentFacePoints)));
                break;
            // SceneObject parsing
            case "face-id":
                polygonSet.add(polygonMap.get(Integer.parseInt(currentElementValue)));
                break;
View Full Code Here


        Point point4 = new Point(0, 0, 1.2);
        Face face1 = new Face(point1, point2, point3);
        Face face2 = new Face(point1, point2, point4);
        Face face3 = new Face(point1, point4, point3);
        Face face4 = new Face(point4, point3, point2);
        Polygon polygon1 = new Polygon(face1);
        Polygon polygon2 = new Polygon(face2);
        Polygon polygon3 = new Polygon(face3);
        Polygon polygon4 = new Polygon(face4);
        pyramidSceneObjectSet.add(new PolygonalSceneObject("pyramid",
                new HashSet<>(Arrays.asList(polygon1, polygon2, polygon3, polygon4))));

    }
View Full Code Here

     */
    private Map<Integer, Polygon> getPolygons() {
        Map<Integer, Polygon> polygonMap = new HashMap<>();
        Map<Integer, Face> faceMap = getFaces();
        for (Integer key: faceMap.keySet()) {
            Polygon polygon = new Polygon(faceMap.get(key));
            polygonMap.put(key, polygon);
            logger.debug("Added Polygon[{}]: {}", key, polygon);
        }
        return polygonMap;
    }
View Full Code Here

TOP

Related Classes of org.kalimullin.fsraytracer.geometry.Polygon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.