Package org.jdesktop.wonderland.common.cell

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


    public ConeOfSilenceCellMO() {
    }

    public ConeOfSilenceCellMO(Vector3f center, float size) {
  super(new BoundingSphere(size, center), new CellTransform(null, center));
    }
View Full Code Here


    public PhoneCellMO() {
    }

    public PhoneCellMO(Vector3f center, float size) {
        super(new BoundingBox(new Vector3f(), size, size, size),
                new CellTransform(null, center));
    }
View Full Code Here

                    win = lookupWindow(winSetUserDisplMsgArgs.wid);
                    if (win == null) {
                        AppXrw.logger.warning("WindowSetUserDispl: window doesn't exist: wid = " +
                                winSetUserDisplMsgArgs.wid);
                    } else {
                        CellTransform transform = new CellTransform(null, winSetUserDisplMsgArgs.userDispl);
                        win.setUserTransformCellLocal(transform);
                    }
                    break;
                }
View Full Code Here

    }

    // Apply any pending rotation delta to the given user transform.
    protected void userTransformApplyDeltaRotation (CellTransform userTransform) {
        if (deltaRotationToApply != null) {
            CellTransform transform = new CellTransform(null, null);
            transform.setRotation(deltaRotationToApply);
            userTransform.mul(transform);
            deltaRotationToApply = null;
        }
    }
View Full Code Here

            logger.fine("[PresenceManagerClient] view configured fpr " + cellID + " in " + pm);
        }
    }

    public Vector3f getCellPosition(CellID cellID) {
        CellTransform transform = getCellTransform(cellID);
        if (transform == null) {
            return null;
        }
       
        return transform.getTranslation(null);
    }
View Full Code Here

       
        return transform.getTranslation(null);
    }
   
    public Quaternion getCellRotation(CellID cellID) {
        CellTransform transform = getCellTransform(cellID);
        if (transform == null) {
            return null;
        }
       
        return transform.getRotation(null);
    }
View Full Code Here

       
        return transform.getRotation(null);
    }
   
    public Vector3f getCellScale(CellID cellID) {
        CellTransform transform = getCellTransform(cellID);
        if (transform == null) {
            return null;
        }
       
        return transform.getScaling(null);
    }
View Full Code Here

            rootNode.attachChild(box);
        }

        // Fetch the world translation for the root node of the cell and set
        // the translation for this entity root node
  CellTransform transform = cell.getWorldTransform();

        rootNode.setLocalTranslation(transform.getTranslation(null));
  rootNode.setLocalRotation(transform.getRotation(null));
        // OWL issue #61: make sure to take scale into account
        rootNode.setLocalScale(transform.getScaling(null));
       
        // Listen for changes to the cell's translation and apply the same
        // update to the root node of the bounds viewer. We also re-set the size
        // of the bounds: this handles the case where the bounds of the
        // scene graph has changed and we need to update the bounds viewer
        // accordingly.
        updateListener = new TransformChangeListener() {
            public void transformChanged(final Cell cell, ChangeSource source) {
                // We need to perform this work inside a proper updater, to
                // make sure we are MT thread safe
                final WorldManager wm = ClientContextJME.getWorldManager();
                RenderUpdater u = new RenderUpdater() {
                    public void update(Object obj) {
                        CellTransform transform = cell.getWorldTransform();
                        rootNode.setLocalTranslation(transform.getTranslation(null));
      rootNode.setLocalRotation(transform.getRotation(null));
                        rootNode.setLocalScale(transform.getScaling(null));
                        wm.addToUpdateList(rootNode);
                    }
                };
                wm.addRenderUpdater(u, this);
            }
View Full Code Here

    public static CellTransform getCellTransform(ServerSessionManager session,
            BoundingVolume bounds, CellTransform viewTransform) {

        Vector3f origin = getCellOrigin(session, bounds, viewTransform);
        Quaternion rotation = getCellRotation(viewTransform);
        return new CellTransform(rotation, origin);
    }
View Full Code Here

     *
     */
    public static CellTransform transform(CellTransform transform,
            CellTransform fromReferenceSystem, CellTransform toReferenceSystem) {

        CellTransform newTransform = toReferenceSystem.clone(null);
        newTransform.invert();
        newTransform.mul(fromReferenceSystem);
        newTransform.mul(transform);
        return newTransform;
    }
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.