Examples of applyMaterial()


Examples of com.jme3.scene.plugins.blender.materials.MaterialContext.applyMaterial()

                if (materialNumber < 0) {
                    geometry.setMaterial(this.getBlackUnshadedMaterial(blenderContext));
                } else if (materials[materialNumber] != null) {
                    LinkedHashMap<String, List<Vector2f>> uvCoordinates = meshBuilder.getUVCoordinates(materialNumber);
                    MaterialContext materialContext = materials[materialNumber];
                    materialContext.applyMaterial(geometry, structure.getOldMemoryAddress(), uvCoordinates, blenderContext);
                } else {
                    geometry.setMaterial(blenderContext.getDefaultMaterial());
                    LOGGER.warning("The importer came accross mesh that points to a null material. Default material is used to prevent loader from crashing, " + "but the model might look not the way it should. Sometimes blender does not assign materials properly. " + "Enter the edit mode and assign materials once more to your faces.");
                }
            }
View Full Code Here

Examples of nu3a.material.N3Material.applyMaterial()

    N3GeometryData g = N3GeometryData.createPlane(0.4f, 0.4f, new N3ColorRGBA(1, 0, 0), false);
    N3Material sm = new N3Material(scene, "rojo");
    sm.setAmbientColor(new N3ColorRGBA(1, 0, 0));
    sm.setSpecularColor(new N3ColorRGBA(0, 0, 0), 0.1f);
    sm.setDiffuseColor(new N3ColorRGBA(1, 0, 0));
    sm.applyMaterial(true);
    for (int i = -5; i < 4; i++)
      for (int j = -5; j < 4; j++) {
        sueloTrans = new N3TransformationNode(scene, "sueloTrans" + i + "-" + j);
        sueloTrans.translate(new N3Vector3D(i * 0.4f, j * 0.4f, 0));
        sueloTrans.update();
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.