Package com.ardor3d.scenegraph.shape

Examples of com.ardor3d.scenegraph.shape.Quad


        // setup some quads for debug viewing.
        final RenderPass renderPass = new RenderPass();
        final int quadSize = _canvas.getCanvasRenderer().getCamera().getWidth() / 10;
        _orthoQuad = new Quad[ParallelSplitShadowMapPass._MAX_SPLITS];
        for (int i = 0; i < ParallelSplitShadowMapPass._MAX_SPLITS; i++) {
            _orthoQuad[i] = new Quad("OrthoQuad", quadSize, quadSize);
            _orthoQuad[i].setTranslation(new Vector3((quadSize / 2 + 5) + (quadSize + 5) * i, (quadSize / 2 + 5), 1));
            _orthoQuad[i].getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
            _orthoQuad[i].getSceneHints().setLightCombineMode(LightCombineMode.Off);
            _orthoQuad[i].getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
            _orthoQuad[i].getSceneHints().setCullHint(CullHint.Never);
View Full Code Here


    private Spatial makeBillBoard() {
        final Node billboard = new Node("bb");
        billboard.getSceneHints().setRenderBucketType(RenderBucketType.Transparent);

        final Quad q1 = new Quad("font block", 150, 200);
        q1.setTranslation(0, 80, 0);
        q1.setModelBound(new BoundingBox());
        final CullState cs = new CullState();
        cs.setCullFace(CullState.Face.None);
        q1.setRenderState(cs);
        billboard.attachChild(q1);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("fonts/OkasaSansSerif-35-medium-regular_00.png",
View Full Code Here

            _shader.setUniform("resolution", new Vector2(cam.getWidth(), cam.getHeight()));
        } catch (final IOException ex) {
            ex.printStackTrace();
        }

        final Quad q = new Quad("fsq", cam.getWidth(), cam.getHeight());
        q.setRenderState(_shader);
        q.setTranslation(cam.getWidth() / 2, cam.getHeight() / 2, 0);
        q.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        _root.attachChild(q);
    }
View Full Code Here

        _pssmPass.getShadowOffsetState().setFactor(1.1f);
        _pssmPass.getShadowOffsetState().setUnits(4.0f);
        // _pssmPass.setDrawDebug(true);

        // TODO: backside lock test
        final Quad floor = new Quad("floor", 2048, 2048);
        floor.updateModelBound();
        floor.setRotation(new Quaternion().fromAngleAxis(MathUtils.HALF_PI, Vector3.UNIT_X));
        floor.setTranslation(1024, 0, 1024);
        terrainNode.attachChild(floor);

        _pssmPass.addBoundsReceiver(terrainNode);

        // Add objects that will get shadowed through overlay render
        _pssmPass.add(_root);

        // Add our occluders that will produce shadows
        _pssmPass.addOccluder(terrainNode);
        _pssmPass.addOccluder(_root);

        final int quadSize = _canvas.getCanvasRenderer().getCamera().getWidth() / 10;
        _orthoQuad = new Quad[ParallelSplitShadowMapPass._MAX_SPLITS];
        for (int i = 0; i < ParallelSplitShadowMapPass._MAX_SPLITS; i++) {
            _orthoQuad[i] = new Quad("OrthoQuad", quadSize, quadSize);
            _orthoQuad[i].setTranslation(new Vector3(quadSize / 2 + 5 + (quadSize + 5) * i, quadSize / 2 + 5, 1));
            _orthoQuad[i].setScale(1, -1, 1);
            _orthoQuad[i].getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
            _orthoQuad[i].getSceneHints().setLightCombineMode(LightCombineMode.Off);
            _orthoQuad[i].getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
View Full Code Here

        // setting to default value just to show
        waterNode.setWaterPlane(new Plane(new Vector3(0.0, 1.0, 0.0), 40.0));

        // Create a quad to use as geometry for the water.
        waterQuad = new Quad("waterQuad", 1, 1);
        // Hack the quad normals to point up in the y-axis. Since we are manipulating the vertices as
        // we move this is more convenient than rotating the quad.
        final FloatBuffer normBuf = waterQuad.getMeshData().getNormalBuffer();
        normBuf.clear();
        normBuf.put(0).put(1).put(0);
View Full Code Here

        debugQuadsNode = new Node("quadNode");
        debugQuadsNode.getSceneHints().setCullHint(CullHint.Never);

        final double quadSize = _canvas.getCanvasRenderer().getCamera().getWidth() / 10;

        Quad debugQuad = new Quad("reflectionQuad", quadSize, quadSize);
        debugQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        debugQuad.getSceneHints().setCullHint(CullHint.Never);
        debugQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        TextureState ts = new TextureState();
        ts.setTexture(waterNode.getTextureReflect());
        debugQuad.setRenderState(ts);
        debugQuad.setTranslation(quadSize * 0.6, quadSize * 1.0, 1.0);
        debugQuadsNode.attachChild(debugQuad);

        if (waterNode.getTextureRefract() != null) {
            debugQuad = new Quad("refractionQuad", quadSize, quadSize);
            debugQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
            debugQuad.getSceneHints().setCullHint(CullHint.Never);
            debugQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
            ts = new TextureState();
            ts.setTexture(waterNode.getTextureRefract());
            debugQuad.setRenderState(ts);
            debugQuad.setTranslation(quadSize * 0.6, quadSize * 2.1, 1.0);
            debugQuadsNode.attachChild(debugQuad);
        }
    }
View Full Code Here

    @Override
    protected void initExample() {
        _canvas.setTitle("TexCombine Example");

        final Quad quad = new Quad("Box", 4, 4);
        quad.setModelBound(new BoundingBox());
        quad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        _root.attachChild(quad);

        final Texture ardorLogo = TextureManager.load("images/ardor3d_white_256.jpg",
                Texture.MinificationFilter.Trilinear, true);
        addTexture(ardorLogo, 0, blend);
        quad.setRenderState(ts);
    }
View Full Code Here

        final Torus torus = new Torus("Torus", 50, 50, 10, 25);
        torus.updateModelBound();
        torus.setRenderState(ts);

        final Quad quad = new Quad("Quad");
        quad.resize(150, 120);
        quad.updateModelBound();
        quad.setRenderState(bgts);

        final Teapot teapot = new Teapot();
        teapot.setScale(20);
        teapot.updateModelBound();
        teapot.setRandomColors();
View Full Code Here

            textureState = new TextureState();
            textureState.setEnabled(true);

            setupTextures();

            fullScreenQuad = new Quad("FullScreenQuad", cam.getWidth() / 4, cam.getHeight() / 4);
            fullScreenQuad.setTranslation(cam.getWidth() / 2, cam.getHeight() / 2, 0);
            fullScreenQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
            fullScreenQuad.getSceneHints().setCullHint(CullHint.Never);
            fullScreenQuad.getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
            fullScreenQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
View Full Code Here

        } catch (final IOException ex) {
            logger.logp(Level.SEVERE, getClass().getName(), "init(Renderer)", "Could not load shaders.", ex);
        }

        // Create fullscreen quad
        fullScreenQuad = new Quad("FullScreenQuad", cam.getWidth() / 4, cam.getHeight() / 4);
        fullScreenQuad.setTranslation(cam.getWidth() / 2, cam.getHeight() / 2, 0);
        fullScreenQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);

        fullScreenQuad.getSceneHints().setCullHint(CullHint.Never);
        fullScreenQuad.getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
View Full Code Here

TOP

Related Classes of com.ardor3d.scenegraph.shape.Quad

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.