Examples of BoundingVolumeHint


Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

            BoundingVolume modelBounds = importedModel.getModelBG().getWorldBound();
            float scale = scaleBounds(modelBounds);
            modelBounds = modelBounds.transform(new Quaternion(), Vector3f.ZERO,
                                                new Vector3f(scale, scale, scale));
           
            cellSetup.setBoundingVolumeHint(new BoundingVolumeHint(false, modelBounds));
            deployedModel.setModelBounds(modelBounds);

            Vector3f offset = importedModel.getRootBG().getLocalTranslation();
            PositionComponentServerState position = new PositionComponentServerState();
            Vector3f boundsCenter = modelBounds.getCenter();
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

    public <T extends CellServerState> T getDefaultCellServerState(
            Properties props) {

        ModelCellServerState cellState = new ModelCellServerState();
        cellState.setBoundingVolumeHint(new BoundingVolumeHint(true,
                new BoundingBox(Vector3f.ZERO,
                                1.44526004f,
                                1.44525876f,
                                0.13593452f)));
       
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

            LOGGER.log(Level.WARNING, "Unable to load deployed model from " +
                    url.toExternalForm(), excp);
            return null;
        }

        BoundingVolumeHint hint=null;
        PositionComponentServerState posComp = new PositionComponentServerState();

        if (dm.getModelBounds()==null) {
            // Legacy support, the DeployedModels object for new builds contains
            // the model bounds.
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

            BoundingSphere sphere = (BoundingSphere) bounds;
            if (sphere.radius > 20) {
                hint = new BoundingBox(Vector3f.ZERO, 1, sphere.radius, 1);
            }
        }
        return new BoundingVolumeHint(true, hint);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

        //cellServerState.setRotation(new Rotation(axis, (float) Math.PI / 4));

  BoundingBox box = new BoundingBox(
      new Vector3f(0, 0, 0), 0.27053905F, 0.060000006F, 0.27053908F);

  BoundingVolumeHint hint = new BoundingVolumeHint(true, box);
  cellServerState.setBoundingVolumeHint(hint);
 
        Logger.getLogger(PhoneCellFactory.class.getName()).warning(
                "New Virtual Phone!!!!");
        return (T) cellServerState;
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

        // (2) There is no hint, so use the default bounds radius and do the
        // optimal layout
        //
        // (3) There is a hint that says do not do the optimal layout, so we
        // will just put the Cell right on top of the avatar.
        BoundingVolumeHint hint = state.getBoundingVolumeHint();

        logger.info("Using bounding volume hint " + hint.getBoundsHint() +
                ", do placement=" + hint.isDoSystemPlacement());
       
        if (hint != null && hint.isDoSystemPlacement() == true) {
            // Case (1): We have a bounds hint and we want to do the layout,
            // so we find the distance away from the avatar and also the height
            // above the ground.
            BoundingVolume boundsHint = hint.getBoundsHint();
            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
            // the origin of the avatar as the initial placement.
           
            // Issue 998: make sure this is actually the current location of
            // the avatar, and not the origin.  This guarantees that the
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

            // (see the comment in App2DCellMO()). We won't know the right location to
            // place an app cell until it's first window is made visible. Therefore,
            // we disable system placement and will perform the initial placement ourselves
            // later.
            logger.info("doAppInitialPlacement: disable system placement");
            BoundingVolumeHint hint = new BoundingVolumeHint(false, null);
            serverState.setBoundingVolumeHint(hint);
        }

        return (T) serverState;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

        // place an app cell until it's first window is made visible. Therefore,
        // we disable system placement to save work. The app base will perform the
        // the initial placement later.
        if (App2D.doAppInitialPlacement) {
            logger.info("doAppInitialPlacement: disable system placement");
            BoundingVolumeHint hint = new BoundingVolumeHint(false, null);
            state.setBoundingVolumeHint(hint);
        }
    }
View Full Code Here

Examples of org.jdesktop.wonderland.common.cell.state.BoundingVolumeHint

  cellServerState.setName("ConeOfSilence");

        // Give the hint for the bounding volume for initial Cell placement
        BoundingBox box = new BoundingBox(new Vector3f(), 2f, 0f, 2f);
     
  BoundingVolumeHint hint = new BoundingVolumeHint(true, box);
  cellServerState.setBoundingVolumeHint(hint);

        return (T) cellServerState;
    }
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.