Package org.jdesktop.wonderland.common.cell

Examples of org.jdesktop.wonderland.common.cell.CellTransform


            if (info == null) {
                LOGGER.warning("no PresenceInfo for " + username);
                return;
            }

            CellTransform desiredTransform = generateGoToPosition(info.getCellID());

           
            // attach cover screen
            String prop = System.getProperty("UserList.CoverScreen");
            if(prop == null) {
                prop="";
            }
            if(!prop.equalsIgnoreCase("off")) {
                //if(coverScreenListener==null) {
                    if(!(ClientContextJME.getViewManager()
                        .getPrimaryViewCell().getWorldTransform().getTranslation(null).x==desiredTransform.getTranslation(null).x &&
                        ClientContextJME.getViewManager()
                        .getPrimaryViewCell().getWorldTransform().getTranslation(null).z==desiredTransform.getTranslation(null).z)) {

                        CoverScreenData csd = new CoverScreenData();
                        GoToCoverScreenInfo info1 = getGoToCoverScreenInfo();
                        if(info1!=null) {
                            csd.setBackgroundColor(info1.getBackgroundColor());
                            csd.setImageURL(info1.getImageURL());
                            csd.setMessage(info1.getMessage());
                            csd.setTextColor(info1.getTextColor());
                        }
                        //cell status change listener for removing cover screen
                        new CoverScreenListener(desiredTransform.getTranslation(null),csd);
                    }
                //}
            }
           
            // get the current look direction of the avatar

            // go to the new location
            try {
                ClientContextJME.getClientMain().gotoLocation(null,
                        desiredTransform.getTranslation(null),
                        desiredTransform.getRotation(null));
            } catch (IOException ioe) {
                LOGGER.log(Level.WARNING, "Error going to location", ioe);
            }
        }
    }
View Full Code Here


    }
   
   
    private CellTransform generateGoToPosition(CellID cellID) {

        CellTransform viewTransform = model.getCellTransformForCellID(cellID);
       
        ServerSessionManager manager = LoginManager.getPrimary();
        BoundingVolume boundsHint = new BoundingSphere(1.0f, Vector3f.ZERO);
            CellTransform generated = CellPlacementUtils.getCellTransform(manager, boundsHint,
                    viewTransform);
        LOGGER.fine("ORIGINAL:\n" + logTransform(viewTransform) + "\n"
                + "GENERATED:\n" + logTransform(generated));

        return generated;
View Full Code Here

        // unfortunately, we don't know the pixel scale at this point so, out of
        // desparation, we choose the default value of 0.01 meters per pixel.
        // This gives values of approx. A radius of 10 x 10 for the local width and height
        // of the bounds. 5 meters (in front) should be reasonable for the depth because the
        // step per window stack level is only 0.01 meter and the stack never gets too large.
        super(new BoundingBox(new Vector3f(), 10, 10, 5), new CellTransform(null, null));
    }
View Full Code Here

     * @param rotation
     */
    public void localMoveRequest(Vector3f location, Quaternion rotation) {
//        System.out.println("********************** LocalAvatar.localMoveRequest");
        if (viewCell!=null) {
            viewCell.localMoveRequest(new CellTransform(rotation, location));
        }
    }
View Full Code Here

                , ColorRGBA.black, ColorRGBA.white, "", "Teleporting. Please Wait...");
        PlacemarkRegistrySrvFactory.getInstance().unregisterPlacemark(pm);
    }

    protected Placemark toPlacemark(String placemarkName) {
        CellTransform xform = cellRef.get().getWorldTransform(null);
        if (xform == null) {
            // the position of the cell has not been set.  We will be notified
            // later with a move message when the position is set, so we can
            // just return here.
            return null;
        }
  
        // get the cell's transform
        Vector3f trans = xform.getTranslation(null);
        // get the cell's rotation about each axis
        Quaternion rot = xform.getRotation(null);
        float[] angles = new float[3];
        rot.toAngles(angles);

        // get the relative offset (in Quaternions)
        float angle = 0;
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.CellTransform

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.