Examples of CellTransform


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

        }

        Quaternion rotate = new Quaternion();
        rotate.fromAngles(rotX, rotY, rotZ);

        return new CellTransform(rotate, translation);
    }
View Full Code Here

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

        target = viewCell;
        movableComponent = (MovableAvatarComponent) viewCell.getComponent(MovableComponent.class);
        worldManager = wm;

        // Set initial position and orientation from cell transform
        CellTransform worldTransform = viewCell.getWorldTransform();
        position = worldTransform.getTranslation(position);
        float[] angles = worldTransform.getRotation(null).toAngles(null);

        rotX = (float) Math.toDegrees(angles[0]);
        rotY = (float) Math.toDegrees(angles[1]);

//        System.out.println("********** "+angles[0]+", "+angles[1]+", "+angles[2]);
View Full Code Here

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

     */
    @Override
    public void commit(ProcessorArmingCollection collection) {
        if (state!=STOPPED || updateRotations) {
//            System.err.println("localMoveRequest "+position+"  "+this);
            movableComponent.localMoveRequest(new CellTransform(quaternion, position));
        }
    }
View Full Code Here

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

     * @return A CellTranform class representing the origin, rotation, scaling
     */
    public static CellTransform getCellTransform(PositionComponentServerState setup) {
       
        /* Create an return a new CellTransform class */
        return new CellTransform(setup.getRotation(), setup.getTranslation(), setup.getScaling().x);
    }
View Full Code Here

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

    /** Default constructor, used when cell is created via WFS */
    public ColladaCellMO() {
    }
   
    public ColladaCellMO(Vector3f center, float size, AssetURI modelURI, Vector3f geometryTranslation, Quaternion geometryRotation) {
        super(new BoundingBox(new Vector3f(), size, size, size), new CellTransform(null, center));
        this.modelURI = modelURI;
        this.geometryRotation = geometryRotation;
        this.geometryTranslation = geometryTranslation;
    }
View Full Code Here

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

    }

    @Override
    public void moveRequest(WonderlandClientID clientID, MovableMessage msg) {
        MovableAvatarMessage aMsg = (MovableAvatarMessage) msg;
        CellTransform transform = msg.getCellTransform();

        CellMO cell = cellRef.getForUpdate();
        ChannelComponentMO channelComponent;
        cell.setLocalTransform(transform);
View Full Code Here

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

                    public void commitEvent (Event event) {
                        if (event instanceof KeyEvent3D) {
                            KeyEvent key = (KeyEvent) ((KeyEvent3D)event).getAwtEvent();
                            if (key.getKeyCode()==KeyEvent.VK_EQUALS) {
                                zoom(cameraZoom);
                                viewMoved(new CellTransform(viewRot, viewTranslation));
                            } else if (key.getKeyCode()==KeyEvent.VK_MINUS) {
                                zoom(-cameraZoom);
                                viewMoved(new CellTransform(viewRot, viewTranslation));
                            }
                        } else if (event instanceof MouseEvent3D) {
                            MouseEvent mouse = (MouseEvent)((MouseEvent3D)event).getAwtEvent();
                            if (mouse instanceof MouseWheelEvent) {
                                int clicks = ((MouseWheelEvent)mouse).getWheelRotation();
                                zoom(-cameraZoom*clicks);
                                viewMoved(new CellTransform(viewRot, viewTranslation));
                            } else if (mouse.isControlDown()) {
                                int diffX = mouse.getX() - mouseX;
                                int diffY = mouse.getY() - mouseY;

                                float scale =  mouse.isShiftDown()? 4f : 16f;
View Full Code Here

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

                CellManagerMO.getCellManager().removeCellFromWorld(child);
            } else {
                oldParent.removeChild(child);
            }

            CellTransform childTransform = ((CellReparentMessage) editMessage).getChildCellTransform();
            if (childTransform != null)
                child.setLocalTransform(childTransform);

            if (newParent == null) {
                try {
View Full Code Here

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

                cameraListeners = new HashSet();
            }

            cameraListeners.add(cameraListener);

            cameraListener.cameraMoved(new CellTransform(cameraNode.getWorldRotation(), cameraNode.getWorldTranslation()));
        }
    }
View Full Code Here

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

     *
     * @return the transform of the camera (in world coordinates) for this view
     */
    public CellTransform getCameraTransform() {
        if (cameraNode != null) {
            return new CellTransform(cameraNode.getWorldRotation(), cameraNode.getWorldTranslation(), cameraNode.getWorldScale().x);
        }
        return new CellTransform(null, new Vector3f(0, 0, 0));
    }
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.