Examples of BoundingSphere


Examples of com.jme.bounding.BoundingSphere

            transform = CellPlacementUtils.getCellTransform(manager, boundsHint,
                    viewTransform);
        }
        else if (hint == null) {
            // Case (2): Do the optimal placement using the default radius.
            BoundingVolume boundsHint = new BoundingSphere(DEFAULT_RADIUS, Vector3f.ZERO);
            transform = CellPlacementUtils.getCellTransform(manager, boundsHint,
                    viewTransform);
        }
        else if (hint != null && hint.isDoSystemPlacement() == false) {
            // Case (3): The Cell will take care of its own placement, use
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    public OrbCellMO(Vector3f center, float size, String username,
      String callID, boolean simulateCalls, VirtualPlayer vp,
      String[] bystanders) {

  super(new BoundingSphere(size, center), new CellTransform(null, center));

  this.username = username;
        this.callID = callID;
        this.simulateCalls = simulateCalls;
  this.vp = vp;
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

    }

    private void attachInnerOrb(Entity entity) {
        innerOrbNode = new Node("Inner orb node");
        innerOrb = new Sphere("Inner Orb", 8, 8, INNER_RADIUS);
        innerOrb.setModelBound(new BoundingSphere());
        innerOrb.updateModelBound();
        innerOrb.setRenderState(DEFAULT_MATERIALSTATE);
        innerOrb.setRenderState(DEFAULT_SHADESTATE);

        innerOrbNode.attachChild(innerOrb);
View Full Code Here

Examples of com.jme.bounding.BoundingSphere

        orbNode.attachChild(innerOrbNode);
    }

    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

Examples of com.jme3.bounding.BoundingSphere

            Spatial spatial = assetManager.loadModel(obj);
            //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 javax.media.j3d.BoundingSphere

        // TODO use light factories

        AmbientLight alight = new AmbientLight(true,new Color3f(0.5f,0.5f,0.5f));
        alight.setEnable(true);
        rootGroup.addChild(alight);
        BoundingSphere bounds = new BoundingSphere (new Point3d (0, 0.0, 0), 1E100);
        alight.setInfluencingBounds(bounds);

        lights = new DirectionalLight[1];

        for (int i=0; i<lights.length; ++i) {
View Full Code Here

Examples of javax.media.j3d.BoundingSphere

        // TODO use light factories

        AmbientLight alight = new AmbientLight(true,new Color3f(0.5f,0.5f,0.5f));
        alight.setEnable(true);
        rootGroup.addChild(alight);
        BoundingSphere bounds = new BoundingSphere (new Point3d (0, 0.0, 0), 1E100);
        alight.setInfluencingBounds(bounds);

        lights = new DirectionalLight[1];

        for (int i=0; i<lights.length; ++i) {
View Full Code Here

Examples of javax.media.j3d.BoundingSphere

        TransformGroup objTrans = new TransformGroup();
        Transform3D t3dTrans = new Transform3D();
        objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
        objTrans.setTransform(t3dTrans);
        objRoot.addChild(objTrans);
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
                100.0);
        // Set up the ambient light
        Color3f ambientColor = new Color3f(0.3f, 0.3f, 0.3f);
        AmbientLight ambientLightNode = new AmbientLight(ambientColor);
        ambientLightNode.setInfluencingBounds(bounds);
View Full Code Here

Examples of javax.media.j3d.BoundingSphere

        }
        if (res instanceof BoundingSphere) {
            return (float)((BoundingSphere)res).getRadius();
        }
        // else, include this bounds object in a bounding sphere and get radius
        BoundingSphere bs=new BoundingSphere(res);
        return (float)bs.getRadius();
    }
View Full Code Here

Examples of javax.media.j3d.BoundingSphere

    // Create a universe bound to no canvas 3D
    ViewingPlatform viewingPlatform = new ViewingPlatform();
    // Add an interpolator to view transform to get smooth transition
    TransformGroup viewPlatformTransform = viewingPlatform.getViewPlatformTransform();
    CameraInterpolator cameraInterpolator = new CameraInterpolator(viewPlatformTransform);
    cameraInterpolator.setSchedulingBounds(new BoundingSphere(new Point3d(), 1E7));
    viewPlatformTransform.addChild(cameraInterpolator);
    viewPlatformTransform.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
   
    Viewer viewer = new Viewer(new Canvas3D [0]);
    SimpleUniverse universe = new SimpleUniverse(viewingPlatform, viewer);
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.