Package com.ardor3d.util.export.binary

Examples of com.ardor3d.util.export.binary.BinaryImporter


     * @return the new loaded Image.
     * @throws IOException
     *             if an error occurs during read.
     */
    public Image load(final InputStream is, final boolean flip) throws IOException {
        return (Image) new BinaryImporter().load(is);
    }
View Full Code Here


                // First try to load from a3d file
                String resource = closest.source + ".a3d";
                URL url = ResourceLocatorTool.getClassPathResource(BMFontProvider.class, resource);
                try {
                    if (url != null) {
                        final BinaryImporter binaryImporter = new BinaryImporter();
                        closest.bmFont = (BMFont) binaryImporter.load(url);
                    } else {
                        // Not found, load from .fnt
                        resource = closest.source + ".fnt";
                        url = ResourceLocatorTool.getClassPathResource(BMFontProvider.class, resource);
                        closest.bmFont = new BMFont(new URLResourceSource(url), false);
View Full Code Here

        originalNode.setTranslation(new Vector3(-80, 0, -400));
        _root.attachChild(originalNode);

        try {
            binaryImportedNode = (Node) new BinaryImporter().load(bos.toByteArray());
            binaryImportedNode.setTranslation(new Vector3(80, 80, -400));
            _root.attachChild(binaryImportedNode);
        } catch (final IOException e) {
            logger.log(Level.SEVERE, "BinaryImporter failed to load file", e);
        }
View Full Code Here

        final ByteArrayOutputStream bos = new ByteArrayOutputStream();
        final BinaryExporter exporter = new BinaryExporter();
        exporter.save(meshData, bos);
        bos.flush();
        final ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        final BinaryImporter importer = new BinaryImporter();
        final Savable sav = importer.load(bis);
        return (MeshData) sav;
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.util.export.binary.BinaryImporter

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.