Package org.jdesktop.wonderland.server.spatial.impl

Examples of org.jdesktop.wonderland.server.spatial.impl.SpatialCell


                    revalidateList.add(e.getKey());

                    // schedule adding the listener
                    scheduleChange(new Change(e.getKey(), null, null) {
                        public void run() {
                            SpatialCell cell = universe.getSpatialCell(cellID);
                            if (cell == null) {
                                // the cell no longer exists.
                                return;
                            }

                            logger.log(Level.INFO, "Restoring listener " +
                                       record.get() + " type " + e.getValue());

                            if (e.getValue() == ListenerRecord.Type.TRANSFORM ||
                                e.getValue() == ListenerRecord.Type.BOTH)
                            {
                                universe.addTransformChangeListener(cellID, (TransformChangeListenerSrv) record.get());
                            }

                            if (e.getValue() == ListenerRecord.Type.VIEW ||
                                e.getValue() == ListenerRecord.Type.BOTH)
                            {
                                universe.addViewUpdateListener(cellID, (ViewUpdateListener) record.get());
                            }
                        }
                    });
                }
            }

            // now schedule a change to revalidate each cell ID we added, so
            // the transform is up to date
            for (CellID cellID : revalidateList) {
                scheduleChange(new Change(cellID, null, null) {
                    public void run() {
                        SpatialCell cell = universe.getSpatialCell(cellID);
                        if (cell != null) {
                            cell.revalidateListeners(taskOwner);
                        }
                    }
                });
            }
        }
View Full Code Here


        final Identity identity = txnProxy.getCurrentOwner();
        final BigInteger dsID = AppContext.getDataManager().createReference(cellMO).getId();

        scheduleChange(new Change(cellMO.getCellID(), cellMO.getLocalBounds(), cellMO.getLocalTransform(null)) {
            public void run() {
                SpatialCell sc = universe.createSpatialCell(cellID, dsID, cellClazz);
                sc.setLocalBounds(localBounds);
                sc.setLocalTransform(localTransform, identity);
            }
        });

        if (notify) {
            // notify listeners
View Full Code Here

        final Identity identity = txnProxy.getCurrentOwner();
        scheduleChange(new Change(parent.getCellID(), child.getCellID()) {
            public void run() {
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, "RUN addChild");
                SpatialCell parent = universe.getSpatialCell(cellID);
                parent.addChild(universe.getSpatialCell(childCellID), identity);
            }
        });

    }
View Full Code Here

    public void removeChild(CellMO parent, CellMO child) {
        scheduleChange(new Change(parent.getCellID(), child.getCellID()) {
            public void run() {
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, "RUN removeChild "+cellID+"  "+childCellID);
                SpatialCell parent = universe.getSpatialCell(cellID);
                parent.removeChild(universe.getSpatialCell(childCellID));
            }
        });
    }
View Full Code Here

        }
         */

        scheduleChange(new Change(cellMO.getCellID(), null, localTransform) {
            public void run() {
                SpatialCell sc = universe.getSpatialCell(cellID);
                if (sc == null) {
                    logger.log(Level.WARNING, "Cell " + cellID + " not found!");
                } else {
                    sc.setLocalTransform(localTransform, identity);
                }
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.server.spatial.impl.SpatialCell

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.