Package com.ardor3d.scenegraph

Examples of com.ardor3d.scenegraph.Line


        _particles = new Particle[numParticles];

        if (_particleMesh != null) {
            detachChild(_particleMesh);
        }
        final Line line = new Line(getName() + "_lines") {

            @Override
            public void updateWorldTransform(final boolean recurse) {
                ; // Do nothing.
            }

            @Override
            public void updateWorldBound(final boolean recurse) {
                super.updateWorldTransform(recurse);
                super.updateWorldBound(recurse);
            }
        };
        _particleMesh = line;
        attachChild(line);
        line.getMeshData().setVertexBuffer(_geometryCoordinates);
        line.getMeshData().setColorBuffer(_appearanceColors);
        line.getMeshData().setTextureBuffer(BufferUtils.createVector2Buffer(numParticles * 2), 0);
        getSceneHints().setRenderBucketType(RenderBucketType.Opaque);
        getSceneHints().setLightCombineMode(LightCombineMode.Off);
        getSceneHints().setTextureCombineMode(TextureCombineMode.Replace);

        for (int k = 0; k < numParticles; k++) {
            _particles[k] = new Particle(this);
            _particles[k].init();
            _particles[k].setStartIndex(k * verts);
            for (int a = verts - 1; a >= 0; a--) {
                final int ind = (k * verts) + a;
                BufferUtils.setInBuffer(sharedTextureData[a], line.getMeshData().getTextureCoords(0).getBuffer(), ind);
                BufferUtils.setInBuffer(_particles[k].getCurrentColor(), _appearanceColors, (ind));
            }

        }
        updateWorldRenderStates(true);
View Full Code Here


            final ReadOnlyColorRGBA color, final short pattern, final boolean drawOriginConnector) {
        if (lineFrustum == null) {
            final FloatBuffer verts = BufferUtils.createVector3Buffer(24);
            final FloatBuffer colors = BufferUtils.createColorBuffer(24);

            lineFrustum = new Line("Lines", verts, null, colors, null);
            lineFrustum.getMeshData().setIndexModes(
                    new IndexMode[] { IndexMode.LineLoop, IndexMode.LineLoop, IndexMode.Lines, IndexMode.Lines });
            lineFrustum.getMeshData().setIndexLengths(new int[] { 4, 4, 8, 8 });
            lineFrustum.setLineWidth(2);
            lineFrustum.getSceneHints().setLightCombineMode(LightCombineMode.Off);
View Full Code Here

TOP

Related Classes of com.ardor3d.scenegraph.Line

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.