Examples of Lighting


Examples of javafx.scene.effect.Lighting

  protected void applyBarFillColorHex(final Node node, final String colorHex) {
    node.setStyle("-fx-bar-fill: " + colorHex + ";");
    final DropShadow ds = new DropShadow();
    ds.setOffsetX(3.0);
    ds.setOffsetY(3.0);
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(1d);
    lighting.setLight(new Light.Distant());
    ds.setInput(lighting);
    node.setEffect(ds);
  }
View Full Code Here

Examples of javafx.scene.effect.Lighting

   */
  protected final Lighting createLighting() {
    final Light.Distant handBaseLight = new Light.Distant();
    Bindings.bindBidirectional(handBaseLight.azimuthProperty(), lightingAzimuthProperty);
    Bindings.bindBidirectional(handBaseLight.elevationProperty(), lightingElevationProperty);
    final Lighting handBaseLighting = new Lighting();
    handBaseLighting.setLight(handBaseLight);
    handBaseLighting.setSpecularConstant(0.7d);
    handBaseLighting.setSpecularExponent(20d);
    handBaseLighting.setDiffuseConstant(1.0d);
    handBaseLighting.setSurfaceScale(7d * sizeScale);
    return handBaseLighting;
  }
View Full Code Here

Examples of javafx.scene.effect.Lighting

          indicatorHeight, pointDistance, centerX, centerY, fillProperty);
      indicatorShape.getTransforms().addAll(indicatorRotate);
      indicatorBase.getChildren().add(indicatorShape);
    }
   
    final Lighting lighting = createLighting();
    if (indicatorType == IndicatorType.KNOB) {
      lighting.setSpecularConstant(0.4d);
      lighting.setSpecularExponent(40d);
      lighting.setDiffuseConstant(1.7d);
    }
    indicatorBase.setEffect(lighting);
   
    indicator.getChildren().add(indicatorBase);
   
View Full Code Here

Examples of javafx.scene.effect.Lighting

   * @param indicatorShape the indicator/hand shape
   * @param dialNode the center portion of the knob
   * @return the completed knob
   */
    protected Group createKnob(final Shape indicatorShape, final Node dialNode) {
    final Lighting lighting = createLighting();
    lighting.setSurfaceScale(5d * sizeScale);
    final Shape indicatorBolt = createIndicatorBolt();
    indicatorBolt.setEffect(lighting);
   
      final Group handShapeGroup = new Group();
      handShapeGroup.setCache(true);
View Full Code Here

Examples of javafx.scene.effect.Lighting

   */
  private void createPreloaderScene() {
    bar = new ProgressBar();
    bar.setMinWidth(WIDTH / 1.3d);
    final Light light = new Light.Distant();
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(3d);
    lighting.setLight(light);
    bar.setEffect(lighting);
    new Dialog(null, stage, KEY.APP_TITLE, RS.rbLabel(KEY.LOADING), null,
        WIDTH, HEIGHT, bar);
  }
View Full Code Here

Examples of javafx.scene.effect.Lighting

   *            the {@linkplain Service}
   * @return the {@linkplain ProgressIndicator} alert {@linkplain Service}
   */
  public static <T> Service<T> alertProgress(final Stage parent, final Task<T> progressTask) {
    final Light light = new Light.Distant();
    final Lighting lighting = new Lighting();
    lighting.setSurfaceScale(1d);
    lighting.setLight(light);
    //final ProgressIndicator pi = ProgressIndicatorBuilder.create().maxWidth(200d).effect(lighting).build();
    final ProgressIndicator pi = ProgressBarBuilder.create().maxWidth(parent.getWidth() / 2d).maxHeight(25d).effect(lighting).build();
    final Stage alert = alert(parent, parent.getWidth(), parent.getHeight(), Modality.APPLICATION_MODAL, pi,
        LabelBuilder.create().text(RS.rbLabel(KEY.SENDING)).build());
    final Service<T> service = new Service<T>() {
View Full Code Here

Examples of org.gephi.visualization.opengl.Lighting

        antiAliasing = NbPreferences.forModule(VizConfig.class).getInt(VizConfig.ANTIALIASING, VizConfig.DEFAULT_ANTIALIASING);
        antialisaingCombobox.setSelectedIndex(antiAliasing == 0 ? 0 : Math.round((float) (Math.log(antiAliasing) / Math.log(2))));
        fpsCheckbox.setSelected(NbPreferences.forModule(VizConfig.class).getBoolean(VizConfig.SHOW_FPS, VizConfig.DEFAULT_SHOW_FPS));

        //Lights
        Lighting lighting = new Lighting();
        Light ambiant = lighting.getLights().get(0);
        Light light1 = lighting.getLights().get(1);
        Light light2 = lighting.getLights().get(2);
        Light light3 = lighting.getLights().get(3);

        //Ambiant
        ((JColorButton) ambientAmbiantColorButton).setColor(ColorUtils.decode(ambiant.getAmbiant()));
        ((JColorButton) ambientDiffuseColorButton).setColor(ColorUtils.decode(ambiant.getDiffuse()));
        ((JColorButton) ambientSpecularColorButton).setColor(ColorUtils.decode(ambiant.getSpecular()));
View Full Code Here

Examples of org.gephi.visualization.opengl.Lighting

        gl.glEnable(GL.GL_TEXTURE_2D);

    }

    protected void setLighting(GL gl) {
        lighting = new Lighting();
        lighting.glInit(gl);
    }
View Full Code Here

Examples of org.gephi.visualization.opengl.Lighting

        antiAliasing = NbPreferences.forModule(VizConfig.class).getInt(VizConfig.ANTIALIASING, VizConfig.DEFAULT_ANTIALIASING);
        antialisaingCombobox.setSelectedIndex(antiAliasing == 0 ? 0 : Math.round((float) (Math.log(antiAliasing) / Math.log(2))));
        fpsCheckbox.setSelected(NbPreferences.forModule(VizConfig.class).getBoolean(VizConfig.SHOW_FPS, VizConfig.DEFAULT_SHOW_FPS));

        //Lights
        Lighting lighting = new Lighting();
        Light ambiant = lighting.getLights().get(0);
        Light light1 = lighting.getLights().get(1);
        Light light2 = lighting.getLights().get(2);
        Light light3 = lighting.getLights().get(3);

        //Ambiant
        ((JColorButton) ambientAmbiantColorButton).setColor(ColorUtils.decode(ambiant.getAmbiant()));
        ((JColorButton) ambientDiffuseColorButton).setColor(ColorUtils.decode(ambiant.getDiffuse()));
        ((JColorButton) ambientSpecularColorButton).setColor(ColorUtils.decode(ambiant.getSpecular()));
View Full Code Here

Examples of org.gephi.visualization.opengl.Lighting

        gl.glEnable(GL2.GL_TEXTURE_2D);

    }

    protected void setLighting(GL2 gl) {
        lighting = new Lighting();
        lighting.glInit(gl);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.