Examples of updateModelBound()


Examples of com.jme.scene.shape.Sphere.updateModelBound()

            sphere.setRenderState(shader);
        }

        sphere.setModelBound(new BoundingSphere());
        sphere.updateModelBound();
        sphere.updateRenderState();

        rootNode.attachChild(sphere);
    }
View Full Code Here

Examples of com.jme.scene.shape.Sphere.updateModelBound()

        if (selectedForInput) {      
            Spatial collisionGraph = new Sphere("AvatarCollision", origin, 10, 10, radius);
           
            collisionGraph.setModelBound(new BoundingBox());
            collisionGraph.updateModelBound();

            // Fetch the JME Collision system using the server manager of the Cell
            // to which this renderer is attached.
            ServerSessionManager manager =
                    cell.getCellCache().getSession().getSessionManager();
View Full Code Here

Examples of com.jme.scene.shape.Teapot.updateModelBound()

    final Teapot teapot = new Teapot("killer teapot");
    TankGame.GAME.lock();
    TankGame.GAMESTATE.getRoot().attachChild(teapot);
    teapot.updateRenderState();
    teapot.setModelBound(new BoundingBox());
    teapot.updateModelBound();
    teapot.updateWorldBound();
   
    teapot.setLocalTranslation(vector.origin);
    TankGame.GAME.unlock();
   
View Full Code Here

Examples of com.jme.scene.shape.Tube.updateModelBound()

        n.setRenderState(matState3);
        n.attachChild(t);

        // Set the bound on the tube and update it
        t.setModelBound(new BoundingSphere());
        t.updateModelBound();
        return n;
    }

    private Set<RotationListener> listenerSet = new HashSet();
View Full Code Here

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

    @Override
    public void simpleInitApp() {
        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", b);
        geom.updateModelBound();

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
        mat.setColor("m_Color", ColorRGBA.Blue);
        geom.setMaterial(mat);
View Full Code Here

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

    m.setBuffer(Type.Position, 3, vb);
    m.setBuffer(Type.Index, 3, ib);
    m.updateBound();
   
    Geometry g = new Geometry("Debug_NavMesh_"+this.toString(),m);
    g.updateModelBound();
    return g;
  }
 
  /**
   * Packs all border cells into a renderable mesh
View Full Code Here

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

    m.setBuffer(Type.Position, 3, vb);
    m.setBuffer(Type.Index, 3, ib);
    m.updateBound();
   
    Geometry g = new Geometry("Debug_NavBorderMesh_"+this.toString(),m);
    g.updateModelBound();
    return g;
  }
 

  public Geometry getDebugBounds(float y){
View Full Code Here

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

    geometries.add(new Geometry("left", l));

    Mesh m = new Mesh();
    GeometryBatchFactory.mergeGeometries(geometries, m);
    Geometry g = new Geometry("bounds of "+toString(), m);
    g.updateModelBound();
    return g;

  }
 
  public void setPosition(Vector3f position){
View Full Code Here

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

        Spatial s = n.getChild(0);
        String mat = "default";
        if(s instanceof Geometry) {
          Geometry g = ((Geometry)s);
          g.setName(fName);
          g.updateModelBound();
          mat = g.getMaterial().getName();
          //remove material, we don't want jme to store different materials being all the same on load, so we remove it here
          g.setMaterial(null);
        }
       
View Full Code Here

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

    private static Geometry createDebugShape(CollisionShape shape) {
        Geometry geom = new Geometry();
        geom.setMesh(DebugShapeFactory.getDebugMesh(shape));
//        geom.setLocalScale(shape.getScale());
        geom.updateModelBound();
        return geom;
    }

    public static Mesh getDebugMesh(CollisionShape shape) {
        Mesh mesh = new Mesh();
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.