Package com.jme.scene

Examples of com.jme.scene.Node


//            String u = avatarConfigURL.getFile();
//            username = u.substring(u.lastIndexOf('/') + 1, u.lastIndexOf('.'));
//        }

        // Sets the Z-buffer state on the external kids root
        Node external = ret.getJScene().getExternalKidsRoot();
        setZBufferState(external);

        // JSCENE HAS NOT CHILDREN, so this does nothing
//        ret.getJScene().updateGeometricState(0, true);
//        GraphicsUtils.printGraphBounds(ret.getJScene());
View Full Code Here


            Geometry g = (Geometry)s;
            g.lockBounds();
            //System.out.println("Bounds for " + g + " is : " + g.getWorldBound());
        }
        if (s instanceof Node) {
            Node n = (Node)s;
            //n.setModelBound(new BoundingSphere());
            for (int i=0; i<n.getQuantity(); i++) {
                traverseGraph(n.getChild(i), level+1);
            }
            //n.updateWorldBound();
            //System.out.println("Bounds for " + n + " is : " + n.getWorldBound());
        }
View Full Code Here

     
     
      mesh.setModelBound(new BoundingBox());
      mesh.updateModelBound();
     
      tankNode = new Node("TankNode");
      tankTurret = new Node("tankTurret");
        tankTurretBarrel = new Cylinder("tankTurretBarrel", 16, 16, .1f, BARREL_LENGTH );
        tankTurretBarrel.setModelBound(new BoundingBox());
        tankTurretBarrel.updateModelBound();

        tankTurretBarrel.setLocalTranslation(barrelPosition);
View Full Code Here

   
    // Create a node for the missle trajectory.  This makes it possible to apply
    // a light state to the bullets.  Now that I think of it, this could probably
    // be removed by applying the LightState to the rootNode... but I don't really
    // know... too tired to try.
    Node missleTrajectory2 = new Node("missleTrajectory");
      missleTrajectory2.attachChild(box);
     
      // Don't know what this is doing really.... see comments below
        LightState ls = display.getRenderer().createLightState();
        ls.setEnabled(false);
        missleTrajectory2.setRenderState(ls);
        missleTrajectory2.updateRenderState();
       
        //  Add the controller class to the box. Notice, I am passing the
        //  missleTrajectory2 node to the BulletMover class.  This is so the
        //  bullet can be removed from the rootNode when it times out.  If
        //  I could remove the missleTrajectory2 junk, I could make it a lot simpler.
View Full Code Here

     
     
      mesh.setModelBound(new BoundingBox());
      mesh.updateModelBound();
     
      tankNode = new Node("TankNode");
      tankTurret = new Node("tankTurret");
        tankTurretBarrel = new Cylinder("tankTurretBarrel", 16, 16, .1f, BARREL_LENGTH );
        tankTurretBarrel.setModelBound(new BoundingBox());
        tankTurretBarrel.updateModelBound();

        tankTurretBarrel.setLocalTranslation(barrelPosition);
View Full Code Here

   
    // Create a node for the missle trajectory.  This makes it possible to apply
    // a light state to the bullets.  Now that I think of it, this could probably
    // be removed by applying the LightState to the getRootNode()... but I don't really
    // know... too tired to try.
    Node missleTrajectory2 = new Node("missleTrajectory");
      missleTrajectory2.attachChild(box);
     
      // Don't know what this is doing really.... see comments below
        LightState ls = getRenderer().createLightState();
        ls.setEnabled(false);
        missleTrajectory2.setRenderState(ls);
        missleTrajectory2.updateRenderState();
       
        //  Add the controller class to the box. Notice, I am passing the
        //  missleTrajectory2 node to the BulletMover class.  This is so the
        //  bullet can be removed from the getRootNode() when it times out.  If
        //  I could remove the missleTrajectory2 junk, I could make it a lot simpler.
View Full Code Here

    private void initializeTerrainNodeIfNeeded()
    {
        if ( myTerrainNode == null )
        {
            myTerrainNode = new Node();

            update3DModel();

            myCanvas3D.set3DNode( myTerrainNode );
        }
View Full Code Here

    public Spatial getSpatial()
    {
        if ( myTerrain3DNode == null )
        {
            myTerrain3DNode = new Node();

            if ( myQuadTreeNode.isExpanded() )
            {
                attachChildNodeSpatials();
            }
View Full Code Here

TOP

Related Classes of com.jme.scene.Node

Copyright © 2018 www.massapicom. 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.