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

How to use
DirectionalLight
in
javax.media.j3d

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

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

public void setBounds(final Bounds _b) {
 l_.setInfluencingBounds(_b);
}
origin: org.fudaa.framework.ebli/ebli-3d

public void setVisible(final boolean _visible) {
 l_.setEnable(_visible);
 visible_ = _visible;
}
origin: org.fudaa.framework.ebli/ebli-3d

public BoundingSphere getLightBounds() {
 return (BoundingSphere) l_.getInfluencingBounds();
}
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: org.fudaa.framework.ebli/ebli-3d

public BLumiereDirectionnelle(final Vector3f _vecteur, final Color _couleur) {
 couleur_ = _couleur;
 direction_ = _vecteur;
 l_ = new DirectionalLight(new Color3f(_couleur), _vecteur);
 l_.setCapability(Light.ALLOW_STATE_WRITE);
 l_.setCapability(Light.ALLOW_STATE_READ);
 l_.setCapability(Light.ALLOW_COLOR_WRITE);
 l_.setCapability(Light.ALLOW_COLOR_READ);
 l_.setCapability(DirectionalLight.ALLOW_DIRECTION_WRITE);
 l_.setCapability(DirectionalLight.ALLOW_DIRECTION_READ);
 l_.setCapability(Node.ALLOW_BOUNDS_READ);
 l_.setCapability(Node.ALLOW_BOUNDS_WRITE);
 l_.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_READ);
 l_.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_WRITE);
 setCapability(ALLOW_AUTO_COMPUTE_BOUNDS_READ);
 setCapability(ALLOW_AUTO_COMPUTE_BOUNDS_READ);
 l_.setInfluencingBounds(new BoundingSphere(new Point3d(), 100));
 for (int i = 18; i < 20; i++) {
  l_.setCapability(i);
 }
 addChild(l_);
 setName("Direction");
}
origin: eu.mihosoft.vrl/vrl

DirectionalLight lgt1 = new DirectionalLight(lColor1, lDir1);
lgt1.setInfluencingBounds(bounds);
objRoot.addChild(lgt1);
DirectionalLight lgt2 = new DirectionalLight(lColor2, lDir2);
lgt2.setInfluencingBounds(bounds);
objRoot.addChild(lgt2);
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: 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;
}
origin: net.sf.jung/jung-3d

Color3f lColor2 = new Color3f(1.0f, 1.0f, 1.0f);
Vector3f lDir2  = new Vector3f(-1.0f, 0.0f, -1.0f);
DirectionalLight lgt2 = new DirectionalLight(lColor2, lDir2);
AmbientLight ambient = new AmbientLight(lColor1);
lgt2.setInfluencingBounds(bounds);
ambient.setInfluencingBounds(bounds);
objRoot.addChild(lgt2);
origin: org.fudaa.framework.ebli/ebli-3d

public void setCouleur(final Color _couleur) {
 couleur_ = _couleur;
 l_.setColor(new Color3f(couleur_));
}
javax.media.j3dDirectionalLight

Most used methods

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

Popular in Java

  • Start an intent from android
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • JCheckBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 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