Package com.ardor3d.scenegraph.shape

Examples of com.ardor3d.scenegraph.shape.Quad


        // setting to default value just to show
        this.waterHeight = waterHeight;
        setWaterPlane(new Plane(new Vector3(0.0, 1.0, 0.0), waterHeight));

        // 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


public class BillboardTree extends BillboardNode {

    public BillboardTree(Vector3 position, double width, double height) {
        super ("Tree");
        setAlignment(BillboardAlignment.AxialY);
        final Quad quad = new Quad("Quad", width, height);
        attachChild(quad);
        setTranslation(position.getX(),position.getY()+height/2.0,position.getZ());
    }
View Full Code Here

        // Skybox consists of 6 sides
        _skyboxQuads = new Quad[6];

        // Create each of the quads
        _skyboxQuads[Face.North.ordinal()] = new Quad("north", _xExtent * 2, _yExtent * 2);
        _skyboxQuads[Face.North.ordinal()].setRotation(new Matrix3().fromAngles(0, Math.toRadians(180), 0));
        _skyboxQuads[Face.North.ordinal()].setTranslation(new Vector3(0, 0, _zExtent));
        _skyboxQuads[Face.South.ordinal()] = new Quad("south", _xExtent * 2, _yExtent * 2);
        _skyboxQuads[Face.South.ordinal()].setTranslation(new Vector3(0, 0, -_zExtent));
        _skyboxQuads[Face.East.ordinal()] = new Quad("east", _zExtent * 2, _yExtent * 2);
        _skyboxQuads[Face.East.ordinal()].setRotation(new Matrix3().fromAngles(0, Math.toRadians(90), 0));
        _skyboxQuads[Face.East.ordinal()].setTranslation(new Vector3(-_xExtent, 0, 0));
        _skyboxQuads[Face.West.ordinal()] = new Quad("west", _zExtent * 2, _yExtent * 2);
        _skyboxQuads[Face.West.ordinal()].setRotation(new Matrix3().fromAngles(0, Math.toRadians(270), 0));
        _skyboxQuads[Face.West.ordinal()].setTranslation(new Vector3(_xExtent, 0, 0));
        _skyboxQuads[Face.Up.ordinal()] = new Quad("up", _xExtent * 2, _zExtent * 2);
        _skyboxQuads[Face.Up.ordinal()]
                .setRotation(new Matrix3().fromAngles(Math.toRadians(90), Math.toRadians(270), 0));
        _skyboxQuads[Face.Up.ordinal()].setTranslation(new Vector3(0, _yExtent, 0));
        _skyboxQuads[Face.Down.ordinal()] = new Quad("down", _xExtent * 2, _zExtent * 2);
        _skyboxQuads[Face.Down.ordinal()].setRotation(new Matrix3().fromAngles(Math.toRadians(270),
                Math.toRadians(270), 0));
        _skyboxQuads[Face.Down.ordinal()].setTranslation(new Vector3(0, -_yExtent, 0));

        // We don't want the light to effect our skybox
View Full Code Here

        _timer = timer;

        _texture = new Texture2D();

        _imposterQuad = new Quad("ImposterQuad");
        _imposterQuad.resize(1, 1);
        _imposterQuad.setModelBound(new BoundingBox());
        _imposterQuad.getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);
        _imposterQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        super.attachChild(_imposterQuad);
View Full Code Here

    @Override
    public void write(final OutputCapsule capsule) throws IOException {
        super.write(capsule);
        capsule.write(_texture, "texture", null);
        capsule.write(_targetScene, "targetScene", null);
        capsule.write(_imposterQuad, "standIn", new Quad("ImposterQuad"));
        capsule.write(_redrawRate, "redrawRate", 0.05f);
        capsule.write(_cameraAngleThreshold, "cameraThreshold", 0);
        capsule.write(_worldUpVector, "worldUpVector", new Vector3(Vector3.UNIT_Y));
    }
View Full Code Here

    @Override
    public void read(final InputCapsule capsule) throws IOException {
        super.read(capsule);
        _texture = (Texture2D) capsule.readSavable("texture", null);
        _targetScene = (Node) capsule.readSavable("targetScene", null);
        _imposterQuad = (Quad) capsule.readSavable("standIn", new Quad("ImposterQuad"));
        _redrawRate = capsule.readFloat("redrawRate", 0.05f);
        _cameraAngleThreshold = capsule.readFloat("cameraThreshold", 0);
        _worldUpVector = (Vector3) capsule.readSavable("worldUpVector", new Vector3(Vector3.UNIT_Y));
    }
View Full Code Here

        _controlHandle.setMoveSpeed(200);

        buildShader();
        buildPointSprites();

        _screenQuad = new Quad("0", cam.getWidth(), cam.getHeight());
        _screenQuad.setTranslation(cam.getWidth() / 2, cam.getHeight() / 2, 0);
        _screenQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        _screenQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        _blurBlend = new BlendState();
        _blurBlend.setBlendEnabled(true);
View Full Code Here

        // setting to default value just to show
        waterNode.setWaterPlane(new Plane(new Vector3(0.0, 1.0, 0.0), 0.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

        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));

        _root.setRenderState(ts);

        final Quad quad = new Quad("Quad", 5, 5);
        final BillboardNode billboard = new BillboardNode("Billboard");
        billboard.setAlignment(BillboardAlignment.ScreenAligned);
        billboard.attachChild(quad);
        _root.attachChild(billboard);
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.