public static Graphics3DNode createPointCloud(String name, List<Point3d> worldPoints, double pointRadius, AppearanceDefinition appearance) { // TODO Change to point sprite mesh Graphics3DNode pointCloud = new Graphics3DNode("PointCloud" + name); for (int i = 0; i < worldPoints.size(); i++) { Graphics3DNode worldPointNode = new Graphics3DNode(name + "point" + i, Graphics3DNodeType.VISUALIZATION, new Graphics3DObject(new Sphere3d(pointRadius), appearance)); worldPointNode.translate(worldPoints.get(i).getX(), worldPoints.get(i).getY(), worldPoints.get(i).getZ()); pointCloud.addChild(worldPointNode); } return pointCloud; }
public static Graphics3DNode createPointCloud(String name, List<Point3D> worldPoints, double pointRadius, AppearanceDefinition appearance) { // TODO Change to point sprite mesh Graphics3DNode pointCloud = new Graphics3DNode("PointCloud" + name); for (int i = 0; i < worldPoints.size(); i++) { Graphics3DNode worldPointNode = new Graphics3DNode(name + "point" + i, Graphics3DNodeType.VISUALIZATION, new Graphics3DObject(new Sphere3D(pointRadius), appearance)); worldPointNode.translate(worldPoints.get(i).getX(), worldPoints.get(i).getY(), worldPoints.get(i).getZ()); pointCloud.addChild(worldPointNode); } return pointCloud; }
public void addPoints(List<Point3D> points) { if(!disableGraphics) { for(Point3D point : points) { Graphics3DObject testCubeGraphicObject = new Graphics3DObject(); testCubeGraphicObject.addCube(VOXEL_SIZE, VOXEL_SIZE, VOXEL_SIZE, YoAppearance.Aqua()); Graphics3DNode cubeNode = scs.addStaticLinkGraphics(testCubeGraphicObject, Graphics3DNodeType.VISUALIZATION); cubeNode.translate(point.getX(), point.getY(), point.getZ()); if(rootNode == null) rootNode = cubeNode; else rootNode.addChild(cubeNode); } } }