Package com.ardor3d.extension.terrain.util

Examples of com.ardor3d.extension.terrain.util.Tile


                    final int sourceY = tileY + i - cacheSize / 2;

                    final int destX = MathUtils.moduloPositive(sourceX, cacheSize);
                    final int destY = MathUtils.moduloPositive(sourceY, cacheSize);

                    newTiles.add(new TileLoadingData(mailBox, new Tile(sourceX, sourceY), new Tile(destX, destY),
                            source, cache, data, tileSize, dataSize, clipmapLevel, requestedLevel));
                }
            }

            final Iterator<TileLoadingData> tileIterator = currentTiles.iterator();
View Full Code Here


                        validTiles = source.getValidTiles(requestedLevel, tileX - locatorSize / 2, tileY - locatorSize
                                / 2, locatorSize, locatorSize);
                    } catch (final Exception e) {
                        logger.log(Level.WARNING, "Exception getting source info", e);
                    }
                    locatorTile = new Tile(tileX, tileY);
                }

                threadedUpdateTiles();
            }
        }
View Full Code Here

        for (int y = 0; y < numTilesY; y++) {
            for (int x = 0; x < numTilesX; x++) {
                final int xx = tileX + x;
                final int yy = tileY + y;
                if (xx >= 0 && xx * tileSize * levelSize <= size && yy >= 0 && yy * tileSize * levelSize <= size) {
                    final Tile tile = new Tile(xx, yy);
                    validTiles.add(tile);
                }
            }
        }

View Full Code Here

        for (int y = 0; y < numTilesY; y++) {
            for (int x = 0; x < numTilesX; x++) {
                final int xx = tileX + x;
                final int yy = tileY + y;
                if (xx >= 0 && xx * tileSize <= heightMapSize && yy >= 0 && yy * tileSize <= heightMapSize) {
                    final Tile tile = new Tile(xx, yy);
                    validTiles.add(tile);
                }
            }
        }

View Full Code Here

        for (int y = 0; y < numTilesY; y++) {
            for (int x = 0; x < numTilesX; x++) {
                final int xx = tileX + x;
                final int yy = tileY + y;
                if (xx >= 0 && xx * tileSize <= heightMapSize && yy >= 0 && yy * tileSize <= heightMapSize) {
                    final Tile tile = new Tile(xx, yy);
                    validTiles.add(tile);
                }
            }
        }

View Full Code Here

            final int minX = (int) MathUtils.floor(bounds.getX() * scale);
            final int minY = (int) MathUtils.floor(bounds.getY() * scale);
            final int maxX = (int) MathUtils.floor((bounds.getX() + bounds.getWidth() - 1) * scale);
            final int maxY = (int) MathUtils.floor((bounds.getY() + bounds.getHeight() - 1) * scale);

            Tile tile;
            for (int y = minY; y <= maxY; y++) {
                for (int x = minX; x <= maxX; x++) {
                    tile = new Tile(x, y);
                    synchronized (store) {
                        store.add(tile);
                    }
                }
            }
View Full Code Here

        final Set<Tile> tiles = Sets.newHashSet();

        int checkX, checkY;
        for (final Iterator<Tile> it = _updatedTiles[baseClipmapLevel].iterator(); it.hasNext();) {
            final Tile tile = it.next();
            checkX = tile.getX();
            checkY = tile.getY();
            if (checkX >= tileX && checkX < tileX + numTilesX && checkY >= tileY && checkY < tileY + numTilesY) {
                tiles.add(tile);
                it.remove();
            }
        }
View Full Code Here

            final int minX = (int) MathUtils.floor(bounds.getX() * scale);
            final int minY = (int) MathUtils.floor(bounds.getY() * scale);
            final int maxX = (int) MathUtils.floor((bounds.getX() + bounds.getZ() - 1) * scale);
            final int maxY = (int) MathUtils.floor((bounds.getY() + bounds.getW() - 1) * scale);

            Tile tile;
            for (int y = minY; y <= maxY; y++) {
                for (int x = minX; x <= maxX; x++) {
                    tile = new Tile(x, y);
                    _updatedTiles[i].add(tile);
                }
            }
        }
    }
View Full Code Here

        for (int y = 0; y < numTilesY; y++) {
            for (int x = 0; x < numTilesX; x++) {
                final int xx = tileX + x;
                final int yy = tileY + y;
                if (xx >= 0 && xx * tileSize * levelSize <= size && yy >= 0 && yy * tileSize * levelSize <= size) {
                    final Tile tile = new Tile(xx, yy);
                    validTiles.add(tile);
                }
            }
        }

View Full Code Here

                return null;
            }

            int checkX, checkY;
            for (final Iterator<Tile> it = updatedTiles[baseClipmapLevel].iterator(); it.hasNext();) {
                final Tile tile = it.next();
                checkX = tile.getX();
                checkY = tile.getY();
                if (checkX >= tileX && checkX < tileX + numTilesX && checkY >= tileY && checkY < tileY + numTilesY) {
                    tiles.add(tile);
                    it.remove();
                }
            }
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.terrain.util.Tile

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.