Examples of addLight()


Examples of com.jme3.asset.BlenderKey.LoadingResults.addLight()

                switch (block.getCode()) {
                    case FileBlockHeader.BLOCK_OB00:// Object
                        ObjectHelper objectHelper = blenderContext.getHelper(ObjectHelper.class);
                        Object object = objectHelper.toObject(block.getStructure(blenderContext), blenderContext);
                        if (object instanceof LightNode) {
                            loadingResults.addLight((LightNode) object);
                        } else if (object instanceof CameraNode) {
                            loadingResults.addCamera((CameraNode) object);
                        } else if (object instanceof Node) {
                            if (LOGGER.isLoggable(Level.FINE)) {
                                LOGGER.log(Level.FINE, "{0}: {1}--> {2}", new Object[] { ((Node) object).getName(), ((Node) object).getLocalTranslation().toString(), ((Node) object).getParent() == null ? "null" : ((Node) object).getParent().getName() });
View Full Code Here

Examples of com.jme3.asset.BlenderKey.LoadingResults.addLight()

                            String worldName = worldStructure.getName();
                            if (blenderKey.getUsedWorld() == null || blenderKey.getUsedWorld().equals(worldName)) {
                                LandscapeHelper landscapeHelper = blenderContext.getHelper(LandscapeHelper.class);
                                Light ambientLight = landscapeHelper.toAmbientLight(worldStructure);
                                if(ambientLight != null) {
                                    loadingResults.addLight(new LightNode(null, ambientLight));
                                }
                                loadingResults.setSky(landscapeHelper.toSky(worldStructure));
                                loadingResults.addFilter(landscapeHelper.toFog(worldStructure));
                                loadingResults.setBackgroundColor(landscapeHelper.toBackgroundColor(worldStructure));
                            }
View Full Code Here

Examples of com.jme3.scene.Geometry.addLight()

            //out.setInterleaved();
            Geometry outGeom = new Geometry("Geom"+entry.getKey(), out);
            outGeom.setLocalTransform(inGeom.getWorldTransform());
            outGeom.setMaterial(inGeom.getMaterial());
            for (Light light : inGeom.getWorldLightList()){
                outGeom.addLight(light);
            }

            outGeom.updateGeometricState();
            newGeoms.add(outGeom);
        }
View Full Code Here

Examples of com.jme3.scene.Node.addLight()

            // attach the nodes to the root node at the very end so that the root objects have no parents during constraint applying
            LOGGER.fine("Creating the root node of the model and applying loaded nodes of the scene to it.");
            Node modelRoot = new Node(blenderKey.getName());
            for (Node node : rootObjects) {
                if (node instanceof LightNode) {
                    modelRoot.addLight(((LightNode) node).getLight());
                }
                modelRoot.attachChild(node);
            }

            return modelRoot;
View Full Code Here

Examples of com.jme3.scene.Node.addLight()

                if (pObject.isNotNull()) {
                    Structure objectStructure = pObject.fetchData().get(0);

                    Object object = objectHelper.toObject(objectStructure, blenderContext);
                    if (object instanceof LightNode) {
                        result.addLight(((LightNode) object).getLight());
                        result.attachChild((LightNode) object);
                    } else if (object instanceof Node) {
                        if (LOGGER.isLoggable(Level.FINE)) {
                            LOGGER.log(Level.FINE, "{0}: {1}--> {2}", new Object[] { ((Node) object).getName(), ((Node) object).getLocalTranslation().toString(), ((Node) object).getParent() == null ? "null" : ((Node) object).getParent().getName() });
                        }
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.