Package org.jdesktop.mtgame

Examples of org.jdesktop.mtgame.RenderUpdater


    public void update() throws InstantiationException {
        super.update();

        updateTexture();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                if (localToCellNode != null) {
                    // Update position relative to view
                    localToCellNode.setLocalTranslation(new Vector3f(x, y, Z_OFFSET));
                    ClientContextJME.getWorldManager().addToUpdateList(localToCellNode);
View Full Code Here


     */
    @Override
    public void update() throws InstantiationException {
        updateLayout();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                if (quad != null) {
                    quad.resize(width, height);
                    quad.updateModelBound();
                    ClientContextJME.getWorldManager().addToUpdateList(localToCellNode);
View Full Code Here

        Image image = getWindow().getTexture().getImage();
        final float widthRatio = (float)width / image.getWidth();
        final float heightRatio = (float)height / image.getHeight();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                geometryNode.setLocalTranslation(trans);
                geometryNode.setSize(width3D, height3D);
                geometryNode.setTexCoords(widthRatio, heightRatio);
                ClientContextJME.getWorldManager().addToUpdateList(viewNode);
View Full Code Here

    // Note: this method doesn't need to be synchronized because it does everything via a
    // synchronous render updater
    private void sgProcessChanges () {
        if (sgChanges.size() <= 0) return;

         ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
             public void update(Object arg0) {

                 for (SGChange sgChange : sgChanges) {
                     switch (sgChange.getOp()) {
View Full Code Here

        if (inRenderLoop) {
            // We're already in the render loop
            ts.load();
        } else {
            // Not in render loop. Must do this inside the render loop.
            ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
                public void update(Object arg0) {
                    // The JME magic - must be called from within the render loop
                    ts.load();
                }
           }, null, true)// Note: a rare case in which we must wait for the render updater to complete
View Full Code Here

     */
    @Override
    public synchronized void update() throws InstantiationException {
        updateLayout();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                if (quad != null) {
                    quad.resize(width, height);
                    quad.updateModelBound();
                    ClientContextJME.getWorldManager().addToUpdateList(localToCellNode);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public synchronized void setColor(final ColorRGBA color) {
        if (quad != null) {
            ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
                public void update(Object arg0) {
                    if (quad != null) {
                        MaterialState ms = (MaterialState) quad.getRenderState(RenderState.RS_MATERIAL);
                        if (ms == null) {
                            ms = DisplaySystem.getDisplaySystem().getRenderer().createMaterialState();
View Full Code Here

        rc.setEntity(entity);

        // Attach the subclass spatials to the localToCell node
        final Spatial[] spatials = getSpatials();
        if (spatials != null) {
            ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
                public void update(Object arg0) {
                    if (localToCellNode != null) {
                        for (Spatial spatial : spatials) {
                            localToCellNode.attachChild(spatial);
                        }
View Full Code Here

     * Sets the localToCell translation of this component.
     *
     * @param trans The translation vector.
     */
    public void setLocalTranslation(final Vector3f trans) {
        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                if (localToCellNode != null) {
                    setLocalTranslationNoUpdater(trans);
                    ClientContextJME.getWorldManager().addToUpdateList(localToCellNode);
                }
View Full Code Here

        nodeZTrans = new Node("Node Z Trans for View " + view);

        final Spatial[] spatials = getSpatials();

        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                for (int i = 0; i < spatials.length; i++) {
                    nodeZTrans.attachChild(spatials[i]);
                }
                nodeZTrans.setLocalTranslation(new Vector3f(0f, 0f, 0.001f));
View Full Code Here

TOP

Related Classes of org.jdesktop.mtgame.RenderUpdater

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.