Examples of updateModelBound()


Examples of com.jme.scene.TriMesh.updateModelBound()

              null, null,BufferUtils.createIntBuffer(indexes));
     
     
     
      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());
View Full Code Here

Examples of com.jme.scene.lod.AreaClodMesh.updateModelBound()

            }
            else if ( child instanceof TriMesh ) {
                // Create an AreaClodMesh for that mesh.  Let it compute records automatically
                AreaClodMesh acm = new AreaClodMesh("part"+i,(TriMesh)child, null);
                acm.setModelBound(new BoundingSphere());
                acm.updateModelBound();

                // Allow 1/2 of a triangle in every pixel on the screen in the bounds.
                acm.setTrisPerPixel(.5f);

                // Force a move of 2 units before updating the mesh geometry
View Full Code Here

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

        // Set the bounds on the arrows and update them
        a1.setModelBound(new BoundingSphere());
        a1.updateModelBound();
        a2.setModelBound(new BoundingSphere());
        a2.updateModelBound();

        return n;
    }

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

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

            //? Mesh orientation in ortogonal vector not clear
            Vector3f v=md.getDirection();
            if (v.x==0) v.x=0.0001f;

            a.rotateUpTo(v);
            a.updateModelBound();
            i++;
            rootNode.attachChild(a);
            driveMeshes.add(a);
        }
    }
View Full Code Here

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

    box = new Box( "box5", new Vector3f( -50, -2, -50 ), new Vector3f( 50, 2, 50 ) );
    box.setLocalTranslation( new Vector3f( 0, -15, 0 ) );
    box.setRenderState( ts );
    box.setModelBound( new BoundingBox() );
    box.updateModelBound();
    objects.attachChild( box );

    return objects;
  }
View Full Code Here

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

    box = new Box( "box5", new Vector3f( -50, -2, -50 ), new Vector3f( 50, 2, 50 ) );
    box.setLocalTranslation( new Vector3f( 0, -15, 0 ) );
    box.setRenderState( ts );
    box.setModelBound( new BoundingBox() );
    box.updateModelBound();
    objects.attachChild( box );

    return objects;
  }
View Full Code Here

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

      Box box = new Box("position"+t, new Vector3f(-.5f, -.5f, -.5f), new Vector3f(.5f, .5f, .5f));
      box.setLocalTranslation(new Vector3f(xe, Yb, ze));
      box.setLocalScale(3f);
    box.setDefaultColor(ColorRGBA.red);
    box.setModelBound(new BoundingBox());
    box.updateModelBound();
   
    // 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.
View Full Code Here

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

      Box box = new Box("position"+t, new Vector3f(-.5f, -.5f, -.5f), new Vector3f(.5f, .5f, .5f));
      box.setLocalTranslation(new Vector3f(xe, Yb, ze));
      box.setLocalScale(3f);
    box.setDefaultColor(ColorRGBA.red);
    box.setModelBound(new BoundingBox());
    box.updateModelBound();
   
    // 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.
View Full Code Here

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

        cullState.setCullFace(CullState.Face.Back);
        sphereNode.setRenderState(cullState);

        // Set the bound so this node can be pickable
        sphere.setModelBound(new BoundingSphere());
        sphere.updateModelBound();
        return sphereNode;
    }

    /**
     * Adds a drag listener to each resize handle, given the Entity and Node
View Full Code Here

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

    }

    private void attachOuterOrb(Entity entity) {
        final Sphere outerOrb = new Sphere("Outer Orb", 16, 16, OUTER_RADIUS);
        outerOrb.setModelBound(new BoundingSphere());
        outerOrb.updateModelBound();
        ColorRGBA orbColour = new ColorRGBA(0f, 0f, 1f, 0.2f);
        MaterialState matState = (MaterialState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(StateType.Material);
        matState.setDiffuse(orbColour);
        outerOrb.setRenderState(matState);
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.