Package com.ardor3d.scenegraph.shape

Examples of com.ardor3d.scenegraph.shape.Cylinder


        _handle.getSceneHints().setRenderBucketType(RenderBucketType.Transparent);
        _handle.updateGeometricState(0);
    }

    public MovePlanarWidget withDefaultHandle(final double radius, final double height, final ReadOnlyColorRGBA color) {
        final Cylinder handle = new Cylinder("handle", 2, 16, radius, height, true);
        handle.setDefaultColor(color);
        switch (_plane) {
            case XZ:
                handle.setRotation(new Matrix3().fromAngleNormalAxis(MathUtils.HALF_PI, Vector3.UNIT_X));
                break;
            case YZ:
                handle.setRotation(new Matrix3().fromAngleNormalAxis(MathUtils.HALF_PI, Vector3.UNIT_Y));
                break;
            default:
                // do nothing
                break;
        }
        handle.updateModelBound();
        withHandle(handle);
        return this;
    }
View Full Code Here


    @Override
    public void buildArrow() {
        detachAllChildren();

        // Start with cylinder base:
        final Cylinder base = new Cylinder("base", 4, 16, _width * 0.75, _length - _lengthGap);
        base.getMeshData().translatePoints(0, 0, (_lengthGap + _length) * 0.5);
        attachChild(base);
        base.updateModelBound();

        // Add the pyramid tip.
        final double tipLength = _length / 2.0;
        final Pyramid tip = new Pyramid("tip", 2 * _width, tipLength);
        tip.getMeshData().translatePoints(0, _tipGap + _length + 0.5 * tipLength, 0);
View Full Code Here

        addMesh(new Arrow("Arrow", 3, 1));
        addMesh(new AxisRods("AxisRods", true, 3, 0.5));
        addMesh(new Box("Box", new Vector3(), 3, 3, 3));
        addMesh(new Capsule("Capsule", 5, 5, 5, 2, 5));
        addMesh(new Cone("Cone", 8, 8, 2, 4));
        addMesh(new Cylinder("Cylinder", 8, 8, 2, 4));
        addMesh(new Disk("Disk", 8, 8, 3));
        addMesh(new Dodecahedron("Dodecahedron", 3));
        addMesh(new Dome("Dome", 8, 8, 3));
        addMesh(new Hexagon("Hexagon", 3));
        addMesh(new Icosahedron("Icosahedron", 3));
View Full Code Here

        addMesh(new Arrow("Arrow", 3, 1));
        addMesh(new AxisRods("AxisRods", true, 3, 0.5));
        addMesh(new Box("Box", new Vector3(), 3, 3, 3));
        addMesh(new Capsule("Capsule", 5, 5, 5, 2, 5));
        addMesh(new Cone("Cone", 8, 8, 2, 4));
        addMesh(new Cylinder("Cylinder", 8, 8, 2, 4));
        addMesh(new Disk("Disk", 8, 8, 3));
        addMesh(new Dodecahedron("Dodecahedron", 3));
        addMesh(new Dome("Dome", 8, 8, 3));
        addMesh(new Hexagon("Hexagon", 3));
        addMesh(new Icosahedron("Icosahedron", 3));
View Full Code Here

        pose1.updateTransforms();
        pose2 = new SkeletonPose(sk);
        pose2.updateTransforms();

        arm = new SkinnedMesh("arm");
        final Cylinder cy = new Cylinder("cylinder", 3, 8, 1, 10);
        arm.setBindPoseData(cy.getMeshData());
        arm.getMeshData().setVertexBuffer(BufferUtils.createFloatBuffer(cy.getMeshData().getVertexBuffer().capacity()));
        arm.getMeshData().setNormalBuffer(BufferUtils.createFloatBuffer(cy.getMeshData().getNormalBuffer().capacity()));
        arm.getMeshData().setIndices(BufferUtils.clone(cy.getMeshData().getIndices()));
        arm.getMeshData().setTextureBuffer(BufferUtils.clone(cy.getMeshData().getTextureBuffer(0)), 0);
        arm.setTranslation(0, 0, -10);
        arm.getSceneHints().setCullHint(CullHint.Dynamic);

        arm.setWeightsPerVert(4);
View Full Code Here

TOP

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

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.