Package com.ardor3d.util.resource

Examples of com.ardor3d.util.resource.ResourceSource


        // only a single page is supported
        if (_pages.size() > 0) {
            final Page page = _pages.get(0);

            final ResourceSource texSrc = source.getRelativeSource("./" + page.file);

            Texture.MinificationFilter minFilter;
            Texture.MagnificationFilter magFilter;

            magFilter = Texture.MagnificationFilter.Bilinear;
View Full Code Here


        if (_textureLocator == null) {
            tex = TextureManager.load(name, getMinificationFilter(),
                    isUseCompression() ? TextureStoreFormat.GuessCompressedFormat
                            : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically());
        } else {
            final ResourceSource source = _textureLocator.locateResource(name);
            if (source != null) {
                tex = TextureManager.load(source, getMinificationFilter(),
                        isUseCompression() ? TextureStoreFormat.GuessCompressedFormat
                                : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically());
            }
View Full Code Here

     * @param resource
     *            the name of the resource to find.
     * @return an ObjGeometryStore data object containing the scene and other useful elements.
     */
    public Md2DataStore load(final String resource) {
        final ResourceSource source;
        if (_modelLocator == null) {
            source = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL, resource);
        } else {
            source = _modelLocator.locateResource(resource);
        }
View Full Code Here

     * @param resource
     *            the name of the resource to find.
     * @return an ObjGeometryStore data object containing the scene and other useful elements.
     */
    public ObjGeometryStore load(final String resource) {
        final ResourceSource source;
        if (_modelLocator == null) {
            source = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL, resource);
        } else {
            source = _modelLocator.locateResource(resource);
        }
View Full Code Here

     * @param store
     *            our material store to place the contents of the file in.
     */
    private void loadMaterialLibrary(final String fileName, final ResourceSource modelSource,
            final Map<String, ObjMaterial> store) {
        final ResourceSource source;
        if (_materialLocator == null) {
            source = modelSource.getRelativeSource(fileName);
        } else {
            source = _materialLocator.locateResource(fileName);
        }
View Full Code Here

                    if (_textureLocator == null) {
                        currentMaterial.map_Kd = TextureManager.load(textureName, getMinificationFilter(),
                                isUseCompression() ? TextureStoreFormat.GuessCompressedFormat
                                        : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically());
                    } else {
                        final ResourceSource source = _textureLocator.locateResource(textureName);
                        currentMaterial.map_Kd = TextureManager.load(source, getMinificationFilter(),
                                isUseCompression() ? TextureStoreFormat.GuessCompressedFormat
                                        : TextureStoreFormat.GuessNoCompressedFormat, isFlipTextureVertically());
                    }
                }
View Full Code Here

                new FontLoad("Computerfont-35-medium-regular", true) };

        for (final FontLoad fl : fontNames) {
            try {
                final String file = "fonts/" + fl.fontName + ".fnt";
                final ResourceSource url = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, file);
                final BMFont bmFont = new BMFont(url, fl.useMipMaps);
                _fontList.add(bmFont);
            } catch (final Throwable t) {
                logger.warning(t.getMessage());
            }
View Full Code Here

            }
        });

        // Load our layer and states from script
        try {
            final ResourceSource layersFile = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                    AnimationCopyExample.class, "com/ardor3d/example/pipeline/AnimationCopyExample.js"));
            JSLayerImporter.addLayers(layersFile, manager, input);
        } catch (final Exception e) {
            e.printStackTrace();
        }
View Full Code Here

        return t3;
    }

    private void importDogDae() {

        final ResourceSource rts = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                AnimationBlinnPhongExample.class,
                "com/ardor3d/example/media/models/collada/juanita/dog_Apr18_normals.dds"));
        final Texture t = TextureManager.load(rts, Texture.MinificationFilter.NearestNeighborNearestMipMap, true);
        final ResourceSource specularRS = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                AnimationBlinnPhongExample.class,
                "com/ardor3d/example/media/models/collada/juanita/dog_Apr18_specular.dds"));
        final Texture specular = TextureManager.load(specularRS,
                Texture.MinificationFilter.NearestNeighborNearestMipMap, false);

        colladaImporter = new ColladaImporter();

        final ResourceSource rs = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_MODEL,
                "com/ardor3d/example/media/models/collada/juanita/dog_Apr18_smooth.dae");
        try {
            colladaStorage = colladaImporter.load(rs);
        } catch (final IOException ex) {
            ex.printStackTrace();
View Full Code Here

            }
        });

        // Load our layer and states from script
        try {
            final ResourceSource layersFile = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                    AnimationDemoExample.class, "com/ardor3d/example/pipeline/AnimationDemoExample.js"));
            JSLayerImporter.addLayers(layersFile, manager, input);
        } catch (final Exception e) {
            e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of com.ardor3d.util.resource.ResourceSource

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.