Package com.jme3.scene

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


      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;
 
View Full Code Here


   * @return a @see Node below which the 3d model and the animation controller is present
   */
  public static Node getModel3(String template){
    Node n = getModelInternal(JMEAnimationController.class, template, false, false);
    n.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
    n.updateGeometricState();
   
    return n;
  }
 
  /**
 
View Full Code Here

   * @return a @see Node below which the 3d model and the animation controller is present
   */
  public static Node getModel4(String template, boolean optimized, boolean hwSkinning){
    Node n = getModelInternal(JMEAnimationController.class, template, optimized, hwSkinning);
    n.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
    n.updateGeometricState();
   
    return n;
  }
   
//  private static void addController(Node model, Mesh [] meshes,
View Full Code Here

      }
    }

    GeometryBatchFactory.optimize(grassLayer);
    grassLayer.updateGeometricState();
   
//    DistanceLodControl c = new DistanceLodControl();
//    (grassLayer).getChild(0).addControl(c);
//    c.setDistTolerance(250f);
View Full Code Here

      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 {
        System.out.println("Failed to load model "+from);
View Full Code Here

            debugShape = createDebugShape(collisionShape);
        }
        if (debugShape == null) {
            return null;
        }
        debugShape.updateGeometricState();
        return debugShape;
    }

    private static Geometry createDebugShape(CollisionShape shape) {
        Geometry geom = new Geometry();
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.