public LidarScanLogViewer() { JavaFXCoordinateSystem lidarFrame = new JavaFXCoordinateSystem(0.1); lidarFrame.getTransforms().add(lidarPose); root.getChildren().addAll(lidarFrame, scans); TextureColorPalette1D scanColorPalette = new TextureColorPalette1D(); scanColorPalette.setHueBased(1.0, 1.0); scanMeshBuilder = new JavaFXMultiColorMeshBuilder(scanColorPalette); }
/** * Display the world coordinate system. * @param arrowLength length of each axis of the coordinate system. */ public void addWorldCoordinateSystem(double arrowLength) { JavaFXCoordinateSystem worldCoordinateSystem = new JavaFXCoordinateSystem(arrowLength); worldCoordinateSystem.setMouseTransparent(true); addNodeToView(worldCoordinateSystem); }
/** * Display the world coordinate system. * @param arrowLength length of each axis of the coordinate system. */ public void addWorldCoordinateSystem(double arrowLength) { JavaFXCoordinateSystem worldCoordinateSystem = new JavaFXCoordinateSystem(arrowLength); addNodeToView(worldCoordinateSystem); }
public JavaFXCoordinateSystem(double length) { TextureColorPalette1D colorPalette = new TextureColorPalette1D(); colorPalette.setHueBased(1.0, 1.0); JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(colorPalette); double radius = 0.02 * length; double coneHeight = 0.10 * length; double coneRadius = 0.05 * length; meshBuilder.addCylinder(length, radius, new Point3D(), new AxisAngle(0.0, 1.0, 0.0, Math.PI / 2.0), Color.RED); meshBuilder.addCone(coneHeight, coneRadius, new Point3D(length, 0.0, 0.0), new AxisAngle(0.0, 1.0, 0.0, Math.PI / 2.0), Color.RED); meshBuilder.addCylinder(length, radius, new Point3D(), new AxisAngle(1.0, 0.0, 0.0, -Math.PI / 2.0), Color.GREEN); meshBuilder.addCone(coneHeight, coneRadius, new Point3D(0.0, length, 0.0), new AxisAngle(1.0, 0.0, 0.0, -Math.PI / 2.0), Color.GREEN); meshBuilder.addCylinder(length, radius, new Point3D(), Color.BLUE); meshBuilder.addCone(coneHeight, coneRadius, new Point3D(0.0, 0.0, length), Color.BLUE); MeshView coordinateSystem = new MeshView(meshBuilder.generateMesh()); coordinateSystem.setMaterial(meshBuilder.generateMaterial()); getChildren().addAll(coordinateSystem); } }
public JavaFXCoordinateSystem(double length) { TextureColorPalette1D colorPalette = new TextureColorPalette1D(); colorPalette.setHueBased(1.0, 1.0); JavaFXMultiColorMeshBuilder meshBuilder = new JavaFXMultiColorMeshBuilder(colorPalette); double radius = 0.02 * length; double coneHeight = 0.10 * length; double coneRadius = 0.05 * length; meshBuilder.addCylinder(length, radius, new Point3d(), new AxisAngle4d(0.0, 1.0, 0.0, Math.PI / 2.0), Color.RED); meshBuilder.addCone(coneHeight, coneRadius, new Point3d(length, 0.0, 0.0), new AxisAngle4d(0.0, 1.0, 0.0, Math.PI / 2.0), Color.RED); meshBuilder.addCylinder(length, radius, new Point3d(), new AxisAngle4d(1.0, 0.0, 0.0, -Math.PI / 2.0), Color.GREEN); meshBuilder.addCone(coneHeight, coneRadius, new Point3d(0.0, length, 0.0), new AxisAngle4d(1.0, 0.0, 0.0, -Math.PI / 2.0), Color.GREEN); meshBuilder.addCylinder(length, radius, new Point3d(), Color.BLUE); meshBuilder.addCone(coneHeight, coneRadius, new Point3d(0.0, 0.0, length), Color.BLUE); MeshView coordinateSystem = new MeshView(meshBuilder.generateMesh()); coordinateSystem.setMaterial(meshBuilder.generateMaterial()); getChildren().addAll(coordinateSystem); } }
public LidarScanLogViewer() { JavaFXCoordinateSystem lidarFrame = new JavaFXCoordinateSystem(0.1); lidarFrame.getTransforms().add(lidarPose); root.getChildren().addAll(lidarFrame, scans); TextureColorPalette1D scanColorPalette = new TextureColorPalette1D(); scanColorPalette.setHueBased(1.0, 1.0); scanMeshBuilder = new JavaFXMultiColorMeshBuilder(scanColorPalette); }
public LidarFrameViewer(REAUIMessager uiMessager) { lidarCoordinateSystem = new JavaFXCoordinateSystem(0.1); lidarCoordinateSystem.getTransforms().add(lidarPose); root.getChildren().add(lidarCoordinateSystem); root.setMouseTransparent(true); uiMessager.registerTopicListener(REAModuleAPI.LidarScanState, this::handleMessage); uiMessager.registerModuleMessagerStateListener(isMessagerOpen -> { if (isMessagerOpen) start(); else stop(); }); }