Package org.jdesktop.wonderland.client.jme

Examples of org.jdesktop.wonderland.client.jme.ViewManager


    @Override
    protected void setStatus(CellStatus status, boolean increasing) {
        synchronized(listenerRecords) {
            super.setStatus(status, increasing);

            ViewManager vm = ClientContextJME.getViewManager();

            switch(status) {
                case ACTIVE :
                    if (increasing) {
                        CellTransform worldTransform = cell.getWorldTransform();
                        for(ProximityListenerRecord l : listenerRecords)
                            l.updateWorldBounds(worldTransform);

                        vm.addViewManagerListener(this);
                        primaryViewCellChanged(null, vm.getPrimaryViewCell());

                        cell.addTransformChangeListener(cellTransformListener);
                    }
                    break;
                case DISK :
                    if (viewTransformListener!=null) {
                        vm.removeViewManagerListener(this);
                        primaryViewCellChanged(vm.getPrimaryViewCell(), null);

                        cell.removeTransformChangeListener(cellTransformListener);
                    }
                   
                    synchronized (listenerRecords) {
                        for (ProximityListenerRecord rec : listenerRecords) {
                            rec.cleanup(vm.getPrimaryViewCell().getCellID());
                        }
                        listenerRecords.clear();
                    }
                    break;
            }
View Full Code Here


     * Returns a Placemark that represents the current position of the avatar.
     */
    private Placemark getCurrentPlacemark(ServerSessionManager sessionManager) {
        // Fetch the current translation of the avatar and the (x, y, z) of its
        // position
        ViewManager manager = ViewManager.getViewManager();
        ViewCell viewCell = manager.getPrimaryViewCell();
        CellTransform viewTransform = viewCell.getWorldTransform();
        Vector3f location = viewTransform.getTranslation(null);
        float x = location.x;
        float y = location.y;
        float z = location.z;
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.jme.ViewManager

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.