Examples of Material


Examples of aspect.render.Material

        run(800, 600, false, 60, new CubeDemo());
    }
   
    @Override
    public void onAdd() {
        Material material = new Material(loadTexture(new File("textures/tex.jpg")));
        cube = box(material, 1, 1, 1);
    }
View Full Code Here

Examples of ca.eandb.jmist.framework.Material

   * @see ca.eandb.jmist.framework.path.PathNode#sample(double, double, double)
   */
  public ScatteredRay sample(double ru, double rv, double rj) {
    PathInfo path = getPathInfo();
    WavelengthPacket lambda = path.getWavelengthPacket();
    Material material = surf.getMaterial();
    return material.emit(surf, lambda, ru, rv, rj);
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.g3d.Material

      Color color = Color.valueOf("878787");
      backgroundColor.setColors(new float[] { color.r, color.g, color.b});

      models = new Array<Model>();
      ModelBuilder builder = new ModelBuilder();
      Model   xyzModel = builder.createXYZCoordinates(10, new Material(), Usage.Position|Usage.ColorPacked),
        planeModel = builder.createLineGrid(10, 10, 1, 1, new Material(ColorAttribute.createDiffuse(Color.WHITE)), Usage.Position);
      models.add(xyzModel);
      models.add(planeModel);
      xyzInstance = new ModelInstance(xyzModel);
      xzPlaneInstance = new ModelInstance(planeModel);
      xyPlaneInstance = new ModelInstance(planeModel);
View Full Code Here

Examples of com.jme3.material.Material

    public void simpleInitApp() {
        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", b);
        geom.updateModelBound();

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
        mat.setColor("m_Color", ColorRGBA.Blue);
        geom.setMaterial(mat);

        rootNode.attachChild(geom);
    }
View Full Code Here

Examples of com.vst.model.Material

        request = newGet("/editMaterial.html");
        request.addParameter("materialId", "1");

        mv = c.handleRequest(request, new MockHttpServletResponse());

        Material material = (Material) mv.getModel().get(c.getCommandName());
        assertNotNull(material);
        request = newPost("/editMaterial.html");
        super.objectToRequestParameters(material, request);

        // update the form's fields and add it back to the request
View Full Code Here

Examples of com.xith3d.scenegraph.Material

    if ((mode==SHADING_MODE) || (mode==FLAT_MODE)) {
      if (mode==SHADING_MODE) ca.setShadeModel(ColoringAttributes.SHADE_GOURAUD);
      if (mode==FLAT_MODE) ca.setShadeModel(ColoringAttributes.SHADE_FLAT);
      a.setColoringAttributes(ca);
        a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_FILL, PolygonAttributes.CULL_NONE, 0));
        Material m = new Material();
        Color selectedColor;
      if (on) selectedColor = highlightColor;
      else selectedColor = baseColor;
       
      float[] colors = selectedColor.getRGBColorComponents(null);
      m.setAmbientColor(colors[0], colors[1], colors[2]);
     
      // Squash specular toward white => keep only hue
      float[] hsb = Color.RGBtoHSB(selectedColor.getRed(), selectedColor.getGreen(), selectedColor.getBlue(), null);
      Color.getHSBColor(hsb[0],hsb[1]/10,1.0f).getRGBColorComponents(colors);
      m.setSpecularColor(colors[0], colors[1], colors[2]);

      // diffuse is same hue and saturation but darker
      Color.getHSBColor(hsb[0],hsb[1],hsb[2]/2).getRGBColorComponents(colors);
      m.setDiffuseColor(colors[0], colors[1], colors[2]);
     
      // no emissive color
      m.setEmissiveColor(0f,0f,0f);
     
/*      m.setAmbientColor(1.0f,0.0f,0.0f);
          m.setSpecularColor(1.0f,0.9f,0.9f);
          m.setDiffuseColor(0.8f,0.0f,0.0f);
          m.setEmissiveColor(0f,0f,0f);*/
       
          m.setLightingEnable(true);
          a.setMaterial(m);
    }
        shape.setAppearance(a);
    }
View Full Code Here

Examples of de.ailis.jollada.model.Material

    public Material build()
    {
        if (this.effectInstance == null)
            throw new IllegalStateException("effectInstance not set");
        final Material material = new Material(this.effectInstance);
        material.setAsset(this.asset);
        material.setId(this.id);
        material.setName(this.name);
        return material;
    }
View Full Code Here

Examples of engine.model.Material

   * @return the Material or null if the file doesnt exist
   */
  public static Material loadMaterial(String name){
    if(name == null || name.isEmpty()) return materials.get("null");
    if(materials.containsKey(name) == false){
      materials.put(name, new Material().create(name));
    }
    return materials.get(name);
  }
View Full Code Here

Examples of gov.nasa.worldwind.render.Material

         
          if (objWhat == EnuEvtDspRndWwdEarthShpDimOne.COLOR)
          {
             Color col = (Color) evt.getValue();
             BasicShapeAttributes bsa = (BasicShapeAttributes) super.getAttributes();
             bsa.setOutlineMaterial(new Material(col));
             this.firePropertyChange(GfrShouldRedrawRnd.STR, null, null);
             return;
          }
         
          if (objWhat == EnuEvtDspRndWwdEarthShpDimOne.TRANSPARENCY)
View Full Code Here

Examples of gov.nist.microanalysis.EPQLibrary.Material

        }

        // Geometry
        List<RegionBase> regions = mcss.getChamber().getSubRegions();
        RegionBase region;
        Material material;
        IMaterialScatterModel model;
        String key;
        for (int i = 0; i < regions.size(); i++) {
            key = "geometry.region." + i + ".";
            region = regions.get(i);
            material = region.getMaterial();
            model = region.getScatterModel();

            props.setProperty(key + "material.name", material.getName());
            props.setProperty(key + "material.density",
                    Double.toString(material.getDensity()));
            props.setProperty(key + "model.absorptionEnergy",
                    Double.toString(FromSI.eV(model.getMinEforTracking())));
        }

        // Model
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.