Examples of updateModelBound()


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

                mesh.setBuffer(Type.Index, 3, (ShortBuffer) indexBuffers[i].getBuffer());
            }
            mesh.setBuffer(Type.Normal, 3, normalBuffers[i]);
            Geometry g = new Geometry("g" + i, mesh);
            g.setUserData("curveLength", oneReferenceToCurveLength);
            g.updateModelBound();
            result.add(g);
        }
        return result;
    }
View Full Code Here

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

            //Material mat = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
            //spatial.setMaterial(mat);
            node.attachChild(spatial);

      node.setModelBound(new BoundingSphere());
      node.updateModelBound();
  } catch (Exception e) {
            e.printStackTrace();
      //logger.logp(Level.SEVERE, this.getClass().toString(),"loadNode()", "Exception", e);
      node = null;
  }
View Full Code Here

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

      Node n = Assembler2.getModel4(templates[template_index],true, true);
      if(n != null){
        n.setModelBound(new BoundingBox());
        n.updateGeometricState();
        n.updateModelBound();
        nodes.add(n);
        currentNode++;
        int x = currentNode;
        int y = 2+((currentNode%2)*-1);//*currentNode;
//        n.setLocalTranslation(x, 0.0f, y);
View Full Code Here

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

            for (Modifier modifier : modifiers) {
                modifier.apply(result, blenderContext);
            }

            // I prefer do compute bounding box here than read it from the file
            result.updateModelBound();

            LOGGER.fine("Applying animations to the object if such are defined.");
            AnimationHelper animationHelper = blenderContext.getHelper(AnimationHelper.class);
            animationHelper.applyAnimations(result, blenderContext.getBlenderKey().getNodeAnimationNames(name));
View Full Code Here

Examples of com.jme3.scene.Spatial.updateModelBound()

        mPlanetGround.setTexture("GlowMap", assetManager.loadTexture("Textures/Planets/Earth/Earthlights2_1280.jpg"));
        mPlanetGround.setFloat("Shininess", 0.01f); // [1,128]
        geom.setMaterial(mPlanetGround);
        geom.setLocalTranslation(getPosition());
        TangentBinormalGenerator.generate(geom);
        geom.updateModelBound();
        ground = geom;
    }
   
    private void createClouds(String cloudTexture) {
        Spatial geom = createSphere();
View Full Code Here

Examples of com.jme3.scene.Spatial.updateModelBound()

        mClouds.setFloat("Shininess", 0.01f); // [1,128]
        mClouds.getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);
        geom.setMaterial(mClouds);
        geom.setLocalTranslation(getPosition());
        TangentBinormalGenerator.generate(geom);
        geom.updateModelBound();
        clouds = geom;
    }

    private void createAtmosphere() {
     
View Full Code Here

Examples of com.jme3.scene.Spatial.updateModelBound()

      Spatial n = (Spatial) assetMan.loadModel(from.getAbsolutePath());
      if(n != null) {
        String fName = from.getName().substring(0,
            from.getName().length() - fileEnding.length());
        fName = from.getParent()+"/"+fName+".j3o";
        n.updateModelBound();
        n.updateGeometricState();
        BinaryExporter.getInstance().save(n,new File(fName));
        time = t.getTimeInSeconds();
        System.out.println("File "+fName+".saved in "+ time +" seconds");
      } else {
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.