当前位置: 首页>>代码示例>>Java>>正文


Java RenderBuckets类代码示例

本文整理汇总了Java中org.oscim.renderer.bucket.RenderBuckets的典型用法代码示例。如果您正苦于以下问题:Java RenderBuckets类的具体用法?Java RenderBuckets怎么用?Java RenderBuckets使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RenderBuckets类属于org.oscim.renderer.bucket包,在下文中一共展示了RenderBuckets类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSurfaceCreated

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public void onSurfaceCreated() {
	// log.debug(GL.getString(GL20.EXTENSIONS));
	String vendor = gl.getString(GL.VENDOR);
	String renderer = gl.getString(GL.RENDERER);
	String version = gl.getString(GL.VERSION);
	log.debug("{}/{}/{}", vendor, renderer, version);

	// Prevent issue with Adreno 3xx series
	if (renderer != null && renderer.startsWith("Adreno (TM) 3")) {
		log.debug("==> not using glBufferSubData");
		GLAdapter.NO_BUFFER_SUB_DATA = true;
	}

	GLState.init();

	// Set up some vertex buffer objects
	BufferObject.init(200);

	// classes that require GL context for initialization
	RenderBuckets.initRenderer();

	mNewSurface = true;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:24,代码来源:MapRenderer.java

示例2: loadTile

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
@Override
public boolean loadTile(MapTile tile) {
	log.debug("load tile " + tile);
	RenderBuckets buckets = new RenderBuckets();
	tile.data = buckets;

	LineBucket lb = buckets.getLineBucket(0);
	lb.line = mLineStyle;
	lb.scale = 2;

	int m = 20;
	int s = Tile.SIZE - m * 2;
	GeometryBuffer g = mGeom;

	g.clear();
	g.startLine();
	g.addPoint(m, m);
	g.addPoint(m, s);
	g.addPoint(s, s);
	g.addPoint(s, m);
	g.addPoint(m, m);

	lb.addLine(g);

	return true;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:27,代码来源:TestTileLayer.java

示例3: addDebugLayers

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
static void addDebugLayers(final RenderBuckets dbg) {
    final int alpha = 0xaaffffff;

    dbg.clear();
    dbg.addLineBucket(0, new LineStyle((Color.BLUE & alpha), 2));
    dbg.addLineBucket(1, new LineStyle((Color.RED & alpha), 2));
    dbg.addLineBucket(3, new LineStyle((Color.YELLOW & alpha), 2));
    dbg.addLineBucket(2, new LineStyle((Color.GREEN & alpha), 2));
    dbg.addLineBucket(4, new LineStyle((Color.CYAN & alpha), 2));
    dbg.addLineBucket(5, new LineStyle((Color.MAGENTA & alpha), 2));
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:12,代码来源:Debug.java

示例4: draw

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public static void draw(final MapPosition pos, final GLViewport m, final RenderBuckets layers) {
    //        if (layers.baseLayers != null) {
    //            //setMatrix(pos, m, true);
    //
    //            for (RenderElement l = layers.baseLayers; l != null;) {
    //                if (l.type == RenderElement.POLYGON) {
    //                    l = PolygonLayer.Renderer.draw(pos, l, m, true, 1, false);
    //                } else {
    //                    //float div = (float) (mMapPosition.scale / (1 << pos.zoomLevel));
    //                    l = LineLayer.Renderer.draw(layers, l, pos, m, div);
    //                }
    //            }
    //        }
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:15,代码来源:Debug.java

示例5: getBuckets

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
/**
 * Get the default ElementLayers which are added
 * by {@link VectorTileLoader}
 */
public RenderBuckets getBuckets() {
	if (!(data instanceof RenderBuckets))
		return null;

	return (RenderBuckets) data;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:11,代码来源:MapTile.java

示例6: setTileImage

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
@Override
public void setTileImage(Bitmap bitmap) {
	if (isCanceled() || !mTile.state(LOADING)) {
		bitmap.recycle();
		return;
	}

	BitmapBucket l = new BitmapBucket(false);
	l.setBitmap(bitmap, Tile.SIZE, Tile.SIZE, mLayer.pool);

	RenderBuckets buckets = new RenderBuckets();
	buckets.set(l);
	mTile.data = buckets;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:15,代码来源:BitmapTileLoader.java

示例7: addDebugLayers

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
static void addDebugLayers(RenderBuckets dbg) {
	int alpha = 0xaaffffff;

	dbg.clear();
	dbg.addLineBucket(0, new LineStyle((Color.BLUE & alpha), 2));
	dbg.addLineBucket(1, new LineStyle((Color.RED & alpha), 2));
	dbg.addLineBucket(3, new LineStyle((Color.YELLOW & alpha), 2));
	dbg.addLineBucket(2, new LineStyle((Color.GREEN & alpha), 2));
	dbg.addLineBucket(4, new LineStyle((Color.CYAN & alpha), 2));
	dbg.addLineBucket(5, new LineStyle((Color.MAGENTA & alpha), 2));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:12,代码来源:Debug.java

示例8: draw

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public static void draw(MapPosition pos, GLViewport m, RenderBuckets layers) {
	//		if (layers.baseLayers != null) {
	//			//setMatrix(pos, m, true);
	//
	//			for (RenderElement l = layers.baseLayers; l != null;) {
	//				if (l.type == RenderElement.POLYGON) {
	//					l = PolygonLayer.Renderer.draw(pos, l, m, true, 1, false);
	//				} else {
	//					//float div = (float) (mMapPosition.scale / (1 << pos.zoomLevel));
	//					l = LineLayer.Renderer.draw(layers, l, pos, m, div);
	//				}
	//			}
	//		}
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:15,代码来源:Debug.java

示例9: callThemeHooks

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public void callThemeHooks(MapTile tile, RenderBuckets layers, MapElement element,
        RenderStyle style, int level) {

	LList<TileLoaderThemeHook> th = mLoaderThemeHooks.head();
	while (th != null) {
		if (th.data.render(tile, layers, element, style, level))
			return;

		th = th.next;
	}
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:12,代码来源:VectorTileLayer.java

示例10: callProcessHooks

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public boolean callProcessHooks(MapTile tile, RenderBuckets layers, MapElement element) {

		LList<TileLoaderProcessHook> ph = mLoaderProcessHooks.head();
		while (ph != null) {
			if (ph.data.process(tile, layers, element))
				return true;
			ph = ph.next;
		}

		return false;
	}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:12,代码来源:VectorTileLayer.java

示例11: getBuckets

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
private static ExtrusionBuckets getBuckets(MapTile t) {
	RenderBuckets buckets = t.getBuckets();
	if (buckets != null && !t.state(READY | NEW_DATA))
		return null;

	return BuildingLayer.get(t);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:8,代码来源:BuildingRenderer.java

示例12: uploadTileData

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
private static int uploadTileData(MapTile tile) {
	tile.setState(READY);
	RenderBuckets buckets = tile.getBuckets();

	/* tile might only contain label layers */
	if (buckets == null)
		return 0;

	if (!buckets.compile(true)) {
		buckets.clear();
		return 0;
	}

	return 1;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:16,代码来源:TileRenderer.java

示例13: process

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
/**
 * TileLoaderThemeHook
 */
@Override
public boolean process(MapTile tile, RenderBuckets buckets, MapElement el,
                       RenderStyle style, int level) {

    if (!(style instanceof ExtrusionStyle))
        return false;

    ExtrusionStyle extrusion = (ExtrusionStyle) style;

    ExtendedMapElement element = (ExtendedMapElement) el;

    int height = element.buildingHeight > 0 ? element.buildingHeight : 12 * 100; // 12m default
    int minHeight = element.buildingMinHeight;

    float[] colors = extrusion.colors;

    if (element.buildingColor != 0 || element.roofColor != 0) {
        // As defined in style
        float alpha = 0.9f;
        colors = new float[16];
        System.arraycopy(extrusion.colors, 0, colors, 0, colors.length);
        if (element.roofColor != 0) {
            colors[0] = alpha * Color.rToFloat(element.roofColor);
            colors[1] = alpha * Color.gToFloat(element.roofColor);
            colors[2] = alpha * Color.bToFloat(element.roofColor);
            colors[3] = alpha;
        }
        if (element.buildingColor != 0) {
            colors[4] = alpha * Color.rToFloat(element.buildingColor);
            colors[5] = alpha * Color.gToFloat(element.buildingColor);
            colors[6] = alpha * Color.bToFloat(element.buildingColor);
            colors[7] = alpha;
            colors[8] = alpha * Color.rToFloat(element.buildingColor);
            colors[9] = alpha * Color.gToFloat(element.buildingColor);
            colors[10] = alpha * Color.bToFloat(element.buildingColor);
            colors[11] = alpha;
        }
    }

    ExtrusionBuckets ebs = get(tile);

    for (ExtrusionBucket b = ebs.buckets; b != null; b = b.next()) {
        if (b.colors == colors) {
            b.add(element, height, minHeight);
            return true;
        }
    }

    double lat = MercatorProjection.toLatitude(tile.y);
    float groundScale = (float) MercatorProjection.groundResolutionWithScale(lat, 1 << tile.zoomLevel);

    ebs.buckets = Inlist.push(ebs.buckets, new ExtrusionBucket(0, groundScale, colors));
    ebs.buckets.add(element, height, minHeight);

    return true;
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:60,代码来源:BuildingLayer.java

示例14: BucketRenderer

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
public BucketRenderer() {
	buckets = new RenderBuckets();
	mMapPosition = new MapPosition();
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:5,代码来源:BucketRenderer.java

示例15: render

import org.oscim.renderer.bucket.RenderBuckets; //导入依赖的package包/类
/** Called for each RenderStyle found for a MapElement. */
public boolean render(MapTile tile, RenderBuckets buckets,
        MapElement element, RenderStyle style, int level);
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:4,代码来源:VectorTileLayer.java


注:本文中的org.oscim.renderer.bucket.RenderBuckets类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。