Tabnine Logo
Material.setAmbientColor
Code IndexAdd Tabnine to your IDE (free)

How to use
setAmbientColor
method
in
javax.media.j3d.Material

Best Java code snippets using javax.media.j3d.Material.setAmbientColor (Showing top 2 results out of 315)

origin: com.github.fracpete/princeton-java-stdlib

  private void setColor (Appearance ap, Color c) {
    Material m = ap.getMaterial();
    m.setAmbientColor(new Color3f(c));
    m.setDiffuseColor(new Color3f(c));
    float alpha = ((float)c.getAlpha()) / 255;
    if (alpha < 1.0) {
      TransparencyAttributes t = new TransparencyAttributes();
      t.setTransparencyMode(TransparencyAttributes.BLENDED);
      t.setTransparency(1 - alpha);
      ap.setTransparencyAttributes(t);
    } else ap.setTransparencyAttributes(null);
  }
}
origin: com.googlecode.princeton-java-introduction/stdlib

  private void setColor (Appearance ap, Color c) {
    Material m = ap.getMaterial();
    m.setAmbientColor(new Color3f(c));
    m.setDiffuseColor(new Color3f(c));
    float alpha = ((float)c.getAlpha()) / 255;
    if (alpha < 1.0) {
      TransparencyAttributes t = new TransparencyAttributes();
      t.setTransparencyMode(TransparencyAttributes.BLENDED);
      t.setTransparency(1 - alpha);
      ap.setTransparencyAttributes(t);
    } else ap.setTransparencyAttributes(null);
  }
}
javax.media.j3dMaterialsetAmbientColor

Popular methods of Material

  • <init>
  • setLightingEnable
  • setCapability
  • setDiffuseColor
  • getShininess
  • setShininess
  • getAmbientColor
  • getDiffuseColor
  • getEmissiveColor
  • getLightingEnable
  • getSpecularColor
  • setColorTarget
  • getSpecularColor,
  • setColorTarget,
  • setSpecularColor

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JList (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now