congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Material
Code IndexAdd Tabnine to your IDE (free)

How to use
Material
in
javax.media.j3d

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

origin: eu.mihosoft.vrl/vrl

Material mat = new Material();
float b = color.getBlue() / 255.f;
mat.setDiffuseColor(r, g, b);
mat.setSpecularColor(1.f, 1.f, 1.f);
mat.setShininess(20.f);
mat.setColorTarget(vertexColoringType);
mat.setLightingEnable(true);
a.setMaterial(mat);
origin: org.fudaa.framework.ebli/ebli-3d

/**
 * recupere la brillance de l'objet.
 */
public float getBrillance() {
 return shape_.getAppearance().getMaterial().getShininess();
}
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 static Appearance createCustomAppearance (boolean fill) {
  Appearance ap = createBlankAppearance();
  PolygonAttributes pa = new PolygonAttributes();
  if (!fill) pa.setPolygonMode(PolygonAttributes.POLYGON_LINE);
  pa.setCullFace(PolygonAttributes.CULL_NONE);
  LineAttributes la = new LineAttributes();
  la.setLineWidth(penRadius);
  la.setLineAntialiasingEnable(view.getSceneAntialiasingEnable());
  PointAttributes poa = new PointAttributes();
  poa.setPointAntialiasingEnable(view.getSceneAntialiasingEnable());
  ap.setPolygonAttributes(pa);
  ap.setLineAttributes(la);
  ap.setPointAttributes(poa);
  Color3f col = new Color3f(penColor);
  Color3f black = new Color3f(0, 0, 0);
  Color3f specular = new Color3f(GRAY);
  // Material properties
  Material material = new Material(col, black, col, specular, 64);
  material.setCapability(Material.ALLOW_COMPONENT_READ);
  material.setCapability(Material.ALLOW_COMPONENT_WRITE);
  material.setLightingEnable(true);
  ap.setMaterial(material);
  return ap;
}
origin: org.fudaa.framework.ebli/ebli-3d

pa.setCullFace(PolygonAttributes.CULL_NONE);
pa.setBackFaceNormalFlip(true);
final Material m = new Material();
m.setCapability(Material.ALLOW_COMPONENT_READ);
m.setCapability(Material.ALLOW_COMPONENT_WRITE);
m.setShininess(2);
m.setLightingEnable(false);
final TextureAttributes texa = new TextureAttributes();
texa.setCapability(TextureAttributes.ALLOW_MODE_WRITE);
origin: net.sf.jung/jung-3d

Color3f red = new Color3f(1, 0, 0);
Color3f yellow = new Color3f(0,1,1);
Material lightGrayMaterial = new Material(lightGray, black,
    lightGray, white, 100.0f);
Material blackMaterial = new Material(lightGray, black,
    black, lightGray, 10.0f);
Material whiteMaterial = new Material(white, white,
    white, white, 100.0f);
Material grayMaterial = new Material(gray, black,
    gray, gray, 100.0f);
Material redMaterial = new Material(red, black,
    red, red, 100.0f);
Material yellowMaterial = new Material(yellow, black,
    yellow, yellow, 100.0f);
origin: deegree/deegree3

Material mat = app.getMaterial();
if ( mat != null ) {
  mat.getAmbientColor( ambient );
  mat.getDiffuseColor( diffuse );
  mat.getSpecularColor( specular );
  mat.getEmissiveColor( emmisive );
  shininess = mat.getShininess();
origin: org.fudaa.framework.ebli/ebli-3d

/**
 * mode ombr ou pas.
 */
public void setEclairage(final boolean _valeur) {
 shape_.getAppearance().getMaterial().setLightingEnable(_valeur);
}
origin: org.fudaa.framework.ebli/ebli-3d

/**
 * modifie la brillance de l'objet.
 */
public void setBrillance(final double _b) {
 shape_.getAppearance().getMaterial().setShininess((float) _b);
}
origin: com.github.fracpete/princeton-java-stdlib

private static Appearance createCustomAppearance (boolean fill) {
  Appearance ap = createBlankAppearance();
  PolygonAttributes pa = new PolygonAttributes();
  if (!fill) pa.setPolygonMode(PolygonAttributes.POLYGON_LINE);
  pa.setCullFace(PolygonAttributes.CULL_NONE);
  LineAttributes la = new LineAttributes();
  la.setLineWidth(penRadius);
  la.setLineAntialiasingEnable(view.getSceneAntialiasingEnable());
  PointAttributes poa = new PointAttributes();
  poa.setPointAntialiasingEnable(view.getSceneAntialiasingEnable());
  ap.setPolygonAttributes(pa);
  ap.setLineAttributes(la);
  ap.setPointAttributes(poa);
  Color3f col = new Color3f(penColor);
  Color3f black = new Color3f(0, 0, 0);
  Color3f specular = new Color3f(GRAY);
  // Material properties
  Material material = new Material(col, black, col, specular, 64);
  material.setCapability(Material.ALLOW_COMPONENT_READ);
  material.setCapability(Material.ALLOW_COMPONENT_WRITE);
  material.setLightingEnable(true);
  ap.setMaterial(material);
  return ap;
}
origin: net.sf.jung/jung-3d

Color3f yellow = new Color3f(1,1,0);
Material objMaterial = new Material(objColor, black,
    objColor, white, 100.0f);
Material blackMaterial = new Material(objColor, black,
    black, objColor, 10.0f);
Material whiteMaterial = new Material(white, white,
    white, white, 100.0f);
Material grayMaterial = new Material(gray, black,
    gray, gray, 100.0f);
Material redMaterial = new Material(red, black,
    red, red, 100.0f);
Material yellowMaterial = new Material(yellow, black, 
    yellow, yellow, 100);
look.setMaterial(new Material(objColor, black,
    objColor, white, 100.0f));
Appearance blackLook = new Appearance();
origin: eu.mihosoft.vrl/vrl

/**
 * Returns a solid appearance.
 * @return the appearance
 */
private Appearance getColoredAppearance() {
  Appearance a = new Appearance();
  PolygonAttributes pa = new PolygonAttributes();
  pa.setCullFace(PolygonAttributes.CULL_NONE);  // see both sides of shape
  pa.setPolygonMode(PolygonAttributes.POLYGON_FILL);
  pa.setBackFaceNormalFlip(true);
  a.setPolygonAttributes(pa);
  LineAttributes la = new LineAttributes();
  la.setLineAntialiasingEnable(true);
  la.setLineWidth(1.f);
  a.setLineAttributes(la);
  Material mat = new Material();
  mat.setSpecularColor(1.f, 1.f, 0.8f);
  mat.setDiffuseColor(1.f, 0.4f, 0.1f);
  mat.setShininess(20.f);
  mat.setLightingEnable(true);
  a.setMaterial(mat);
  return a;
}
origin: com.github.fracpete/princeton-java-stdlib

Material material = new Material(col, black, col, specular, 64);
material.setCapability(Material.ALLOW_COMPONENT_READ);
material.setCapability(Material.ALLOW_COMPONENT_WRITE);
material.setLightingEnable(true);
ap.setMaterial(material);
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);
  }
}
origin: eu.mihosoft.vrl/vrl

Material mat = new Material();
float b = color.getBlue() / 255.f;
mat.setDiffuseColor(r, g, b);
mat.setSpecularColor(1.f, 1.f, 1.f);
mat.setShininess(20.f);
mat.setLightingEnable(true);
a.setMaterial(mat);
origin: com.googlecode.princeton-java-introduction/stdlib

Material material = new Material(col, black, col, specular, 64);
material.setCapability(Material.ALLOW_COMPONENT_READ);
material.setCapability(Material.ALLOW_COMPONENT_WRITE);
material.setLightingEnable(true);
ap.setMaterial(material);
origin: eu.mihosoft.vrl/vrl

Material mat = new Material();
float b = color.getBlue() / 255.f;
mat.setDiffuseColor(r, g, b);
mat.setSpecularColor(1.f, 1.f, 1.f);
mat.setShininess(20.f);
mat.setLightingEnable(true);
a.setMaterial(mat);
origin: eu.mihosoft.vrl/vrl

Material mat = new Material();
mat.setSpecularColor(1.f, 1.f, 1.f);
mat.setDiffuseColor(r, g, b); 
mat.setShininess(20.f);
  mat.setLightingEnable(true);
mat.setColorTarget(vertexColoringType);
origin: eu.mihosoft.vrl/vrl

  Material mat = new Material();
  mat.setDiffuseColor(r, g, b);
  mat.setSpecularColor(1.f, 1.f, 1.f);
  mat.setShininess(20.f);
  mat.setColorTarget(vertexColoringType);
  mat.setLightingEnable(true);
  a.setMaterial(mat);
} else {
javax.media.j3dMaterial

Most used methods

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

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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