javafx.scene.paint.Material Java Examples

The following examples show how to use javafx.scene.paint.Material. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TriangleMeshHelper.java    From FXyzLib with GNU General Public License v3.0 5 votes vote down vote up
public Material getMaterialWithColor(Color color, String image){
        PhongMaterial mat = new PhongMaterial(color);
        if(image!=null && !image.isEmpty()){
            Image img = new Image(image);
            mat.setDiffuseMap(img);
            NormalMap normal = new NormalMap(img);
//            normal.setIntensity(10);
//            normal.setIntensityScale(2);
            mat.setBumpMap(normal);
        }
        mat.setSpecularPower(32);
        mat.setSpecularColor(Color.WHITE);
        return mat;
    }
 
Example #2
Source File: MtlReader.java    From gluon-samples with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public Map<String, Material> getMaterials() {
    return Collections.unmodifiableMap(materials);
}
 
Example #3
Source File: ObjImporter.java    From gluon-samples with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public Material getMaterial() {
    return materials.values().iterator().next();
}
 
Example #4
Source File: ObjImporter.java    From gluon-samples with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public Material getMaterial(String key) {
    return materials.get(key);
}
 
Example #5
Source File: SegmentedTorus.java    From TweetwallFX with MIT License 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #6
Source File: Cone.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #7
Source File: Capsule.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #8
Source File: TriangleMeshHelper.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public void setMaterialWithPattern(Material mat, CarbonPatterns cp){
    Image img = getPatternImage(cp);  
    clearMaterialAndSetDiffMap(material, img);
}
 
Example #9
Source File: Tetrahedron.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #10
Source File: Trapezoid.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #11
Source File: Torus.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #12
Source File: Octahedron.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}
 
Example #13
Source File: Pyramid.java    From FXyzLib with GNU General Public License v3.0 4 votes vote down vote up
public final void setMaterial(Material value) {
    mesh.setMaterial(value);
}