Package org.jdesktop.wonderland.client.jme.utils.traverser

Examples of org.jdesktop.wonderland.client.jme.utils.traverser.ProcessNodeInterface


        final Transparency newTrans = Transparency.get(newTM);

        // make the change on the render thread
        ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {
            public void update(Object arg0) {
                TreeScan.findNode((Spatial) arg0, new ProcessNodeInterface() {
                    public boolean processNode(Spatial node) {
                        // stop if we cross an entity barier
                        if (node instanceof AttachPointNode) {
                            return false;
                        }
View Full Code Here


        RenderComponent rc = entity.getComponent(RenderComponent.class);
        if (rc!=null) {
            ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {

                public void update(Object arg0) {
                    TreeScan.findNode((Spatial) arg0, new ProcessNodeInterface() {
                        public boolean processNode(Spatial node) {
                            if (node instanceof Geometry) {
                                ((Geometry)node).clearBuffers();
                                TextureState ts = (TextureState) node.getRenderState(RenderState.RS_TEXTURE);
                                // deleteAll is too aggressive, it deletes other copies of the same texture
View Full Code Here

            final CullState.Face face = backfaceCullingEnabled ? CullState.Face.Back : CullState.Face.None;
            if (rc!=null && rc.getSceneRoot()!=null) {
                ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() {

                    public void update(Object arg0) {
                        TreeScan.findNode(rc.getSceneRoot(), new ProcessNodeInterface() {
                            public boolean processNode(Spatial node) {
                                CullState cs = (CullState) node.getRenderState(RenderState.RS_CULL);
                                if (cs==null) {
                                    cs = (CullState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_CULL);
                                    node.setRenderState(cs);
View Full Code Here

        final NewInteractionComponent hc = cell.getComponent(NewInteractionComponent.class);
        if (hc != null && hc.isHighlightEnable()) {
            if (rc == null) {
                return;
            }
            TreeScan.findNode(rc.getSceneRoot(), Geometry.class, new ProcessNodeInterface() {
                public boolean processNode(final Spatial s) {
                    s.setGlowEnabled(highlight);
                    float comps[] = hc.getHighlightColor().getColorComponents(null);
                    ColorRGBA newcolor = new ColorRGBA((float) comps[0],
                            (float) comps[1],
View Full Code Here

    /**
     * Traverse the graph and set the geometric bounds on all tri mesh
     * @param node
     */
    protected void setupBounds(Node node) {
        TreeScan.findNode(node, new ProcessNodeInterface() {

            public boolean processNode(Spatial node) {
                if (node instanceof Geometry) {
                    if (node.getWorldBound()==null) {
                        node.setModelBound(new BoundingBox());
View Full Code Here

        }

        final String texturePath = texturePrefixTF.getText();
        final HashSet<String> textureSet = new HashSet();

        TreeScan.findNode(bg, Geometry.class, new ProcessNodeInterface() {

            public boolean processNode(Spatial node) {
                TextureState ts =
                        (TextureState) node.getRenderState(
                        TextureState.RS_TEXTURE);
View Full Code Here

     *
     * @param rootNode root of graph
     * @param nodeMap the HashMap to which nodes are added
     */
    public static void getNamedNodes(Node rootNode, final HashMap<String, Spatial> nodeMap) {
        TreeScan.findNode(rootNode, new ProcessNodeInterface() {

            public boolean processNode(Spatial node) {
                if (node.getName()!=null) {
                    Spatial old = nodeMap.put(node.getName(), node);
                    if (old!=null)
View Full Code Here

        writeDefaultsConfig();
    }

    void findTextures(Node root) {
        TreeScan.findNode(root, new ProcessNodeInterface() {

            public boolean processNode(Spatial node) {
                TextureState ts =
                        (TextureState) node.getRenderState(
                        TextureState.RS_TEXTURE);
View Full Code Here

    /**
     * Traverse the graph, printing the world bounds of each node
     * @param roo
     */
    public static void printGraphBounds(Node root) {
        TreeScan.findNode(root, new ProcessNodeInterface() {
            public boolean processNode(Spatial node) {
                System.err.println(node+"  "+node.getWorldBound()+"  "+node.getWorldScale());
                return true;
            }

View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.jme.utils.traverser.ProcessNodeInterface

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.