Tabnine Logo
DirectionalLight.setColor
Code IndexAdd Tabnine to your IDE (free)

How to use
setColor
method
in
javax.media.j3d.DirectionalLight

Best Java code snippets using javax.media.j3d.DirectionalLight.setColor (Showing top 4 results out of 315)

origin: org.fudaa.framework.ebli/ebli-3d

public void setIntensite(final double _intensite) {
 intensite_ = _intensite;
 float red, green, blue;
 red = (float) (couleur_.getRed() * intensite_ / 255);
 green = (float) (couleur_.getGreen() * intensite_ / 255);
 blue = (float) (couleur_.getBlue() * intensite_ / 255);
 try {
  l_.setColor(new Color3f(red, green, blue));
 } catch (final Exception ex) {}
}
origin: org.fudaa.framework.ebli/ebli-3d

public void setCouleur(final Color _couleur) {
 couleur_ = _couleur;
 l_.setColor(new Color3f(couleur_));
}
origin: com.googlecode.princeton-java-introduction/stdlib

/**
 * Adds a directional light of color col which shines in the direction vector (x, y, z)
 */
public static Light directionalLight (double x, double y, double z, Color col) {
  DirectionalLight light = new DirectionalLight();
  light.setColor(new Color3f(col));
  light.setInfluencingBounds(INFINITE_BOUNDS);
  light.setCapability(DirectionalLight.ALLOW_STATE_WRITE);
  light.setCapability(DirectionalLight.ALLOW_COLOR_WRITE);
  light.setEnable(true);
  BranchGroup bg = createBranchGroup();
  TransformGroup tg = createTransformGroup();
  tg.addChild(light);
  bg.addChild(tg);
  lightGroup.addChild(bg);
  Light l = new Light(bg, tg, light);
  l.setDirection(new Vector3D(x, y, z));
  return l;
}
origin: com.github.fracpete/princeton-java-stdlib

/**
 * Adds a directional light of color col which shines in the direction vector (x, y, z)
 */
public static Light directionalLight (double x, double y, double z, Color col) {
  DirectionalLight light = new DirectionalLight();
  light.setColor(new Color3f(col));
  light.setInfluencingBounds(INFINITE_BOUNDS);
  light.setCapability(DirectionalLight.ALLOW_STATE_WRITE);
  light.setCapability(DirectionalLight.ALLOW_COLOR_WRITE);
  light.setEnable(true);
  BranchGroup bg = createBranchGroup();
  TransformGroup tg = createTransformGroup();
  tg.addChild(light);
  bg.addChild(tg);
  lightGroup.addChild(bg);
  Light l = new Light(bg, tg, light);
  l.setDirection(new Vector3D(x, y, z));
  return l;
}
javax.media.j3dDirectionalLightsetColor

Popular methods of DirectionalLight

  • <init>
  • setInfluencingBounds
  • setCapability
  • setEnable
  • getInfluencingBounds
  • setDirection

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Kernel (java.awt.image)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • JList (javax.swing)
  • Github Copilot alternatives
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