1426 Commits

Author SHA1 Message Date
Emux
8a595fd37f 0.7.0-rc2 2017-02-20 11:15:12 +02:00
Emux
967875d6b8 XmlThemeBuilder: use English case transformation rules, fixes #297 2017-02-19 22:10:17 +02:00
Emux
d60e2ef575 0.7.0-rc1 2017-02-16 14:53:42 +02:00
Emux
58ecf60d9d vtm-web: fix javadoc 2017-02-16 11:45:04 +02:00
Emux
17356e5a2b vtm-web: add in Maven deploy 2017-02-16 10:52:08 +02:00
Emux
296fdd3c13 Update Mapsforge-Maps.md 2017-02-14 10:27:07 +02:00
Emux
735acc520a Android MapView: add onDestroy method 2017-02-13 10:14:53 +02:00
Emux
ac115b1f0f TileSource: add name parameter 2017-02-12 21:09:38 +02:00
Emux
d2ba6647ea OkHttp: catch exceptions #138 2017-02-11 23:30:08 +02:00
Emux
0180c40855 Mapbox (Mapzen): use OkHttp engine #57 2017-02-11 22:33:35 +02:00
Emux
817bd13d7b OkHttp 3 engine, closes #138 2017-02-11 22:33:23 +02:00
Emux
d22dc79655 Fix readme 2017-02-07 12:48:51 +02:00
Emux
fc9ef062c0 Update readme 2017-02-07 12:37:19 +02:00
Emux
f2dda7c8eb vtm-web-app: include theme with texture atlas symbols #51 2017-02-06 20:07:55 +02:00
Emux
fdc793d9ec Samples: fix location layer visibility #32 2017-02-06 14:18:43 +02:00
Emux
3d24aade21 Samples: skip z-order in fragment #32 2017-02-06 14:17:47 +02:00
Emux
6d93aaf57f Update vtm-web-js build 2017-02-06 10:57:27 +02:00
Schedul Xor
8fc354c96a libGDX1.9.5, GWT2.8.0 applied to vtm-web (#290) 2017-02-06 10:48:19 +02:00
Emux
e30f3f7cc3 Update integration guide 2017-02-01 10:29:13 +02:00
Emux
aff2c77267 Update Android support library 2017-01-31 10:03:55 +02:00
Emux
33365b3f7d Mapbox (Mapzen) theme: cities improvements #287 #57 2017-01-29 11:43:06 +02:00
Robin
33fdc938fa Render capital cities early (#287)
Mapbox (Mapzen): Render capital cities early
2017-01-29 11:15:55 +02:00
Emux
8397d5a3be Platform identification improvements #286, closes #285 2017-01-27 20:09:33 +02:00
Longri
980e9d5e54 Add platform identification (#286) 2017-01-27 20:02:17 +02:00
Emux
bc7c55b1f8 Update readme 2017-01-27 12:01:55 +02:00
Longri
120182ec15 Texture atlas with marker overlays example (#284) 2017-01-27 11:58:27 +02:00
Emux
945b84f04f Update changelog 2017-01-26 20:54:48 +02:00
Andre Höpfner
f67c457006 Create TextureAtlas with TextureRegions from bitmaps (#283) 2017-01-26 20:53:40 +02:00
Emux
a2852b0761 Update integration guide 2017-01-22 16:38:08 +02:00
Emux
ebf5d408bc Add Mapsforge map providers list doc 2017-01-21 15:19:33 +02:00
Longri
75719eae29 iOS: improve upload texture for IosBitmap (#282) 2017-01-21 14:30:12 +02:00
Emux
5c825ea9eb Mapbox (Mapzen): locale improvements #57 2016-12-29 18:16:27 +02:00
Emux
15bc23cadf Mapbox (Mapzen): locale option #57 2016-12-29 17:56:23 +02:00
Emux
88f3283878 Render themes improvements #41 2016-12-29 17:17:48 +02:00
Emux
80848f9d2d Mapbox (Mapzen) vector tiles improvements #57 2016-12-29 16:40:49 +02:00
boldtrn
f1f5726457 Mapbox (Mapzen) vector tiles (#279), #57, fixes #271 2016-12-29 14:43:38 +02:00
Emux
2ccf3e4c64 Map limit via bounding box, closes #277 2016-12-27 12:39:31 +02:00
Emux
c8cbf8e0ce Oneway arrows in themes, closes #275 2016-12-24 16:07:43 +02:00
Emux
6544cc1081 Update changelog 2016-12-22 16:11:34 +02:00
Emux
4c72831336 Update applications list 2016-12-22 16:11:24 +02:00
Emux
06ac5142f7 Render theme callback, closes #274 2016-12-20 21:55:53 +02:00
Emux
feae45f78b Update libGDX to 1.9.5 #270 2016-12-14 15:33:26 +02:00
Emux
61b8233b97 Circles (GL points) stroke #268 2016-12-14 13:01:11 +02:00
Emux
7acbea88cc Update Android support library 2016-12-14 09:48:04 +02:00
Emux
19109516ae Circles (GL points) anti-aliasing #268 2016-12-13 19:56:44 +02:00
Emux
c1a5ad7e74 Update Android build tools 2016-12-13 09:38:24 +02:00
Emux
1a93e4ae13 TextStyle improvements 2016-12-12 12:22:15 +02:00
Emux
1de6ca8fb7 Render styles improvements 2016-12-11 15:17:42 +02:00
Emux
02db7ca08d ExtrusionStyle: add StyleBuilder interface 2016-12-11 11:42:48 +02:00
Emux
e9bb7aaae4 Render buckets improvements 2016-12-09 20:36:48 +02:00
Emux
989e9c2ae8 Update readme 2016-12-09 20:00:05 +02:00
Emux
e8f41cd339 Update applications list 2016-12-09 19:43:23 +02:00
Emux
eabd90d14c Applications list: update an app's license 2016-12-09 10:48:56 +02:00
Emux
3e4aad4d51 LocationLayer: move lazy enable to application #171 2016-12-08 20:26:50 +02:00
Emux
b6dc72bbb6 Circle map style: use GL quads or GL points #122 2016-12-08 14:30:05 +02:00
Emux
4cd11462da SVG resources scaling, closes #214 2016-12-08 12:06:14 +02:00
Emux
6344542b10 SymbolStyle: add style builder #214 2016-12-07 20:16:11 +02:00
Emux
e0031ae8aa CircleStyle fix #122 2016-12-07 15:57:36 +02:00
Emux
229ea0b350 CircleStyle: add style builder #122 2016-12-07 15:12:50 +02:00
Emux
0a5d08a908 Update Gradle Android plugin 2016-12-07 09:40:11 +02:00
Emux
aed54c9a49 Update changelog 2016-12-06 21:38:49 +02:00
Emux
1a3bf4e4fe Render theme improvements #41 2016-12-06 21:16:38 +02:00
Emux
591ae03667 GL shader version, closes #265 2016-12-06 21:07:53 +02:00
Emux
3a191fb513 Circle map style #122 2016-12-06 21:07:53 +02:00
Andrey Novikov
2821d8ddb8 Circle map style rendering (#202) #122 2016-12-04 11:26:12 +02:00
Emux
71d7b71035 Map.getMapPosition at animation end option 2016-12-02 19:25:36 +02:00
Emux
85858911fa MapPosition animation sample with queue 2016-12-02 13:04:02 +02:00
Emux
0a92c84668 GDX double tap zoom, closes #263 2016-12-02 10:48:55 +02:00
Emux
c21d7b4390 Android example for render theme styles #93, closes #255 2016-12-01 21:08:12 +02:00
Emux
38a9c71bc2 MapPosition animation sample improvements #252 2016-12-01 19:59:43 +02:00
Mathieu De Brito
2573e458d5 Add sample showing MapPosition animations not merge (#252) 2016-12-01 19:57:13 +02:00
Emux
25a9891133 Samples reorganization #32 2016-11-28 21:10:07 +02:00
Andrey Novikov
8ee4e5fb8c OSMUtils: Treat amenity as area in heuristic (#262) 2016-11-28 20:14:33 +02:00
Emux
a38b054228 OSMUtils: include correct copyrights #35 2016-11-28 20:03:12 +02:00
Andrey Novikov
d9bf94da99 Fix zoom animation not executed sometimes (#261) 2016-11-28 15:42:44 +02:00
Longri
77653096f9 Add events for scale / rotate / tilt by user (#256) 2016-11-28 15:02:06 +02:00
Andrey Novikov
5f534656ea Improved gestures: use VTM Task for asynchronous calls (#260) #253 2016-11-28 14:41:32 +02:00
Emux
ba93445259 Improved gestures: parallel system and samples #253 2016-11-28 14:41:32 +02:00
Andrey Novikov
71f7c45b21 Improved gestures (#249) #253 2016-11-28 14:28:44 +02:00
Emux
ca5e34e1fb Render themes new SVG resources, closes #251 2016-11-27 17:06:55 +02:00
Emux
d937f3516c Samples: add map events in desktop marker example #32 2016-11-25 09:50:18 +02:00
Emux
a8909fca08 GDX: improve keyboard shortcuts 2016-11-24 16:20:30 +02:00
Emux
b39feae045 Samples cleanup 2016-11-24 10:37:27 +02:00
Emux
9f4ef47b95 Gradle: enhance clean tasks in vtm web apps 2016-11-24 10:19:35 +02:00
Emux
25e79bac55 Update Android build tools 2016-11-23 09:41:05 +02:00
Emux
311f4c7929 Samples: map events improvements #32 2016-11-22 21:07:28 +02:00
Emux
557e1858a7 Android: fix quick scale vs long press, fixes #250 2016-11-22 20:39:47 +02:00
Emux
16fa42d462 Marker examples: add (map) long press events #32 2016-11-22 20:37:05 +02:00
Emux
1133edb83d vtm-app: fix location layer 2016-11-22 12:55:52 +02:00
Izumi Kawashima
f6dbeba3d8 Check and clamp bearing range each time it's set (#248) 2016-11-21 20:01:34 +02:00
Emux
bf8f0745a6 Fix Travis build 2016-11-21 12:59:07 +02:00
Emux
829e45224f Animator easing: improvements and backwards API compatibility (#242) #246 2016-11-21 12:42:48 +02:00
Schedul Xor
acde5d565d Added easing functions which currently works with Animator (#242) 2016-11-21 12:38:01 +02:00
Emux
f0a652faf3 vtm-web modules: minor cleanup #51 2016-11-21 11:20:31 +02:00
Schedul Xor
41867344e2 Support TextureRegion to be used for MarkerSymbol (#245) 2016-11-21 10:49:04 +02:00
Izumi Kawashima
0c39ff8be0 Made {X},{Y},{Z} customizable in derived tile sources for tile URL (#244) 2016-11-21 10:25:43 +02:00
Emux
6f78f08a04 vtm-web: update documentation 2016-11-20 19:40:44 +02:00
Emux
3388e1401f Improve code / xml formatting #54 2016-11-20 19:26:38 +02:00
Izumi Kawashima
308497ffa6 Update vtm-web modules (#240) #51 2016-11-20 19:13:00 +02:00
Izumi Kawashima
bfa5a095f0 UrlTileSource: use StringBuilder instead of String concatenation (#241) 2016-11-20 19:03:57 +02:00
Emux
96be36edb8 Update badges 2016-11-19 17:28:31 +02:00
Emux
7c9c3732fb Osmarender theme: fix 'scrub' overlap without tessellation '#41 2016-11-16 21:08:01 +02:00
Emux
add62c9fe8 Location layer: lazy rendering start for performance #171 2016-11-16 14:18:14 +02:00
Emux
4aaa1ce620 AwtPaint: fix getColor 2016-11-16 10:57:13 +02:00
Emux
aa63b49e5a Render themes improvements #41 2016-11-16 10:04:19 +02:00
Emux
1f1d91202c Update Android support lib 2016-11-15 09:26:03 +02:00
Emux
51eae28926 MapDatabase: use TileClipper buffer based on dpi, #231 2016-11-13 17:19:13 +02:00
Emux
58b5f2741b Use baseline 160dpi in scaling, closes #236 2016-11-13 16:52:29 +02:00
Emux
d82faad435 Render themes improvements #41 2016-11-13 16:52:29 +02:00
Emux
fc8223bfc8 Tile grid enhance color #238 2016-11-13 16:52:22 +02:00
Emux
3584c4be1e Tile grid layer scaling, closes #238 2016-11-13 11:45:44 +02:00
Emux
001dbe8447 House numbers (nodes) mix with symbols, fixes #234 2016-11-12 16:19:29 +02:00
Emux
54feb7a25e MapDatabase: clear tags with each element read, #234, fixes #235 2016-11-12 16:17:39 +02:00
Emux
ea2a94f76b Update changelog 2016-11-10 21:58:35 +02:00
Emux
b6bfbc612a Render themes improvements #41 2016-11-10 21:25:17 +02:00
Emux
1d545fd804 Mapbox vector tiles: use tessellation in water #57 2016-11-10 15:09:31 +02:00
Emux
3acf77c102 Render themes improvements #41 2016-11-10 14:22:59 +02:00
Emux
6dfe2df2fb Update Travis 2016-11-09 13:00:12 +02:00
Mathieu De Brito
6cb40e1c15 Android samples: add fragment example (#233) 2016-11-09 13:00:02 +02:00
Emux
afd03809e8 Render theme styles sample improvements #93 2016-11-09 11:44:45 +02:00
Emux
efa3cb0231 Render theme styles sample #93 2016-11-08 12:16:02 +02:00
Emux
a709bd2623 MapDatabase: use TileClipper buffer as half the tile size, #231 2016-11-07 21:53:53 +02:00
Emux
439f2b20ff Fix house numbers (nodes) visibility (with new maps), fixes #168 2016-11-05 17:49:28 +02:00
Emux
877d217f31 Update dependencies 2016-11-05 13:53:05 +02:00
Emux
885264ad8c Gradle: declare compile time only dependencies with Java plugin #229 2016-11-04 22:06:32 +02:00
Emux
e224a7cf5b Samples: minor improvements #32 2016-11-02 14:06:36 +02:00
Emux
e10a223ea6 Mapsforge: multiple map files with zoom levels, #208 2016-11-02 13:54:31 +02:00
Emux
f85453e60c Render themes: use tessellation in sea #208 2016-11-02 10:40:25 +02:00
Emux
a6b3d7b0c2 Mapsforge: multiple map files, closes #208 2016-11-02 10:32:30 +02:00
Emux
dc15ba5f34 Update documentation 2016-11-02 10:02:34 +02:00
pedrop
1d7afaf8de ItemizedLayer: API enhancements for adding Collection of any MarkerInterface implementation (#211) 2016-10-31 20:29:22 +02:00
pedrop
422d81d665 PathLayer: API enhancements for adding Collection of any GeoPoint extension (#211) 2016-10-31 19:58:13 +02:00
Emux
4b55043dcc MercatorProjection.latitudeToY not work at > ±85.05113°, fixes #222 2016-10-31 15:13:31 +02:00
Emux
7885529fff Update changelog #108 2016-10-30 17:43:02 +02:00
Emux
2c610f5e0b PathLayer: draw line improvements by @Bezzu, fixes #108 2016-10-30 17:31:22 +02:00
Emux
64a586dde8 MapFileTileSource: zoom level improvements, closes #219 2016-10-30 16:14:54 +02:00
Emux
c1f65144df Mapbox tile source: use new Mapzen production url #57 2016-10-29 22:12:56 +03:00
Emux
ad2ee3f40e Mapzem .mvt theme: update with SVG and various improvements #57 2016-10-29 21:46:16 +03:00
Emux
01365686fa Fix render theme schema 'src' regular expression 2016-10-29 21:18:22 +03:00
Emux
dece13ddc9 Mapbox vector tiles improvements and example #57 2016-10-29 20:56:01 +03:00
Emux
05e9e0cdc8 Mapbox vector tiles by @hjanetzek #57 2016-10-29 18:53:52 +03:00
Emux
a9283dd408 Render theme improvements #41 2016-10-28 20:43:16 +03:00
Emux
53ca77d18a Update changelog 2016-10-28 17:39:11 +03:00
Andrey Novikov
97654f0670 Polygon label position (#204), #80
- Fix infinite recursion on invalid polygons
- Allow setting area-size for text styles
- Skip unnecessary calculations if label is outside of visible area
2016-10-28 17:36:10 +03:00
Emux
cbd0ac01df Polygon label position (minor improvements) (#204), #80 2016-10-28 17:35:50 +03:00
Andrey Novikov
ca841f5181 Polygon label position enhancements (#204), closes #80 2016-10-28 17:34:53 +03:00
Emux
a322768f8a 0.6.0 2016-10-28 12:26:13 +03:00
Emux
fc7bb2df9b 0.6.0-rc3 2016-10-22 13:22:34 +03:00
Emux
062bb8d573 Update Android and Gradle plugin versions 2016-10-21 20:08:17 +03:00
szantai78
ccdea3b663 LocationRenderer: revert shader precision from high to medium #209, fixes #207 2016-10-21 19:18:19 +03:00
Emux
985bbc3f36 0.6.0-rc2 2016-10-16 15:55:30 +03:00
Emux
aa5fc79681 libGDX desktop: disable OpenAL 2016-10-15 19:05:03 +03:00
Emux
58095f31a4 Enable location layer rendering when needed #171 2016-10-14 19:39:43 +03:00
Emux
e53523b82a Add location layer and Samples example #171 2016-10-14 11:36:34 +03:00
Emux
e5c62c9bc4 Gradle: update Android plugin 2016-10-11 09:09:54 +03:00
Emux
3c1091d8e0 BoundingBox: fix longitude span #200 2016-10-09 21:12:47 +03:00
Emux
d4f3c32358 0.6.0-rc1 2016-10-08 18:47:05 +03:00
Emux
75b22fee2d Fix Travis build #200 #201 2016-10-08 16:36:51 +03:00
Emux
8a27d14f9a GeoPoint improvements, closes #201 2016-10-08 16:17:10 +03:00
Emux
ac7706eb7a BoundingBox improvements, closes #200 2016-10-08 15:57:13 +03:00
Longri
4994d611fe Update iOS integration guide #29 2016-10-08 11:29:39 +03:00
Longri
1ac57cb719 Update applications list 2016-10-08 11:17:32 +03:00
Emux
bed6f8f0f2 Samples: multiple map views improvements #196 #194 2016-10-02 22:06:33 +03:00
Emux
e8a105d892 Merge pull request #196 from mar-v-in/multimap
Multi Map Sample
2016-10-02 22:05:59 +03:00
Marvin W
e57bacb957 Multi Map Sample
As proposed in #194
2016-10-02 19:28:07 +02:00
Emux
311886e23b Update Android build tools 2016-09-29 10:11:31 +03:00
Emux
1e745a6e9b C-style string comparisons, fixes #190 2016-09-29 10:00:29 +03:00
Andrey Novikov
41c35ea114 Fix event listener unbinding #186, fixes #192 2016-09-28 22:33:58 +03:00
Andrey Novikov
2b24bf82f9 VectorTileLayer: postpone zoom limits initialization #188, closes #191 2016-09-28 20:54:40 +03:00
Emux
929beb87fc Merge pull request #187 from andreynovikov/oscimap-tile-decoder
Make TileDecoder public
2016-09-28 20:17:19 +03:00
Andrey Novikov
1a1d94e755 S3DBLayer: fix C-style string comparisons #189, #190 2016-09-28 20:06:19 +03:00
Andrey Novikov
52bb54c006 TagSet: fix C-style string comparisons #185, fixes #190 2016-09-28 20:00:22 +03:00
Andrey Novikov
96f0a60b44 Make tile decoder public 2016-09-28 15:10:06 +03:00
Emux
98924b83af Travis: publish snapshots to Sonatype OSSRH #165 2016-09-28 13:58:24 +03:00
Emux
050114eff3 PolygonBucket: make enableTexture adjustable #179 2016-09-26 15:31:51 +03:00
Emux
ea884f56b1 Update integration guide 2016-09-26 11:02:27 +03:00
Emux
cb732c6823 Clean old project.properties 2016-09-25 19:25:54 +03:00
Emux
bf420db0f9 Deprecate vtm-android-start module, closes #184 2016-09-25 19:09:13 +03:00
Emux
2a2b30f9fc Samples: update with scaled tile size #183 2016-09-25 19:02:08 +03:00
Emux
c991666d97 Tile size based on scale factor, closes #183 2016-09-25 18:58:33 +03:00
Emux
aa3aec0218 Tile source: store tile size, closes #182 2016-09-25 18:24:13 +03:00
Emux
ec4f12b576 Viewport: make default limits public 2016-09-24 15:33:44 +03:00
Emux
1b9e9206cb Render themes: allow custom scaling #67, closes #180 2016-09-24 15:17:09 +03:00
Emux
f9aa723e53 Render themes: scale line stipple #67, fixes #126 2016-09-24 15:16:59 +03:00
Emux
e20196a46a Render themes: fix scaling #67 2016-09-24 15:16:59 +03:00
Longri
f944dab28f Scale some theme elements #178, #67 2016-09-24 15:16:52 +03:00
Longri
f19ab87abe Set scale value for viewport on mapRenderer #176, closes #177 2016-09-23 19:51:41 +03:00
Emux
d937a4d6bb VectorTileLayer: check tile source on detach by @Longri, fixes #175 2016-09-21 13:09:36 +03:00
Emux
5c370cf3ab Update Android Gradle plugin to 2.2.0 2016-09-20 10:24:59 +03:00
Emux
9b460b0f3b Location renderer: fix indicator minimum size #171 2016-09-17 23:01:26 +03:00
Erik Duisters
bc0bbcb4b5 Marker interface: more generics definitions #172 2016-09-17 22:44:59 +03:00
Emux
0c898bf682 Location renderer: use highp in vertex and fragment shaders #171 2016-09-17 20:07:17 +03:00
Emux
50ccecc259 Location renderer: activate all fragment shaders #171 2016-09-17 20:04:55 +03:00
Emux
769dd696e3 Location renderer with many improvements and fixes, closes #171 2016-09-17 20:02:43 +03:00
Erik Duisters
7cdeacd1c2 Marker interface making marker handling more flexible 2016-09-17 17:16:04 +03:00
Emux
3703cf7e00 Deprecate CI server 2016-09-17 15:53:49 +03:00
Emux
2bded1e05f Update project deployment description 2016-09-17 15:38:02 +03:00
Emux
ac6877fcfc Gradle: deprecate iOS jar-with-dependencies artifact #46 2016-09-17 10:59:47 +03:00
Emux
319a1b6663 Overpass API: fix deprecated call 2016-09-17 10:58:02 +03:00
Emux
7427624275 libGDX mouse wheel zoom with pivot, closes #169 2016-09-16 10:09:26 +03:00
Emux
8f58966e9e Render themes: enable more house numbers rules #168 #41 2016-09-16 09:47:51 +03:00
Emux
10060e4001 SNAPSHOT publish: fix repository in docs, #165 2016-09-12 19:53:01 +03:00
Emux
bd8cdd5d6c Gradle: deprecate application plugin, #46 2016-09-12 10:27:15 +03:00
Emux
50d37971b2 Update README.md 2016-09-10 15:46:18 +03:00
Emux
7d56260c12 Fix changelog 2016-09-09 14:35:40 +03:00
Emux
801eda470d SNAPSHOT builds publish to Sonatype OSSRH, closes #165 2016-09-09 13:23:51 +03:00
Emux
1328d050e0 libGDX 1.9.4 update, closes #164 2016-09-08 20:05:41 +03:00
Emux
a7356e5723 Assets render theme, closes #162 2016-09-07 20:28:51 +03:00
Emux
41921aa98d Update integration guide 2016-09-07 10:05:08 +03:00
Emux
7c97ac5101 - Render theme styles, closes #93
- Stream render theme, closes #161
2016-09-06 21:26:18 +03:00
Emux
290aee9a8b Render themes: symbol improvements, #41 2016-09-06 14:46:20 +03:00
Emux
12869c6718 Viewport size change not render map completely, fixes #160 2016-09-06 13:52:21 +03:00
Erik Duisters
ab98b676fc A viewport should also be considered changed if its dimensions have changed. This will cause the tile layer to be rendered correctly after an orientation change. #160 2016-09-06 13:31:17 +03:00
Emux
9c1574eb41 LineStyle: use style from parent graphical primitive 2016-09-04 12:10:16 +03:00
Emux
3d83c188e0 Render theme positive rules building, fixes #156 2016-09-03 22:42:39 +03:00
Emux
164950e399 Render theme schema: fix src pattern, #66 2016-09-03 17:21:09 +03:00
Emux
3a8db9cc7c ScaleBar disappears sometimes fix by Erik Duisters, fixes #155 2016-08-31 09:30:20 +03:00
Emux
b03fe48760 Android 7 Nougat 2016-08-28 20:06:17 +03:00
Emux
33b68fd0d6 libGDX level zoom with keys, fixes #154 2016-08-27 19:00:34 +03:00
Emux
b18dae5bef Samples: fix some folder permissions, #32 2016-08-25 20:05:26 +03:00
Emux
083fe22f08 libGDX marker layer example, #151 2016-08-23 14:05:17 +03:00
Emux
ebd07950a4 libGDX layer gestures, closes #151 2016-08-23 14:03:09 +03:00
Emux
46f4d592d3 GdxMap: remove mandatory tile grid 2016-08-23 12:30:35 +03:00
Emux
dd2f240792 ItemizedLayer API enhancements, #6 2016-08-23 11:26:45 +03:00
Emux
79d209a225 Applications list, closes #150 2016-08-23 10:36:28 +03:00
Emux
55544b97d9 vtm-desktop: enable MSAA, #149 2016-08-22 13:54:13 +03:00
Emux
81f105e2db vtm-android-gdx: enable MSAA, #148 2016-08-22 13:53:53 +03:00
Emux
19338fab3a Shaders: check GL_OES_standard_derivatives extension, fixes #145 2016-08-20 13:28:51 +03:00
Emux
c4d7b30f0d Viewport: enhance toScreenPoint with relative to center option, fixes #81 2016-08-20 13:21:31 +03:00
Emux
4fb8234e2d vtm-http module, closes #140 2016-08-19 22:26:14 +03:00
Emux
99f45bfa22 MapDatabase: avoid additional simplification, fixes #39 2016-08-19 19:43:44 +03:00
Emux
c77e131721 texture_layer shader: check for 0.0 and -0.0 in mod result by @hjanetzek, #139 2016-08-19 13:27:00 +03:00
Andrey Novikov
7355463090 Deprecate base layer, closes #102 2016-08-19 11:39:33 +03:00
Emux
3a1ee523bc texture_layer shader: avoid == in floating point number comparison, fixes #139 2016-08-19 11:17:59 +03:00
Emux
52b362be8b Render themes: fix some symbol names, #41 2016-08-17 20:42:03 +03:00
Emux
1101e894cd Update Gradle 2.14.1, Android plugin 2.1.3, Android Maven plugin 1.4.1 2016-08-16 14:05:55 +03:00
Emux
6e6984f4ed Merge pull request #132 from andreynovikov/set-num-loaders
Set number of loaders
2016-08-15 13:32:33 +03:00
Andrey Novikov
8ce3e2e488 Set number of loaders 2016-08-15 11:39:33 +03:00
Emux
ba913eb484 LWJGL desktop libGDX backend, closes #129 2016-08-14 13:23:41 +03:00
Emux
0d64dfedd4 LineBucket: fix Cap modes, #107, #128 2016-08-13 18:40:47 +03:00
Stephan Leuschner
1fa9f133bd - Add MarkerRendererFactory interface for custom MarkerRenderer
- Enhance MarkerLayer and ItemizedLayer constructors
- Allow setting level to RenderBucket
2016-08-10 14:42:58 +03:00
Stephan Leuschner
67357fe2f0 fire new ANIM_START event when animation is started, do not fire again until all animations are done 2016-08-10 13:56:29 +03:00
Stephan Leuschner
136c323a75 save app context to avoid leaking activity 2016-08-09 12:42:13 +03:00
Emux
1db23decca TileCache: fix samples, improves #112, closes #116 2016-08-09 12:20:47 +03:00
Stephan Leuschner
85adc04a05 fix TileCache, cacheDirectory was ignored 2016-08-09 11:45:16 +03:00
Emux
b434b38872 Samples: fix BitmapLayerTest, #32 2016-08-08 20:00:40 +03:00
Emux
a922ae7e78 Remove some bitmap map sources due to licenses, closes #110 2016-08-08 19:49:14 +03:00
Emux
435cc602a7 Update changelog, #105 2016-08-07 20:07:27 +03:00
Emux
dd7d37c745 Move to master-SNAPSHOT, closes #106 2016-08-07 20:03:23 +03:00
Emux
f55fb501a0 Line texture: use fixed intermediate scaling, #105 2016-08-07 20:03:12 +03:00
Emux
b58dbc6a16 LineBucket: enable Cap modes, fixes #107 2016-08-07 20:02:51 +03:00
Emux
14108fcfe7 Line texture: randomize offset rendering, #105 2016-08-07 20:02:40 +03:00
Emux
b32b5ceb0b Line texture: JTS PathLayer support, #105 2016-08-07 20:02:27 +03:00
Emux
de74719672 Line texture: use highp in vertex and fragment shaders, #105 2016-08-07 20:02:10 +03:00
Emux
a4934a50cd Line texture: fix fragment shader, #105 2016-08-07 20:01:56 +03:00
Emux
c926a714db Line texture: fix scale precision, #105 2016-08-07 20:01:42 +03:00
Emux
88611257f1 Line texture: stipple implementation, PathLayer support, #105 2016-08-07 20:01:19 +03:00
Emux
4a663f949e vtm-jts: PathLayer improvements, #53 2016-08-02 20:10:29 +03:00
Emux
5eae87e892 RobovmLauncher: remove redundant init call, #92 2016-08-02 19:58:10 +03:00
Longri
a9bb6e3788 Graphics API: implement IosCanvas.drawLine(), IosCanvas.fillColor() and IosPaint.getTextHeight(), #92 2016-08-02 19:27:33 +03:00
Emux
f736530049 Samples: fix MarkerOverlayActivity example, #32 2016-08-02 10:40:21 +03:00
Emux
cfa9326e2b Separate layer groups example, #103 2016-08-02 10:09:39 +03:00
Emux
8eff27c303 Update changelog 2016-08-01 20:17:42 +03:00
Emux
0f06f854c7 SimpleMapActivity: fix layers z-order, #103 2016-08-01 20:08:07 +03:00
Andrey Novikov
89198c1a30 Add support for layer groups, closes #103 2016-08-01 20:06:17 +03:00
Emux
8dce91b035 AwtPaint: font kerning improvements, #92 2016-07-28 13:29:55 +03:00
Emux
49a81cbe04 Map scale bar: multi-platform implementation, closes #84 2016-07-28 11:40:41 +03:00
Emux
462be14edb Graphics API enhancements, closes #92 2016-07-28 11:33:40 +03:00
Emux
94c30c1e10 Render themes: minor improvements , #41 2016-07-28 09:35:33 +03:00
Emux
fa637cd202 Update changelog 2016-07-27 19:30:21 +03:00
Emux
42fd941d64 Group layer implementation, closes #99 2016-07-27 19:23:11 +03:00
Emux
6801102631 vtm-android: remove unused classes, #97 2016-07-26 19:25:52 +03:00
Emux
77cf4e7b8f vtm-android & vtm-android-gdx commons, closes #97 2016-07-26 19:16:53 +03:00
Andrey Novikov
6f0a008ffd Apply theme to all vector layers 2016-07-25 22:00:26 +03:00
Emux
70c5812b09 Add Changelog, closes #94 2016-07-24 18:58:13 +03:00
Emux
e39c099bdc Update iOS documentation, #83 2016-07-24 11:46:49 +03:00
Emux
f0a849f4c7 Update Integration Guide documentation, #83 2016-07-24 11:42:52 +03:00
Emux
0f276c52f3 Add Integration Guide documentation, closes #83 2016-07-24 11:28:13 +03:00
Emux
ea36c8c69f Map scale bar: allow scaling its size #84 2016-07-22 14:56:47 +03:00
Emux
b96890b24b Update readme 2016-07-22 14:36:08 +03:00
Emux
1700936872 Default theme: allow buildings rendering without BuildingLayer, fixes #91 2016-07-22 12:15:00 +03:00
Emux
4904eaf2d3 Gradle: improve scripts, #46 2016-07-22 09:55:45 +03:00
Emux
c88b2799b1 vtm-app: update third-party links, #90 2016-07-22 09:10:10 +03:00
Emux
436b66be82 vtm-app: revive / update with latest VTM, closes #90 2016-07-21 22:23:45 +03:00
Emux
c67b35a277 Map scale bar: Android new implementation, #84, closes #88 2016-07-21 15:55:08 +03:00
Emux
4eebbcea2d GLViewport: fix documentation, #87 2016-07-21 13:44:51 +03:00
Emux
faada6625f Screen position for bitmap renderering, closes #87 2016-07-21 13:38:29 +03:00
Emux
52da03ce59 Merge pull request #79 from andreynovikov/bitmap-renderer-screen-offset
Set screen offset for bitmap rendering
2016-07-21 13:34:25 +03:00
Emux
ecb76f9af7 Desktop native libraries split per platform, closes #86 2016-07-21 10:38:34 +03:00
Emux
f1cc7c98b0 Gradle: remove logger properties from produced artifacts, #46 2016-07-21 09:06:40 +03:00
Emux
dde1025e73 Gradle: move logger properties to proper module, #46 2016-07-20 22:53:08 +03:00
Emux
8a2afd7b40 Android native libraries complete collection, closes #85 2016-07-20 21:46:39 +03:00
Emux
243aca9ae9 Gradle: simplify tasks, #46 2016-07-20 19:04:04 +03:00
Emux
d01c3eecf3 vtm-android: remove unused resources 2016-07-20 19:00:13 +03:00
Emux
942ed10344 Gradle: improve dependencies hierarchy, #46 2016-07-19 21:56:37 +03:00
Emux
938e8167dc vtm-ios: remove redundant dependencies, #29 2016-07-19 21:17:06 +03:00
Emux
8b599dbf53 Android samples: remove Android Support dependencies, #32 2016-07-19 20:49:58 +03:00
Emux
11f02128e6 Jar with dependencies, closes #82 2016-07-19 20:15:12 +03:00
Emux
440ae04a7e SVG symbols: improve documentation, #74 2016-07-19 15:58:56 +03:00
Emux
3d6cad1a0c SVG symbols: allow custom creation, #74 2016-07-19 15:50:54 +03:00
Emux
21ea5a7842 Render themes: SVG resources on iOS, improves #69 2016-07-19 14:43:38 +03:00
Longri
4c5de7453d Render themes: SVG resources on iOS 2016-07-19 14:25:35 +03:00
Andrey Novikov
418329441f Set screen offset for bitmap rendering 2016-07-19 12:24:37 +03:00
Emux
166b0ab772 MarkerItem: make properties mutable, closes #78 2016-07-19 11:43:26 +03:00
Emux
5fb07499a7 BoundingBox: make mutable, closes #58 2016-07-19 11:13:05 +03:00
Emux
c8ff7a9e07 MapEventLayer: avoid unnecessary Move events, #76 2016-07-19 11:03:12 +03:00
Andrey Novikov
a8b341763e GeoPoint: bearing calculation 2016-07-19 10:55:17 +03:00
Emux
bb95008197 MapEventLayer: reuse MapPosition instance, improves #76 2016-07-19 10:32:20 +03:00
Emux
e08966c418 Merge pull request #76 from andreynovikov/move-event
Add event for moving map by user
2016-07-19 10:25:48 +03:00
Emux
7347844c48 DefaultSources: add copyright notice, #75 2016-07-19 09:57:37 +03:00
Emux
d9c65a92ba Merge pull request #75 from andreynovikov/default-sources
New and fixed default bitmap sources
2016-07-18 19:32:24 +03:00
Emux
05184e7f5f SVG symbols custom default size, closes #74 2016-07-18 19:21:34 +03:00
Andrey Novikov
68c72437b4 Add event for moving map by user 2016-07-18 19:16:32 +03:00
Andrey Novikov
561ec4be85 New and fixed default bitmap sources 2016-07-18 19:09:03 +03:00
Emux
a5679ce214 Bitmap.getPngEncodedData improvements, PR #71 2016-07-18 11:06:03 +03:00
Longri
44b40608f6 Bitmap: get png encoded data implementation 2016-07-18 11:06:03 +03:00
Emux
fab7020d3d vtm-android-gdx: make example dpi aware, fixes #70 2016-07-17 16:51:56 +03:00
Emux
7f42be2d67 MarkerSymbol: remove redundant bitmap array 2016-07-17 16:19:53 +03:00
Emux
3fc1583649 Render themes: add SVG symbols collection, closes #68 2016-07-16 21:49:03 +03:00
Emux
726d825e07 IosGraphics: loadBitmapAssetImpl as other platforms, #29 2016-07-16 21:49:03 +03:00
Emux
1d46b2f63a Render themes: allow caption symbols without texture atlas, #64 2016-07-16 21:49:03 +03:00
Emux
1cfae3a47f Render themes: scale 'dy' rendering instruction, #67 2016-07-16 21:48:47 +03:00
Emux
fed2cd05e4 Render themes: SVG resources, closes #60 2016-07-16 21:42:42 +03:00
Emux
9b4cf470f9 Render themes: support location prefixes in resources, closes #66 2016-07-16 21:42:42 +03:00
Emux
73bc26dd2d Render themes: read resources from files, besides assets, closes #65 2016-07-16 21:42:42 +03:00
Emux
57a152d0aa Render themes: allow symbols without texture atlas, closes #64 2016-07-16 21:42:42 +03:00
Emux
081e6b8f2b vtm-ios: remove some IDE generated comments, #29 2016-07-16 21:42:27 +03:00
Emux
ba00a5384d Render themes: texture atlas separation, closes #59 2016-07-13 20:23:35 +03:00
Emux
43ca550832 Improve code / xml formatting, #54 2016-07-12 19:53:47 +03:00
Emux
e793e8851b Improve code / xml formatting, closes #54 2016-07-09 19:45:23 +03:00
Emux
7919d0ab9c Update gitignore 2016-07-07 22:25:33 +03:00
Emux
915046fb9a Samples: various improvements, #32 2016-07-07 21:06:11 +03:00
Emux
37ace257cf Create vtm-jts module, closes #53 2016-07-07 20:16:33 +03:00
Emux
e74052c164 vtm-jeo: use https in repository, #52 2016-07-07 18:59:08 +03:00
Emux
c02cf5792f Update vtm-jeo module, closes #52 2016-07-07 14:05:15 +03:00
Emux
51f3e2368b Mapzen vector tiles: fix example, provide vtm-stylesheet, #50 2016-07-06 17:24:29 +03:00
Emux
7a88524343 Add vector tile api key parameter, closes #49 2016-07-06 17:12:48 +03:00
Emux
dfe4a10bf0 GeoJSON vector tiles: add road labels, #48 2016-07-06 15:25:38 +03:00
Emux
1882806b05 OsmJson sample: more improvements, #32 2016-07-05 22:20:34 +03:00
Emux
5d56d81d83 Android samples: fix OsmJson, #32 2016-07-05 21:56:33 +03:00
Emux
0061b3ae7e Android samples: improve implementation, #32 2016-07-05 21:54:18 +03:00
Emux
11caa2a2d3 Update gitignore 2016-07-05 19:30:08 +03:00
Emux
48d6b3e5ba Gradle: add missing logger in vtm-tests, #46 2016-07-05 19:25:19 +03:00
Emux
178c88c20c vtm-android-gdx: disable apk artifact deployment, #46, #44 2016-07-04 23:32:27 +03:00
Emux
d6a65ff731 Normalize all the line endings 2016-07-04 20:58:33 +03:00
Emux
53cafa2f3b Merge pull request #47 from Longri/fix-iOS-native
Link to new native folder. Don't copy to build folder
2016-07-04 20:34:40 +03:00
Longri
122618c00a Link to new native folder. Don't copy to build folder 2016-07-04 18:38:49 +02:00
Emux
c389abc7a2 Native libraries publishing artifacts, closes #43 2016-07-04 16:07:58 +03:00
Emux
b3217ae2c0 vtm-android-gdx: add as dependency module and in deployment, #46, #44 2016-07-04 15:12:56 +03:00
Emux
234bd625e9 gitattributes: dealing with line endings 2016-07-04 14:18:02 +03:00
Emux
2a50f89b90 Use a main gitignore 2016-07-04 14:14:08 +03:00
Emux
bb7aa34905 Gradle: add missing Android loggers, #46 2016-07-04 11:30:06 +03:00
Emux
59f74664a2 Update documentation 2016-07-04 10:42:50 +03:00
Emux
7a1d56d888 Samples: various improvements, #32 2016-07-03 23:40:05 +03:00
Emux
6b69c9cf94 Automated Gradle project deployment to Sonatype OSSRH, closes #44 2016-07-03 22:03:22 +03:00
Emux
9dfb2678c4 Automated Gradle project deployment to Sonatype OSSRH, closes #44 2016-07-03 21:58:11 +03:00
Emux
7e24b9cf4a Automated Gradle project deployment to Sonatype OSSRH, closes #44 2016-07-03 21:51:53 +03:00
Emux
507f9eca1e Disable doclint in JDK 8 Javadoc, closes #45 2016-07-03 21:05:58 +03:00
Emux
eca77a0afc Gradle build refactoring, closes #46 2016-07-03 20:43:32 +03:00
Longri
11d7002841 Enable / fix iOS module, closes #29 2016-06-28 21:41:23 +03:00
Emux
2b171739aa Render themes: text size improvements, #41 2016-06-27 22:10:35 +03:00
Emux
0953862f72 Render themes: text size improvements, #41 2016-06-27 21:45:12 +03:00
Emux
d719542018 Samples: improve MapsforgeMapActivity, #32 2016-06-27 13:32:55 +03:00
Emux
d4c6a0730d Mapsforge: deprecate water tiles rendering, closes #40 2016-06-27 12:27:56 +03:00
Emux
314c2df66b Samples: map file as command-line argument in MapsforgeTest, #32 2016-06-26 11:32:00 +03:00
Emux
9cc2aad1ec Samples: add debug grid in MapsforgeMapActivity, #32 2016-06-25 20:07:45 +03:00
Emux
d7ec1e0ac3 MapDatabase: avoid oversimplification for Mapsforge land polygons, closes #39 2016-06-25 20:07:25 +03:00
Emux
af9481d084 Mapsforge render themes: add sea & nosea tags with tessellation, remove coastline, remove water tile outline, closes #38 2016-06-25 20:06:54 +03:00
Emux
9b7d893fd5 Render themes: add tessellation option in area style, closes #37 2016-06-25 20:06:36 +03:00
Emux
d97511e1e1 VectorTileLoader: use mesh layer and tessellation option, closes #36 2016-06-25 20:06:04 +03:00
Emux
9bd1cd1159 Mapsforge: heuristic determine if a map element is an area, closes #35 2016-06-25 20:05:48 +03:00
Emux
d5954d350f Mapsforge: multilingual vector map files v4, closes #34 2016-06-25 20:05:07 +03:00
Emux
bbdc431b9a GdxMapApp: reduce default size 2016-06-25 15:15:23 +03:00
Emux
7b00161184 Fix Travis builds 2016-06-23 13:50:10 +03:00
Emux
bb8dd4db7c Mapsforge: add unread POI tags, fixes #33 2016-06-23 09:43:19 +03:00
Emux
1bfd76c3da Improve various samples examples, #32 2016-06-22 22:25:14 +03:00
Emux
d2f61f9bfa Native libs: name with platform suffix, #14, #16 2016-06-21 19:19:56 +03:00
Emux
dc46238af6 Add how to contribute to readme 2016-06-20 13:28:36 +03:00
Emux
adb217734f Update readme 2016-06-20 13:15:41 +03:00
Emux
e403c45fa3 Revert to default gradle.properties 2016-06-20 13:09:20 +03:00
Emux
4383726e55 Add guidelines for repository contributors 2016-06-20 13:03:43 +03:00
Emux
6e6e423c74 LineRenderTest: show 4th example, fixes #30 2016-06-19 23:31:41 +03:00
Emux
29dfb241fb Render themes improvements / fixes, closes #27 2016-06-19 13:18:26 +03:00
Emux
ae1d4fd5d9 Render theme XSD improvements / fixes, closes #26 2016-06-19 13:14:36 +03:00
Emux
726f91556c Update themes for new xsd position, #25 2016-06-19 12:06:26 +03:00
Emux
278661e569 XML schema definitions repositioning, closes #25 2016-06-19 11:36:56 +03:00
Emux
fc4c9cf9bf Update readme 2016-06-18 20:42:03 +03:00
Emux
958dfb8166 Gradle: remove sources artifact 2016-06-18 20:10:02 +03:00
Emux
f3d4a8ef7d Fix vtm-tests 2016-06-18 19:53:56 +03:00
Emux
b726f5b6a8 Add license badge 2016-06-18 19:21:00 +03:00
Emux
8f8d0534b2 Add Travis badge, #24 2016-06-18 19:13:04 +03:00
Emux
58354155f6 Travis continuous integration, #24 2016-06-18 17:34:18 +03:00
Emux
891efed6e6 Remove external git submodule 'vtm-ext-libs', closes #23 2016-06-18 17:05:01 +03:00
Emux
34c0cee0ca Remove external git submodule 'appcompat', closes #22 2016-06-18 16:44:46 +03:00
Emux
7e891c452a vtm-tests: remove Maven plugin in build.gradle 2016-06-18 16:30:28 +03:00
Emux
16ae323731 Clear settings gradle 2016-06-18 16:23:14 +03:00
Emux
eb58dc9e67 vtm-playground: fix assets in build.gradle 2016-06-18 16:18:02 +03:00
Emux
bf370bceb7 SharedModel: make compatible with latest libGDX, improves #19, closes #13 2016-06-18 14:04:28 +03:00
Longri
d1fd03a52f fix libgdx compatibele to run tests from playground 2016-06-18 12:53:29 +03:00
Emux
f7f20f486e vtm-android-start: add proper application theme, fixes #18 2016-06-17 22:53:42 +03:00
Emux
8a34908f36 vtm-android-gdx example: add stencil buffer, fixes #17 2016-06-17 22:42:17 +03:00
Emux
cf4ff8046d libGDX Android native libraries, closes #16 2016-06-17 22:35:26 +03:00
Emux
3ea5af2477 VTM native libraries for Android and Desktop (Win, Mac, Linux), closes #14 2016-06-17 21:47:36 +03:00
Emux
e85ec48468 ViewController: moveTo respects Viewport limits, fixes #12 2016-06-17 15:14:07 +03:00
Emux
7a952cdaf9 Viewport: add movement limits public API, closes #11 2016-06-17 15:07:13 +03:00
Emux
c8f74e649e MapEventLayer: complete gestures public API, closes #10 2016-06-17 15:01:22 +03:00
Emux
c238916d89 MapPosition: update also zoomLevel in setByBoundingBox, fixes #9 2016-06-17 14:54:15 +03:00
Emux
a06973241c InputHandler: desktop keyboard shortcuts improvements / fixes, closes #8 2016-06-17 14:46:50 +03:00
Emux
b8d382a9f3 Android / AWT interfaces improvements, closes #7 2016-06-17 13:08:30 +03:00
Emux
35d8d2d57e ItemizedLayer: use getters for accessing the items, closes #6 2016-06-17 12:21:58 +03:00
Emux
92c10edb11 GLState: workaround for canvas resize artifacts on desktop, fixes #5 2016-06-17 11:57:54 +03:00
Emux
ec4fa0ed5f GridRenderer: change tile grid form to z/x/y, closes #4 2016-06-17 11:43:25 +03:00
Emux
7af0be9af7 BuildingLayer: translucent buildings option, closes #3 2016-06-17 11:22:18 +03:00
Emux
0a465abbfe GLUtils: workaround for texture memory leaks on desktop, fixes #2 2016-06-17 11:09:03 +03:00
Emux
e0f02323bb Update libGDX to 1.9.3 2016-06-16 16:40:45 +03:00
Emux
9022ec14ec Update Gradle and Android, build improvements. Closes #1 2016-06-16 13:04:00 +03:00
Hannes Janetzek
adc04ace7f Update build.gradle 2015-06-18 01:55:22 +02:00
Hannes Janetzek
e3fdaff470 fix build 2015-06-18 01:23:35 +02:00
Hannes Janetzek
7f5577ff24 android-example: add VectorLayerActivity 2015-06-18 00:50:54 +02:00
Hannes Janetzek
b174f65122 added drawing api
add GeomBuilder, needs Jts

drawing_api: squashed

drawing_api: use JtsDrawable baseclass

- add makeCircle for testing

drawing_api: cleanups

drawing_api: refactor

drawing_api: use SpatialIndex

drawing_api: optimization + cleanup

drawing_api: VectorLayer

- use VectorLayer for PathLayer

drawing_api: make style builder more consistent with theme api

drawing_api: wip
2015-06-18 00:17:01 +02:00
Hannes Janetzek
3402308ced Viewport: remove BoundingBox utility function 2015-06-18 00:17:01 +02:00
Hannes Janetzek
1ea26e576e Map: add getBoundingBox 2015-06-18 00:17:01 +02:00
Hannes Janetzek
231d596b69 Box: add utils and check min < max in constructor
sq: Box utils
add Box utils
fixup: Box
2015-06-18 00:17:01 +02:00
Hannes Janetzek
c0ece9dd7d spatialindex
add SpatialIndex clear()

docs: QuadTree

wip: SpatialIndex
2015-06-18 00:17:01 +02:00
Hannes Janetzek
c29c85db41 VectorTileLayer: rename hook function: render->process 2015-06-18 00:17:01 +02:00
Hannes Janetzek
0814a06d42 GeometryBuffer: add simple Constructor
- add makeCircle util
- return this on clear()
2015-06-18 00:17:00 +02:00
Hannes Janetzek
9642c8c5aa extract QueryResult from ITileDataSink 2015-06-18 00:17:00 +02:00
Hannes Janetzek
ff630fdcfa configure viewport extents
ref #156
close #45
2015-06-18 00:14:28 +02:00
Hannes Janetzek
d492358a94 sync viewport 2015-06-18 00:13:43 +02:00
Hannes Janetzek
6f85e24ed9 Viewport screen-pivot + extent option 2015-06-18 00:13:38 +02:00
Hannes Janetzek
da93f0ab72 GdxMapApp: reduce default fps 2015-06-18 00:09:27 +02:00
Hannes Janetzek
b1cfdfd454 android: remove MapActivity
- see vtm-android-start for an example use of MapView
- add MapPreferences

- update android-start
- android-example: use appcompat actionbar
2015-06-18 00:09:27 +02:00
Hannes Janetzek
0c5a7e7aa6 android: refactor MapView
- merge AndroidMap + GLView into Mapview
- let MapView directly extends GLSurfaceView
2015-06-18 00:09:27 +02:00
Hannes Janetzek
e1c1a20074 ViewController: clamp tilt in setPosition 2015-06-18 00:09:27 +02:00
Hannes Janetzek
dfc1aeb98f Animator: animation end event 2015-06-18 00:09:27 +02:00
Hannes Janetzek
8626aa2f53 api: no more sync'ed Viewport methods
- remove synchronized viewport methods: viewport MUST only be changed on main-thread
- when calling Map.setPosition() from another thread the position will be applied
  on the next main-loop iteration
2015-06-18 00:09:27 +02:00
Hannes Janetzek
381907526e fix: use same precision in vertex and fragment shaders
should fix #153
2015-06-18 00:07:20 +02:00
Hannes Janetzek
d8fb724d61 Update README.md
drop somewhat generic library name
2015-06-01 19:38:02 +02:00
Hannes Janetzek
de7c203926 use highp for all vertex shaders 2015-04-22 09:11:28 +02:00
Hannes Janetzek
c3cf288548 disable use of glBufferSubData for all adreno 3xx
- should fix the issue reported for galaxy 4 mini
2015-04-22 06:37:28 +02:00
Hannes Janetzek
1bb112e685 fix: line shader must have highp 2015-04-22 06:33:06 +02:00
Hannes Janetzek
00ceb9f359 fix overflow: use int offsets in TextureItem
should fix #144

- using quad-indices the offsets are not limited to max vertex ids
2015-03-19 14:16:56 +01:00
Hannes Janetzek
35c22e68dc update gradle, fix #142 jeo dependencies
- featuring: travis makin trouble
2015-03-19 14:16:35 +01:00
Hannes Janetzek
ecc26caec0 example: add MapScaleBar 2014-12-04 00:43:53 +01:00
Hannes Janetzek
d32b13fed4 fix: GLViewport.useScreenCoordinates
- fixes: MapScaleBar not being visible
2014-12-04 00:41:03 +01:00
Hannes Janetzek
711ca7f6d9 gradle: more fun 2014-11-20 01:01:27 +01:00
Hannes Janetzek
aaec15a66a gradle: fix vtm-android install + generate source jars 2014-11-20 00:27:48 +01:00
Hannes Janetzek
77f383913d fix: lost labels 2014-11-20 00:26:42 +01:00
Hannes Janetzek
e6d42a5a61 gradle: warn when submodules are missing
- sth better than 'Configuration with name 'default' not found'
2014-11-17 19:00:28 +01:00
Hannes Janetzek
ef391a3994 gradle: update android tooling 2014-11-17 18:51:22 +01:00
Hannes Janetzek
6c98e600bc example: add building layer to mapforge example 2014-11-12 06:40:13 +01:00
Hannes Janetzek
1d5fa4b9db mapsforge: remove duplicate points 2014-11-12 06:38:58 +01:00
Hannes Janetzek
a492aaa733 GeometryBuffer: add simplify() method 2014-11-12 06:38:29 +01:00
Hannes Janetzek
424126216c fix: Viewport.getDepth() for y == 0 2014-11-12 05:39:01 +01:00
Hannes Janetzek
c3ac8a412c PolygonBucket: dont test bbox visibility with overzoom > 2
- workaround: seems there can be some overflow in GLMatrix.prj2d()
2014-11-12 05:38:36 +01:00
Hannes Janetzek
3178787954 mapsforge: refactor MapDatabase
Conflicts:
	vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java
2014-11-12 05:38:36 +01:00
Hannes Janetzek
4fdae2a94c mapsforge: also need to clip lines to avoid overflow 2014-11-12 05:38:36 +01:00
Hannes Janetzek
68fe1f8b8a mapsforge: estimate whether a closed way is line or polygon
- refactor projection
- cleanups
2014-11-04 19:02:43 +01:00
Hannes Janetzek
ef34ba9766 fix: dont limit tile overzoom 2014-11-04 19:01:42 +01:00
Hannes Janetzek
bf2909585b gradle: update GWT 2014-11-03 01:36:24 +01:00
Hannes Janetzek
a85b435fb6 remove zoomMin/zoomMax from TileManager constructor 2014-11-03 01:36:03 +01:00
Hannes Janetzek
4c78f8652b fix: UrlTileSource.Builder was hiding zoom values from TileSource.Builder
- values set thorugh builder.minZoom()/maxZoom() were ignored

should fix: #120
2014-11-03 01:32:56 +01:00
Hannes Janetzek
f4ffac44d2 gradle: update to 2.1 and android targetSdk 21
- add android-appcompat subproject
2014-10-24 21:38:47 +02:00
Hannes Janetzek
0bc45dfd74 fix: polygon texture default fill 2014-10-13 23:36:34 +02:00
Hannes Janetzek
df909daccb theme: tweaks 2014-10-10 20:33:18 +02:00
Hannes Janetzek
fa62602826 Canvas: pass fill+stroke for drawing text 2014-10-10 19:58:14 +02:00
Hannes Janetzek
a8641ce535 playground: mapzen style map 2014-10-10 18:07:43 +02:00
Hannes Janetzek
bbe6067569 fix: show tiles at the highest scale
need to investigate the real cause..
2014-10-10 17:31:48 +02:00
Hannes Janetzek
f7b539f5c7 updated default theme:
- use textures for slight roughness of 'natural' features
- increase font size
2014-10-10 17:31:48 +02:00
Hannes Janetzek
78d438dfe6 pass fx option with S3DBLayer constructor 2014-10-10 17:31:48 +02:00
Hannes Janetzek
a098e669c3 ExtrusionLayer: animate when loaded 2014-10-10 17:31:48 +02:00
Hannes Janetzek
3f3dca30d7 add Color.isOpaque util 2014-10-10 17:31:47 +02:00
Hannes Janetzek
7b9301d479 PolygonBucket: enable fade and tinting of textured polygons 2014-10-10 17:31:47 +02:00
Hannes Janetzek
01a41d5f87 android-example: reenable cache.. 2014-10-10 17:31:47 +02:00
Hannes Janetzek
0b1fba58bb fix: AreaStyle blend 2014-10-10 17:31:47 +02:00
Hannes Janetzek
29f19b36ce wip: StyleBuilder 2014-10-10 17:31:47 +02:00
Hannes Janetzek
1ded32d303 fixup: area fade 2014-10-10 17:31:47 +02:00
Hannes Janetzek
ffe14e11d5 bring vtm-android-gdx back to life 2014-10-10 17:31:47 +02:00
Hannes Janetzek
846d90f9fe nicer gl api
- java class name should suffice as namespace
- also use import static gl instance seems to work now with Gwt
2014-10-10 03:23:37 +02:00
Hannes Janetzek
b2008aa086 use MAX_INDICES with bindQuadIndices() 2014-10-10 03:23:30 +02:00
Hannes Janetzek
b0ee833301 wip: Bucket API 2014-10-10 03:23:17 +02:00
Hannes Janetzek
9d86c6306d VertexData: float params add() versions 2014-10-10 03:23:06 +02:00
Hannes Janetzek
03f6f96988 add option for non-billboard MarkerSymbols 2014-10-10 03:22:34 +02:00
Hannes Janetzek
113ea64297 TileManager: allow setting zoomlevel-switch thresholds 2014-10-09 10:11:51 +02:00
Hannes Janetzek
7f2f798a94 fix: 'load parent by default'
- dont load parent when using zoom-level table
- only load parent when over-scale is less than 1.5
2014-10-09 10:01:45 +02:00
Hannes Janetzek
de04030257 android-example: enable building layer 2014-10-09 04:01:58 +02:00
Hannes Janetzek
7053cf8405 android: convert unsupported bitmap formats
- might fix png8 on older devices
2014-10-09 03:44:05 +02:00
Hannes Janetzek
ded178be6c TileManager: just drop index on re-init
- dont modify index of locked tiles..
- fixes one more bug from monkey test
2014-10-09 03:19:03 +02:00
Hannes Janetzek
d1daa92126 TileManager: load parent by default 2014-10-09 03:11:08 +02:00
Hannes Janetzek
5a4e422740 fix: TileGridLayer without text
- lines were not set..

fixes #111
2014-10-04 19:52:19 +02:00
Hannes Janetzek
9b5d31bcf3 useless sync 2014-10-03 07:30:01 +02:00
Hannes Janetzek
de24860ad4 dead is dead 2014-10-03 07:30:01 +02:00
Hannes Janetzek
1a4ec3f7ad fix: one more missing sync 2014-10-03 07:29:51 +02:00
Hannes Janetzek
8f6f1bf238 android monkey tests 2014-10-03 05:19:13 +02:00
Hannes Janetzek
82525ec769 limit OSciMap min zoom-level 2014-10-03 05:19:13 +02:00
Hannes Janetzek
26cb2e6603 simplify PausableThread
- make pausing work properly
2014-10-03 05:19:13 +02:00
Hannes Janetzek
33c645e888 close UrlTile conn on cancel
- synchronize connect() and close()
2014-10-03 05:19:12 +02:00
Hannes Janetzek
71715dccd9 fixing MapTile state logic 2014-10-03 05:19:12 +02:00
Hannes Janetzek
5f9a9cc909 TileLoader/TileDataSource: add cancel() method
- used to force closing sockets when changing theme or tilesource
2014-10-03 05:19:12 +02:00
Hannes Janetzek
41085f915e LwHttp: increase timeouts
- wip: HttpEngine docs
2014-10-01 10:00:10 +02:00
Hannes Janetzek
5109eda6da fix: TileManager reload failed tiles
- properly clear previous TileSet
- CANCEL state tiles will be cleared when they return from tile-worker
2014-10-01 09:59:55 +02:00
Hannes Janetzek
e20a342f81 fix: PolygonBucket screen intersection test
- actually make a box
2014-10-01 09:59:40 +02:00
Hannes Janetzek
85377b42c4 fix: use fadeTime from original tile 2014-09-20 06:16:27 +02:00
Hannes Janetzek
cb3296ebdd playground tests 2014-09-20 02:23:32 +02:00
Hannes Janetzek
a8400dd48a TileManager:
- set zoomMin/Max for current TileSource
- add zoom-level switch threshold
- add TileManager.getTile()
- remove releaseTiles()
- extract JobCompletedEvent from anonymous class
2014-09-20 02:23:32 +02:00
Hannes Janetzek
3fa121d31a VectorTileLoader: dont add faded out polygon layers 2014-09-20 02:23:31 +02:00
Hannes Janetzek
8303a611ea TileRenderer: get correct fade-time for proxies 2014-09-20 02:23:31 +02:00
Hannes Janetzek
2aa75ddbf5 MeshBucket: add special add() for convex polygon 2014-09-20 02:23:31 +02:00
Hannes Janetzek
b5214ef35a MeshBucket: use blend/fade color 2014-09-20 02:23:31 +02:00
Hannes Janetzek
e32f45b585 S3DB/Buildings:
- allow multiple building extrusion buckets per tile
  (differently colored buildings depending on tags)
- fixed ExtrusionBucket index offsets
- rename more layer -> bucket
2014-09-20 02:23:31 +02:00
Hannes Janetzek
84c094000b OffscreenRenderer: use depthTexture for SSAO modes 2014-09-20 02:23:31 +02:00
Hannes Janetzek
3577e648d1 make LayerRenderer methods public to enable composition 2014-09-20 02:23:31 +02:00
Hannes Janetzek
c632b865b0 PolygonBucket: reenable per bucket visibility test 2014-09-20 02:23:31 +02:00
Hannes Janetzek
33c48b3d53 BucketRenderer: add default implementation for update()
- handy for simple (debug) layers
2014-09-20 02:23:30 +02:00
Hannes Janetzek
2317975c63 RenderBuckets: add clearBuckets 2014-09-20 02:23:30 +02:00
Hannes Janetzek
b031f98fff fixup: layer -> bucket variable names 2014-09-20 02:23:30 +02:00
Hannes Janetzek
b057c56466 fix: BucketRenderer unified base/tex buckets 2014-09-20 02:23:30 +02:00
Hannes Janetzek
a60f326e16 RenderBuckets: optimization
- start search from current when searched level is greater than current
2014-09-20 02:23:30 +02:00
Hannes Janetzek
66653df3dc fix: dont let TextureBuckets interfere with other bucket 'levels'
- make TextureLayer.textures protected
2014-09-20 02:23:30 +02:00
Hannes Janetzek
3a30476f7e GLState: track buffer bindings
- reset buffer bindings at frame start
2014-09-20 02:23:30 +02:00
Hannes Janetzek
3f8b028d60 RenderBuckets: unify baseBuckets and textureBuckets
... finally
2014-09-20 02:23:30 +02:00
Hannes Janetzek
f6d85ce8bd refactor: rename render 'layers' to 'buckets'
- the name I was looking for for a long time :)
  also less confusion with map layers
- move renderer.elements -> renderer.bucket
- rename RenderBuckets functions
- rename BucketRenderer.layers -> buckets
2014-09-20 01:31:07 +02:00
Hannes Janetzek
b4a567884f unify Indexed- and RenderElement
- remove IndexedRenderElement

- ExtrusionLayer: clear temporary data in prepare()
  - ie. dont wait to release shared Vertexs until compile()
- ExtrusionLayer: make naming consistent with ElementLayers
  - in particular use of 'numIndices', 'numVertices'
2014-09-20 01:31:06 +02:00
Hannes Janetzek
8741357c9a GL20: fix parameter name indices -> offset 2014-09-20 01:31:06 +02:00
Hannes Janetzek
20afbfe230 use new Tessellator for Mesh- and ExtrusionLayer 2014-09-20 01:31:06 +02:00
Hannes Janetzek
7db70f239f jni: new Tesselator 2014-09-20 01:31:06 +02:00
Hannes Janetzek
59ab24da90 jni: add GLMatrix proj2d/3d 2014-09-20 01:07:03 +02:00
Hannes Janetzek
c34bc3306c RenderElement: docs 2014-09-20 01:07:03 +02:00
Hannes Janetzek
31a45b0468 add ElementLayer/RenderElement prepare()
- used to prepare for compile() when all layer data is added
2014-09-20 01:07:03 +02:00
Hannes Janetzek
990e04477c GeometryBuffer: switch to int[] indices 2014-09-20 01:07:03 +02:00
Hannes Janetzek
7be8155939 GeometryBuffer:
- add getPoint(i, point)
- addPoint(PointF)
- getPointX/Y

GeomBuffer: api
2014-09-20 01:07:03 +02:00
Hannes Janetzek
d6cf845fef PolygonLayer optimizations:
- check of polygon elements are visible
- use AreaStyle.hasAlpha() to enable blending
- GLState.testDepth()
- LineClipper: add outcode(x,y)
2014-09-20 01:07:03 +02:00
Hannes Janetzek
01830707dc MapRenderer: refactor native buffer utils 2014-09-20 01:07:02 +02:00
Hannes Janetzek
a835d44187 VertexData: docs
- remove superfluous static get()
2014-09-20 01:07:02 +02:00
Hannes Janetzek
123b0aa098 renderer: cleanups 2014-09-20 01:07:02 +02:00
Hannes Janetzek
e645696adb MapRenderer: increase shared quad vertices 2014-09-20 01:07:02 +02:00
Hannes Janetzek
e830252c85 wip: use HairLine for PolygonLayer outlines 2014-09-20 01:07:02 +02:00
Hannes Janetzek
7bf2544a83 PolygonLayer: cleanups 2014-09-20 01:07:02 +02:00
Hannes Janetzek
b69923e05d PolygonLayer: separate drawing of stencil clip region 2014-09-20 01:07:02 +02:00
Hannes Janetzek
3cd2f9ea47 add HairlineLayer 2014-09-20 01:07:02 +02:00
Hannes Janetzek
f390a903dc use common vertexItems field in ExtrusionLayer 2014-09-20 01:07:02 +02:00
Hannes Janetzek
033a0d9c9d let MeshLayer extend IndexedRenderElement 2014-09-20 01:07:02 +02:00
Hannes Janetzek
8c13a82df7 add IndexedRenderElement 2014-09-20 01:07:02 +02:00
Hannes Janetzek
59dd9425c8 refactor: move compileVertexItems() to RenderElement
- rename addPoolItems -> compileVertexItems
2014-09-20 01:07:01 +02:00
Hannes Janetzek
9f8a383ce6 gradle: update jeo repo url 2014-09-20 01:03:40 +02:00
Hannes Janetzek
530e2b7cb4 gradle: switch to my jeo repo for now 2014-09-16 13:14:46 +02:00
Hannes Janetzek
c311004bd8 use global sync for all tiles managed in TileSets
TODO should be removed together TileRenderer.getVisibleTiles()
2014-09-16 11:59:00 +02:00
Hannes Janetzek
0c245f4f6d refactor: MapTile et al
- cleanup proxy draw logic in VectorTileRenderer
- fixes upload of child proxies in TileRenderer
2014-09-16 11:59:00 +02:00
Hannes Janetzek
7779e30635 TileIndex: find the tile at z=0...
- should fix #91
2014-09-16 00:57:44 +02:00
Hannes Janetzek
707769f124 TextureItem: allow cloning uninitialized textures
- TextureRegion: use texture handle, not atlas.texture
- update SymbolLayer

- TextureAtlas: remove depth
2014-09-11 21:00:27 +02:00
Hannes Janetzek
5a0f10559d increase label Texture size 2014-09-11 21:00:27 +02:00
Hannes Janetzek
af3ee3a742 use text texture size for buffered gdx/awt image loading 2014-09-11 21:00:27 +02:00
Hannes Janetzek
52813ea29f sed 's/m\(in\|ax\)\(X\|Y\)/\L\2m\1/g' 2014-09-11 21:00:26 +02:00
Hannes Janetzek
c48c620963 BoxTree:
- return false from search() when search callback returned false
- fix removal: unlink next item
- add clearToPool()
2014-09-11 21:00:26 +02:00
Hannes Janetzek
64068730db add missing LineBuilder.fixed(bool) 2014-09-11 21:00:26 +02:00
Hannes Janetzek
95c9f47e63 refactor: hide backend Adapter handles
- static methods for backend adapters
2014-09-11 21:00:26 +02:00
Hannes Janetzek
84968d201d android: use confirmed tap gesture
- otherwise tap conflicts with double tap zoom..
2014-09-11 21:00:26 +02:00
Hannes Janetzek
6d690ff5af android: enable GLSurfaceView debug flags with GLAdapter.debug 2014-09-11 21:00:26 +02:00
Hannes Janetzek
a97b3283a0 add TileSource.Builders 2014-09-11 21:00:26 +02:00
Hannes Janetzek
67336e0c93 implement okhttp response caching
based on patch from: Baldur Gudbjornsson <baldur.gudbjornsson@gmail.com>
2014-09-11 21:00:26 +02:00
Hannes Janetzek
691a18873d HttpEngine: throw exception instead of null return in conn.read()
- convert OkHttps FileNotFound to some more useful exception
2014-09-11 21:00:25 +02:00
Hannes Janetzek
47b2a55b11 gdx: add keys for scale and tilt 2014-09-04 02:32:36 +02:00
Hannes Janetzek
243af371be switch to libgdx-jglfw desktop backend 2014-09-04 02:32:36 +02:00
Hannes Janetzek
3c281e8824 use libgdx 1.2 2014-09-04 02:32:36 +02:00
Hannes Janetzek
a849b30efe forward MapActivity stop/resume to MapView 2014-09-04 02:28:15 +02:00
Hannes Janetzek
d42302a150 update webgl map link 2014-09-04 00:07:07 +02:00
Hannes Janetzek
3aac9272ee update readme 2014-09-04 00:02:05 +02:00
Hannes Janetzek
a8ed9b80ef document Map events 2014-09-03 23:49:23 +02:00
Hannes Janetzek
2e5ff2e4a4 TileCache: close db cursor when result is empty 2014-09-03 22:39:15 +02:00
Hannes Janetzek
f7a98017b1 TileCache: remove unused size field 2014-09-03 22:39:15 +02:00
Hannes Janetzek
bb5cf608a6 cannot test OkHttp close atm 2014-08-13 23:10:14 +02:00
Hannes Janetzek
c2a5ad4104 avoid network on main-thread exception with OkHttp 2014-08-13 23:10:14 +02:00
Hannes Janetzek
2a6f6c28a0 fix travis build 2014-08-13 23:10:14 +02:00
Hannes Janetzek
4f5125cf22 update README 2014-08-13 23:10:13 +02:00
Hannes Janetzek
a81e3adae1 gradle: use android build-tools 20.0 2014-08-13 23:10:13 +02:00
Hannes Janetzek
490f0c35b1 remove vtm-android-app submodule 2014-08-13 20:37:06 +02:00
Hannes Janetzek
3d1cc6fe36 disable glBufferSubData for all Adreno 330/320
- use more specific test to work around buggy driver
2014-06-24 21:00:30 +02:00
Hannes Janetzek
51b2773ef2 get correct fade-time for proxy tiles 2014-06-24 20:59:46 +02:00
Hannes Janetzek
2995de938e update and docs for TileLoaderHooks
- add complete() method to TileLoaderHooks
- use Inlist instead of array for hooks
2014-06-19 18:31:55 +02:00
Hannes Janetzek
978b5ead44 handle LongPress in ItemizedLayer 2014-06-19 18:31:55 +02:00
Hannes Janetzek
6c830575c9 fix: LineClipper for multilinestrings 2014-06-19 18:31:55 +02:00
Hannes Janetzek
27b9294a36 fix: tile fade time
- did not check grandparent
2014-06-19 18:31:54 +02:00
Hannes Janetzek
a2abbe5197 mo' fling 2014-06-10 22:38:52 +02:00
Hannes Janetzek
3f49361e4a refactor: add api for common VertexItem use
- rename VertexItem -> VertexData
2014-06-10 22:38:52 +02:00
Hannes Janetzek
ad0eff3fac android: ignore NewApi error 2014-06-10 22:38:52 +02:00
Hannes Janetzek
7c995534eb add Tag constructor for intern() keys 2014-06-10 22:38:52 +02:00
Hannes Janetzek
2c6a85ee6d add GeoPoint.distance()
- return double in distanceTo()
2014-06-10 22:38:51 +02:00
Hannes Janetzek
9b719d857e add RTree 2014-06-10 22:16:09 +02:00
Hannes Janetzek
e961eba9c0 rename old QuadTree -> TileIndex 2014-06-10 22:16:09 +02:00
Hannes Janetzek
b460b4ebaf add QuadTree implementing SpatialIndex
- add SpatialIndex interface
2014-06-10 22:16:09 +02:00
Hannes Janetzek
4e94a8f269 inner class should be static 2014-06-10 22:16:09 +02:00
Hannes Janetzek
6eeb21623b cleanup comments 2014-06-10 22:16:09 +02:00
Hannes Janetzek
225613ec28 cleanup: canvas Paint 2014-06-10 22:16:08 +02:00
Hannes Janetzek
7cd5084777 fix: reset TileSet serial 2014-06-10 22:16:08 +02:00
Hannes Janetzek
5e1705e621 gwt: implement GLMatrix.proj2D 2014-06-10 22:16:08 +02:00
Hannes Janetzek
ee5e6b511e gwt: throw on missing GL context 2014-06-10 22:16:08 +02:00
Hannes Janetzek
480d639def GLMatrix: add batch projection 2014-06-10 22:16:08 +02:00
Hannes Janetzek
9d078142aa add LineLayer setExtents to not add caps outside visible region 2014-06-10 22:16:08 +02:00
Hannes Janetzek
bf8cc329cf Box:
- add Box.overlap(Box) and copy constructor
- add Box.inside(box)
2014-06-10 22:16:08 +02:00
Hannes Janetzek
dc0529c59e implement KeyMap.remove()
- tests
- cleanups
2014-06-10 22:16:08 +02:00
Hannes Janetzek
a65b35f8de tweak s3db colors 2014-06-10 22:16:08 +02:00
Hannes Janetzek
97857cf4e4 theme: more alpha for buildings 2014-06-10 22:16:08 +02:00
Hannes Janetzek
dc0089dc07 theme: increase osmarender way label size 2014-06-10 22:16:08 +02:00
Hannes Janetzek
9c393d25dc theming: allow extending text styles 2014-06-10 22:16:07 +02:00
Hannes Janetzek
7667b08b50 rename theme property base-text-size -> base-text-scale 2014-06-10 22:16:07 +02:00
Hannes Janetzek
fb628f4e25 Inlist:
- add Inlist.List size()
- make Inlist work items indirectly extending Inlist
- check Inlist.push() argument to not push lists
2014-06-10 22:16:07 +02:00
Hannes Janetzek
a9d3b0a302 fix iOS build 2014-06-10 22:16:07 +02:00
Hannes Janetzek
5d939cdbfd gradle: update 2014-06-10 22:16:07 +02:00
Hannes Janetzek
b593179376 ignore++ 2014-06-10 22:16:07 +02:00
Hannes Janetzek
19701b7563 fix: LwHttp - retry when address lookup failed
- use 5sec read timeout
- use tcp_nodelay
2014-06-10 22:16:07 +02:00
Hannes Janetzek
a26aa9de15 sync on ExtrusionLayer.vertexPool instead of each Vertex 2014-06-02 12:48:23 +02:00
Hannes Janetzek
037c25153b theme: increase buildings alpha 2014-05-25 02:27:02 +02:00
Hannes Janetzek
b9ebf1e57b refactor ExtrusionRenderer
+ cleanups
2014-05-25 02:26:36 +02:00
Hannes Janetzek
5af831abb5 nicer building fade 2014-05-25 00:53:31 +02:00
Hannes Janetzek
6bc3818318 update app 2014-05-25 00:53:31 +02:00
Hannes Janetzek
c0369236d2 start: add tilegridlayer to menu 2014-05-24 23:07:47 +02:00
Hannes Janetzek
4ddf9dcf39 refactor ExtrusionRenderer
- extract tile specific parts to BuildingRenderer
- sort tiles by distance for compilation
- slow down fade out animation
2014-05-24 23:06:50 +02:00
Hannes Janetzek
7466b6206f extract ExtrusionLayers from ElementLayers 2014-05-24 22:02:16 +02:00
Hannes Janetzek
774dd43a18 add min/max tile zoom to ExtrusionRenderer 2014-05-24 19:48:55 +02:00
Hannes Janetzek
1a22a39991 fix: Layer sort order for event processing 2014-05-24 14:27:55 +02:00
Hannes Janetzek
5c388e7fcb fix: re-enable building animation 2014-05-24 14:27:55 +02:00
Hannes Janetzek
d96e9c4070 jni project settings 2014-05-24 14:27:55 +02:00
Hannes Janetzek
10e186780c jni stuff 2014-05-16 17:55:45 +02:00
Hannes Janetzek
6d9b62af72 implement Iterator in Inlist.List
+ reverse(), append()
2014-05-16 17:55:45 +02:00
Hannes Janetzek
dfe6ca99ce refactor TileClipper:
- move clipLine() to LineClipper
2014-05-16 17:55:45 +02:00
Hannes Janetzek
f62ea65f25 rename vars: vertices counts are actually indices 2014-05-16 17:55:45 +02:00
Hannes Janetzek
89edbf90f2 remove GlAdapter.VBO_TEXTURE_LAYERS hack 2014-05-16 17:53:41 +02:00
Hannes Janetzek
9c1ae887ea samsung/adreno quirk: dont use glBufferSubData() 2014-05-16 12:03:46 +02:00
Hannes Janetzek
607b6d6266 Merge branch 'no-vbo-texture-layer' 2014-05-12 14:48:30 +02:00
Hannes Janetzek
ee3ffa8cec dont use vbo texture-layers for samsung devices with kitkat 2014-05-12 14:48:30 +02:00
Hannes Janetzek
f207a6eb4a add workaround for adreno driver issue 2014-05-12 14:48:30 +02:00
Hannes Janetzek
1ca175c598 add MapEventLayer.fixOnCenter()
- when enabled position is kept for zoom/rotation gesture
2014-05-12 14:48:29 +02:00
Hannes Janetzek
fbfe17743e update android build-tools 2014-05-12 14:48:27 +02:00
Hannes Janetzek
62255e7583 cleanup: MapEventLayer 2014-05-06 14:00:06 +02:00
Hannes Janetzek
35cda5c7d1 fix test for min-drag distance
- value just chosen to be large enough
2014-05-06 00:50:14 +02:00
Hannes Janetzek
0d8454a079 check minimal move before starting double-tap-zoom-drag 2014-05-06 00:44:28 +02:00
Hannes Janetzek
4e454ef84c s3db: more material colors 2014-05-05 00:05:06 +02:00
Hannes Janetzek
a8662d4dce s3db: disable postprocess mode
- seems old mali having issues with dependent texture reads..
- add bypass shader for testing
2014-05-05 00:05:06 +02:00
Hannes Janetzek
e7a015a1d7 no need to pre-calc BoundingBox hashcode 2014-05-05 00:05:05 +02:00
Hannes Janetzek
b75a3712d5 dbg: VectorTileLayer 2014-05-05 00:05:05 +02:00
Hannes Janetzek
b509e3c8d1 use inverted MeshLayer debug colors 2014-05-05 00:05:05 +02:00
Hannes Janetzek
37ffdadf1a API: allow changing number of TileLoader threads 2014-05-05 00:05:05 +02:00
Hannes Janetzek
9bd327cbe6 API: remove setBackgroundMap, add setBaseMap(TileLayer) 2014-05-05 00:05:05 +02:00
Hannes Janetzek
c9bd08dcdf API: make Rule members public 2014-05-05 00:05:05 +02:00
Hannes Janetzek
64383a8406 add TaskQueue interface to Map
- change AsyncTask to be able to post on main-thread
- rename Task.run() -> go()
2014-05-05 00:05:05 +02:00
Hannes Janetzek
c161ea9cca vtm-android: disable check-gl-error flags 2014-05-04 22:01:32 +02:00
Hannes Janetzek
fcc29eaa41 add MapPosition accessors 2014-05-04 22:01:32 +02:00
Hannes Janetzek
b0f0455ccf submit update task on PathLayer.setGeom() 2014-05-04 22:01:32 +02:00
Hannes Janetzek
24c8b4c16f fixme: re-init TileSet when count is zero.. 2014-05-04 22:01:32 +02:00
Hannes Janetzek
5cac7894c3 close TileSource on VectorLayer detach 2014-05-04 22:01:32 +02:00
Hannes Janetzek
f304462a7c cleanup: LineTexLayer 2014-05-04 22:01:32 +02:00
Hannes Janetzek
4ab053df3b cleanup: OBB2D 2014-05-04 22:01:32 +02:00
Hannes Janetzek
803fbcac47 cleanup: SimplifyVW 2014-05-04 22:01:31 +02:00
Hannes Janetzek
0139452787 fix: SimplifyDP handling of 'multi' geometries 2014-05-04 22:01:31 +02:00
Hannes Janetzek
d6b95c936a refactor TileClipper
- fix: TileClipper check len<6 before len==0
2014-05-04 22:01:31 +02:00
Hannes Janetzek
d263089c06 reset MapElement layer to default 2014-05-04 21:27:12 +02:00
Hannes Janetzek
04ea503184 Merge branch 'double-tap-to-zoom' 2014-05-04 20:41:44 +02:00
Hannes Janetzek
db37897740 fix double-tap zoom tests 2014-05-04 20:09:16 +02:00
Hannes Janetzek
24f699993b make double tap zoom to screen location 2014-05-04 20:09:16 +02:00
Hannes Janetzek
d5827de12e invert tilt gesture 2014-05-04 20:09:15 +02:00
Chuck Greb
469ca9093f Adds double tap to zoom 2014-05-04 20:09:15 +02:00
Chuck Greb
804c91c701 Inverts behavior of double touch drag gesture
Per Android guidelines, double touch drag up should decrease content scale and double touch drag down should increase content scale.

This is also the behavior in the official Google Maps Android application.

http://developer.android.com/design/patterns/gestures.html
2014-05-04 20:09:15 +02:00
Hannes Janetzek
559a5d0508 update android support library
no idea why gradle cannot find build-tools 19.0.3..
2014-05-04 20:08:29 +02:00
Hannes Janetzek
c00000edc8 cleanup: unused file 2014-05-04 20:08:19 +02:00
Hannes Janetzek
f132edf459 disable ios build 2014-05-04 20:08:09 +02:00
Hannes Janetzek
15023432cc GLState: keep track of clear color 2014-04-03 22:53:37 +02:00
Hannes Janetzek
2833d0f5c2 PathLayer: submit update task directly
- revert update listener
2014-04-03 22:42:31 +02:00
Hannes Janetzek
d26bd52689 jeo api changes 2014-04-03 22:16:12 +02:00
Hannes Janetzek
d42b8d6af2 LwHttp: handle gzip encoding 2014-04-03 21:56:28 +02:00
Hannes Janetzek
ca69f329cc Merge branch 'pluggable-network-layer' 2014-04-03 16:33:34 +02:00
Hannes Janetzek
e84afa32f7 use debug log in IOUtils.closeQuietly 2014-04-03 16:32:07 +02:00
Hannes Janetzek
cb5de5135f cleanup: LwHttp 2014-04-03 16:32:06 +02:00
Hannes Janetzek
0b82df4c21 add http request options 2014-04-03 16:32:06 +02:00
Hannes Janetzek
85a4bbe125 api: UrlTileSource:
- add UrlTileSource.getTileUrl(Tile) to create complete url string
- add TileUrlFormatter interface to override default formatter
- remove unused return from sendRequest()
2014-04-03 16:12:38 +02:00
Hannes Janetzek
6b7ccd68c9 add missing headers 2014-04-03 16:12:38 +02:00
Hannes Janetzek
15cf4810cf LwHttp: prepare tilePath as byte[] 2014-04-03 16:12:38 +02:00
Hannes Janetzek
98e30a468f add getter for split tilePath 2014-04-03 16:12:38 +02:00
Hannes Janetzek
5ad68ff2c7 gwt: update UrlTileSource 2014-04-03 16:12:38 +02:00
Hannes Janetzek
5c277f4d54 fix: HttpEngine tests 2014-04-03 16:12:17 +02:00
Hannes Janetzek
3f9847f617 gradle: make okhttp optional 2014-04-03 04:38:33 +02:00
Hannes Janetzek
9c4e04c4d6 api: UrlTileSource
- use replacement string for tilePath
- move 'low-level' formatTilePath to LwHttp
- implement LwHttpFactory
2014-04-03 04:15:46 +02:00
Chuck Greb
d709d7f39a Fixes HttpEngine tests 2014-04-03 04:15:46 +02:00
Hannes Janetzek
2bf5313c2b move tests to separate project 2014-04-03 04:15:46 +02:00
Hannes Janetzek
9bca50dfed some modification suggested by pmd:
- move fields before method
- chain StringBuilder appends
2014-04-02 22:30:13 +02:00
Hannes Janetzek
f75702a575 create HttpEngine instances for each loader thread 2014-04-02 22:30:13 +02:00
Chuck Greb
f3035d827b Tests OkHttp integration 2014-04-02 22:30:13 +02:00
Chuck Greb
af7d70cfd8 Extracts configurable networking layer.
* Extracts HttpEngine interface.
* Uses LwHttp as default networking client.
* Implements alternate networking client using OkHttp.
2014-04-02 22:30:13 +02:00
Hannes Janetzek
e13bc7822f add some pmd rules 2014-04-02 22:30:12 +02:00
Hannes Janetzek
e1feb4e5b7 docs: ITileDataSink 2014-04-02 22:30:12 +02:00
Hannes Janetzek
3297998a42 move unused SpriteManager to playground 2014-04-02 04:43:42 +02:00
Hannes Janetzek
6a71e53f93 findbugs: fix loop 2014-04-02 04:43:42 +02:00
Hannes Janetzek
2a2ff723ee libs++ 2014-04-02 04:14:08 +02:00
Hannes Janetzek
f614244043 app++ 2014-04-02 04:07:43 +02:00
hanchao
bf7db38ef8 update android gradle plug_in to 0.9.+ for android studio 0.5.3 2014-04-02 03:15:41 +02:00
Hannes Janetzek
05910f23fb fix: update PathLayer onMapEvent when points changed 2014-04-02 02:24:17 +02:00
Hannes Janetzek
267108d20b gradle: fix vtm-web-js 2014-04-01 16:55:47 +02:00
Hannes Janetzek
ef36c8a3d8 Merge branch 'texture_pool_dispose' 2014-04-01 04:03:10 +02:00
Hannes Janetzek
82f2070e99 increase java PermSize in gradle.properties 2014-04-01 04:03:10 +02:00
Hannes Janetzek
a37b503628 use one TexturePool per BitmapTileLayer
- dispose textures onDetach()
2014-04-01 04:03:10 +02:00
Hannes Janetzek
55714ae01e update README 2014-04-01 04:03:10 +02:00
Hannes Janetzek
b45e38ef4d dispose textures at end of each frame 2014-04-01 04:03:10 +02:00
Hannes Janetzek
e80981e0c5 add SyncPool.clear() 2014-04-01 04:03:10 +02:00
Hannes Janetzek
01f248632f example: cleanup 2014-04-01 04:03:09 +02:00
Hannes Janetzek
5131d2efd7 Merge branch 'rule_refactor' 2014-04-01 04:03:09 +02:00
Hannes Janetzek
4eedb7ff30 update file header 2014-03-31 15:31:01 +02:00
Hannes Janetzek
1f1675f188 no more Rule stack optimization
- the modified xml schema allows write proper rules :)
2014-03-31 15:30:53 +02:00
Hannes Janetzek
dc70104676 move ThemeBuilder 2014-03-31 15:23:08 +02:00
Hannes Janetzek
120797fe96 add RuleBuilder setters for Rule- and Style-Builders 2014-03-31 15:16:24 +02:00
Hannes Janetzek
4f254bde75 add StyleBuilder interface 2014-03-31 15:16:24 +02:00
Hannes Janetzek
f5645cf292 move RuleBuilder xml part to XmlThemeBuilder 2014-03-31 15:16:24 +02:00
Hannes Janetzek
191e94c670 merge Positive/NegativeRule into Rule 2014-03-31 15:16:24 +02:00
Hannes Janetzek
211ba90108 rendertheme: merge AttributeMatcher into Rule
- allow to match actual key-value-pairs.
  previously value matcher just checked *any* value not
  the one that matched key. See PositiveRuleKV/MultiKV
2014-03-31 15:16:24 +02:00
Hannes Janetzek
a3251a4aa6 set RenderStyle itself as current 2014-03-31 15:16:22 +02:00
Hannes Janetzek
9f8bc93d91 gradle: add libgdx repo 2014-03-30 20:28:02 +02:00
Hannes Janetzek
f5752b048e travis: increase java heap 2014-03-30 20:28:02 +02:00
Hannes Janetzek
92d9bba0e1 Merge branch 'geojson' 2014-03-30 20:27:47 +02:00
Hannes Janetzek
e8aa7d55bd web-js: testing geojson 2014-03-30 20:26:10 +02:00
Hannes Janetzek
de27227ed7 gwt: geojson tilesource 2014-03-30 20:24:53 +02:00
Hannes Janetzek
5fd05d5d01 theme: river fixed width 2014-03-30 04:28:59 +02:00
Hannes Janetzek
fb46f73eb0 example: add geojson tiles 2014-03-30 04:28:59 +02:00
Hannes Janetzek
b39f9ca003 add geojson example tile sources
- add OsmLanduseJsonTileSource
- add layers for buildings and water areas
2014-03-30 04:28:59 +02:00
Hannes Janetzek
aee1b22c89 add geoson tile source
- based on a patch sent by: Yang (apachemaven)
- use jackson-core for stream parsing
- rewrite tags, this way one can use the same the for different data
2014-03-30 03:49:54 +02:00
Hannes Janetzek
2f5a71df6b add poi tree 2014-03-29 19:19:30 +01:00
Hannes Janetzek
f18642eff9 Merge branch 'playground' 2014-03-29 19:08:21 +01:00
Hannes Janetzek
fe728318b1 gradle 2014-03-29 19:04:31 +01:00
Hannes Janetzek
21d32bacb7 gdx poi3d layer 2014-03-29 19:03:17 +01:00
Hannes Janetzek
44974d90a7 jeo example 2014-03-29 19:03:17 +01:00
Hannes Janetzek
b286e8f6eb experiments, testcode 2014-03-29 19:03:17 +01:00
Hannes Janetzek
aac57ee0d5 re-enable GdxMap.keyDown() handler 2014-03-29 18:56:34 +01:00
Hannes Janetzek
6f7ce36ec4 remove vtm-jeo-desktop 2014-03-29 18:55:56 +01:00
Hannes Janetzek
04391815e4 move vtm-jeo-android to vtm-android-example 2014-03-29 14:53:19 +01:00
Hannes Janetzek
5f14a87abd travis 2014-03-28 17:04:40 +01:00
Hannes Janetzek
43a62e90bb jeo api changes 2014-03-28 17:04:40 +01:00
Hannes Janetzek
60cad376e0 Merge branch 'fx' 2014-03-27 04:00:16 +01:00
Hannes Janetzek
a6df240b8b use GLShader for OffscreenRenderer 2014-03-27 03:59:32 +01:00
Hannes Janetzek
a7897427a3 wrap Offscreen renderer in S3DB/BuildingLayer 2014-03-27 03:59:29 +01:00
Hannes Janetzek
d90a0e9475 fx: combined ssao/fxaa shader
- rename and update shaders
2014-03-27 03:52:23 +01:00
Hannes Janetzek
cc95c485ce fx: add fxaa post-process shader 2014-03-27 03:52:22 +01:00
Hannes Janetzek
3071cdd0ac fx: add OffscreenRenderer 2014-03-27 03:52:22 +01:00
Hannes Janetzek
acdfefa55f use GLShader.init(gl) 2014-03-27 03:51:57 +01:00
Hannes Janetzek
41c92f0a38 example: use stored map position 2014-03-27 03:51:57 +01:00
Hannes Janetzek
ce38b484f6 s3db: use css colors 2014-03-27 03:51:57 +01:00
Hannes Janetzek
c57b388472 add ColorsCSS 2014-03-27 03:14:05 +01:00
Hannes Janetzek
647a8fc2a3 limit gl upload to one building tile per frame 2014-03-27 03:14:05 +01:00
Hannes Janetzek
e7aeb92b12 limit number of tile data uploads per frame 2014-03-27 03:14:05 +01:00
Hannes Janetzek
d6ec9a1c6d use simplelogger.properties 2014-03-27 03:14:05 +01:00
Hannes Janetzek
aa4a1de6f7 s3db: use non-exception version of parseColor 2014-03-27 03:14:05 +01:00
Hannes Janetzek
fd941858dd gwt: LoadDelayTask, keep refs with task 2014-03-27 03:14:05 +01:00
Hannes Janetzek
72b2349e11 gwt: add MapUrl for url hash parsing and updates 2014-03-27 03:14:05 +01:00
Hannes Janetzek
150c7d911c gwt: s3db layer 2014-03-27 03:14:05 +01:00
Hannes Janetzek
a98bcdd999 libs++ 2014-03-27 03:14:04 +01:00
Hannes Janetzek
b85713b437 cleanup: MapView 2014-03-27 03:14:04 +01:00
Hannes Janetzek
78f3d82d2f android: move GL classes to gl package 2014-03-27 03:14:04 +01:00
Hannes Janetzek
e1943e2808 android: extract GestureHandler 2014-03-27 03:14:04 +01:00
Hannes Janetzek
c11a0d698b android: rename MapView.getMap() 2014-03-27 03:14:04 +01:00
Hannes Janetzek
af823f74c7 fix: vtm-android-gdx build 2014-03-27 03:14:04 +01:00
Hannes Janetzek
fed257a1f7 gdx: add MotionHandler, use common MapEventLayer 2014-03-27 03:14:04 +01:00
Hannes Janetzek
26704d3ce5 cleanup: MotionEvent 2014-03-27 03:14:04 +01:00
Hannes Janetzek
45db59650a fix: MapEventLayer velocity when timediff = 0 2014-03-27 03:14:04 +01:00
Hannes Janetzek
4f77643321 refactor: GdxMap 2014-03-27 03:14:04 +01:00
Hannes Janetzek
c7508d330d gwt: add vtm-web-js project 2014-03-27 03:14:04 +01:00
Hannes Janetzek
e6eab7f773 gwt: use canvas defined in html
- handle resize in js
- app option for tileSize in MapConfig js object
2014-03-27 03:14:04 +01:00
Hannes Janetzek
4115bdf4c0 make BitmapTileSource non-abstract 2014-03-27 03:14:03 +01:00
Hannes Janetzek
334943c094 add vtm-android-starterkit 2014-03-27 03:14:03 +01:00
Hannes Janetzek
c2b17899a2 add generic constructor for VectorTileLayer 2014-03-27 03:14:03 +01:00
Hannes Janetzek
966009e18e print trace on NPE 2014-03-27 03:14:03 +01:00
Hannes Janetzek
19b040c7e6 android: add accessor for mMap 2014-03-27 03:14:03 +01:00
Hannes Janetzek
4fb3d13404 refactor backend Adapter classes 2014-03-27 03:14:03 +01:00
Hannes Janetzek
4e4d4270db split vtm-web into library and vtm-web-app 2014-03-27 03:14:03 +01:00
Hannes Janetzek
1bbf77df0c gradle: update projects 2014-03-27 03:14:03 +01:00
Hannes Janetzek
07b2d57b52 rename vtm-gdx-* 2014-03-27 03:14:03 +01:00
Hannes Janetzek
f224486e70 rename vtm-gdx-dektop to vtm-desktop 2014-03-27 03:14:02 +01:00
Hannes Janetzek
211efc4d5a gradle: dont copy assets 2014-03-27 03:14:02 +01:00
Hannes Janetzek
53a705ead5 app++ 2014-03-27 03:14:02 +01:00
Hannes Janetzek
7673ab16e5 Merge branch 's3db' 2014-03-27 03:13:37 +01:00
Hannes Janetzek
37639f965c use vertexMapPool in ExtrusionLayer 2014-03-27 03:13:20 +01:00
Hannes Janetzek
2a58f43256 make KeyMap poolable 2014-03-27 03:13:20 +01:00
Hannes Janetzek
a377e96128 cleanup: ExtrusionLayer 2014-03-27 03:13:20 +01:00
Hannes Janetzek
e900b4243d fix: ExtrusionLayer get correct sumIndices 2014-03-27 03:13:20 +01:00
Hannes Janetzek
3b65983706 use GLShader for ExtrusionLayer 2014-03-27 03:13:20 +01:00
Hannes Janetzek
3b212214ab s3db: use custom keymap 2014-03-27 03:13:20 +01:00
Hannes Janetzek
d434c11e78 add KeyMap, custom key-only HashMap 2014-03-27 03:13:20 +01:00
Hannes Janetzek
bda73374ca compile extrusion layers into one vbo 2014-03-27 03:13:19 +01:00
Hannes Janetzek
0a76dafd9c fx: ExtrusionRenderer hacks 2014-03-27 03:13:19 +01:00
Hannes Janetzek
37ab92534a unify ExtrusionLayer vertex ids - TODO reduce allocations 2014-03-27 03:13:19 +01:00
Hannes Janetzek
6b388c12d1 s3db: add building material and colors 2014-03-27 03:13:19 +01:00
Hannes Janetzek
bcaaa0637a s3db: colors, no alpha 2014-03-27 03:13:19 +01:00
Hannes Janetzek
581cddaa0e ExtrusionRenderer:
- set matrix per tile, not per layer
- ExtrusionLayer must have a color
- add alpha option
- cleanups
2014-03-27 03:13:19 +01:00
Hannes Janetzek
967ad4cba4 use default roof color only for flat roofs 2014-03-27 03:13:19 +01:00
Hannes Janetzek
e52bed199a add cache for S3DB layer 2014-03-27 03:13:19 +01:00
Hannes Janetzek
feeebae5fb remove tile load CancellationException
- does not work with GWT async loading
2014-03-27 03:13:19 +01:00
Hannes Janetzek
f51fb210b8 refactor: split S3DB Layer/TileLoader 2014-03-27 03:13:19 +01:00
Hannes Janetzek
aeff737250 S3DB: handle building/roof:color tag 2014-03-27 03:13:19 +01:00
Hannes Janetzek
8064dda6ac add mesh-only mode to ExtrusionRenderer/Layer 2014-03-27 03:13:18 +01:00
Hannes Janetzek
eb41496c5a rename ExtrusionLayer public fields 2014-03-27 03:13:18 +01:00
Hannes Janetzek
c2112d68aa try different normal encoding 2014-03-27 03:13:18 +01:00
Hannes Janetzek
e67f4e8c62 s3db: add android example 2014-03-27 03:13:18 +01:00
Hannes Janetzek
c02287fc9b cleanup: BuildingLayer 2014-03-27 03:13:18 +01:00
Hannes Janetzek
a548e6c34b s3db: add S3DBLayer 2014-03-27 03:13:18 +01:00
Hannes Janetzek
a18d20a916 s3db: render meshes with ExtrusionRenderer 2014-03-27 03:13:18 +01:00
Hannes Janetzek
f929c15e2d cleanup: VectorTileLoader 2014-03-27 03:13:18 +01:00
Hannes Janetzek
5ad631f1ea skip rendering TileSet when zoom-level is not renderable 2014-03-27 03:13:18 +01:00
Hannes Janetzek
cb2aee6d60 make LayerRenderer.isReady() public 2014-03-27 03:13:18 +01:00
Hannes Janetzek
fb3e50cc88 s3db: add triangle geometry decoder 2014-03-27 03:13:18 +01:00
Hannes Janetzek
27750ac11e move depthOffset(Tile) to MapTile 2014-03-27 03:13:18 +01:00
Hannes Janetzek
ea711aea77 move example renderer to playground 2014-03-27 03:13:17 +01:00
Hannes Janetzek
ff56d5c67a Merge branch 'extract_shaders' 2014-03-27 03:12:45 +01:00
Hannes Janetzek
afea93be73 remove obsolete shader GlUtils functions 2014-03-27 03:10:48 +01:00
Hannes Janetzek
c6f44e7bbf gwt: use shader assets
- add some url options for 'map' and 'theme'
- use local asset folder
- merge assets in local directory
2014-03-27 03:05:44 +01:00
Hannes Janetzek
1b211df73e use GLShader for ExtrusionRenderer 2014-03-27 03:05:18 +01:00
Hannes Janetzek
bed1edbc82 use GLShader for MeshLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
1a9d3ca4fc use GLShader for BitmapLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
c107e197f5 use GLShader for LineTexLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
0fb0aa59c2 use GLShader for PolygonLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
357713b3a2 fix comments 2014-03-27 03:04:12 +01:00
Hannes Janetzek
b44ef4144b use GLShader for LineLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
eccbf58c80 use GLShader for TextureLayer 2014-03-27 03:04:12 +01:00
Hannes Janetzek
18f6784e81 add GLShader:
- load shaders from assets
- start to move shaders to asset files
2014-03-27 03:03:31 +01:00
Hannes Janetzek
4205d42e7f testing: GL_STATIC_DRAW buffers 2014-03-27 00:35:51 +01:00
Hannes Janetzek
83dbce18fe gwt: print error message only 2014-03-27 00:35:51 +01:00
Hannes Janetzek
5b58898975 gwt: allow to create empty textures.. 2014-03-27 00:35:51 +01:00
Hannes Janetzek
19bd1dab9f gwt: increase fps 2014-03-27 00:35:51 +01:00
Hannes Janetzek
5f18415bf9 gwt: use slf4j in libgdx 2014-03-27 00:35:51 +01:00
Hannes Janetzek
9a16899824 gdx: add esc to exit 2014-03-27 00:35:51 +01:00
Hannes Janetzek
d50a67527e desktop: change run parameters 2014-03-27 00:35:51 +01:00
Hannes Janetzek
d507022c4a cleanup: Extrusion style 2014-03-27 00:35:51 +01:00
Hannes Janetzek
56a223e6c6 SyncPool/Pool: allow to pool any subclass of Inlist 2014-03-27 00:35:51 +01:00
Hannes Janetzek
6113d284d8 add Map.setTheme(IRenderTheme) 2014-03-27 00:35:51 +01:00
Hannes Janetzek
913afab264 BufferObject: find minimal buffer larger than requested size 2014-03-27 00:35:50 +01:00
Hannes Janetzek
7587c1a041 example: add ThemeStylerActivity 2014-03-18 03:09:29 +01:00
Hannes Janetzek
537b53d877 fixup theme 2014-03-18 03:04:38 +01:00
Hannes Janetzek
1a521d2ad4 gwt: stop tile loading when state is not 'loading' 2014-03-18 02:51:03 +01:00
Hannes Janetzek
818ea0b0c7 gwt: use LoadDelayTask to only load max one tile per frame 2014-03-18 02:51:03 +01:00
Hannes Janetzek
a46940a6b1 remove tile load CancellationException
does not work with GWT async loading
2014-03-18 02:51:03 +01:00
Hannes Janetzek
b0217767b8 use RenderStyle.current() to get the active style 2014-03-18 02:51:03 +01:00
Hannes Janetzek
1b09774413 PolygonLayer: use temporary area style array 2014-03-18 02:51:02 +01:00
Hannes Janetzek
8f0c51675d TexturePool: add function to initialize item with bitmap 2014-03-18 02:51:02 +01:00
Hannes Janetzek
2e56e3facc start BitmapTileLayer pool 2014-03-18 02:51:02 +01:00
Hannes Janetzek
879e0ccb81 docs: MapRenderer 2014-03-18 02:51:02 +01:00
Hannes Janetzek
4688943290 cleanup AwtBitmap 2014-03-18 02:51:02 +01:00
Hannes Janetzek
641977b5ca add color conversion for rgb-hsv and parser for rgba() strings
parse rgb()/rgba() color strings
2014-03-18 02:51:02 +01:00
Hannes Janetzek
1127660f2d add GwtInput to disable key callbacks on Document 2014-03-18 02:51:02 +01:00
Hannes Janetzek
61e2be18ab move cast into addVertex 2014-03-18 02:51:02 +01:00
Hannes Janetzek
77d33bb02c name clipMode magic-numbers, docs 2014-03-18 02:51:02 +01:00
Hannes Janetzek
bd96c018f7 cleanup: Tag 2014-03-18 02:51:02 +01:00
Hannes Janetzek
31e1b0ec99 Merge branch 'tile_load_hooks' 2014-03-18 02:50:43 +01:00
Hannes Janetzek
8f94fa7ac5 add TileLoaderProcessHook to intercept MapElement processing 2014-03-18 02:47:41 +01:00
Hannes Janetzek
402e4c3cd6 let TileLoaderHook stop further processing
- return false when no other loader hook should process
  the current element
2014-03-18 02:47:41 +01:00
Hannes Janetzek
c234507edb move Label/Symbol data from MapTile to LabelTileData 2014-03-18 02:47:41 +01:00
Hannes Janetzek
20d5c20e72 move Text/Symbol handling to LabelTileLoaderHook 2014-03-18 02:47:41 +01:00
Hannes Janetzek
2d15324ead insert new hooks at front 2014-03-18 02:47:41 +01:00
Hannes Janetzek
bb2a86b5ac PathLayer - inner class should be static 2014-03-18 02:47:41 +01:00
Hannes Janetzek
56c4323959 docs: MapTile 2014-03-18 02:47:41 +01:00
Hannes Janetzek
a475aa6c22 use Object as ID for TileData 2014-03-18 02:47:41 +01:00
Hannes Janetzek
7b9f2ac6bd start TileLoaderHook:
- only create ExtrusionLayers when a BuildingLayer is attached
2014-03-18 02:47:41 +01:00
Hannes Janetzek
1f5efb9a33 refactor: MapTile hold generic TileData - Testing 2014-03-18 02:47:41 +01:00
Hannes Janetzek
8926c84ca9 docs: MatchingCacheKey 2014-03-18 02:47:40 +01:00
Hannes Janetzek
3eba47b0bb get theme from VectorTileLayer, instead of setting it on Loader 2014-03-18 02:47:40 +01:00
Hannes Janetzek
ff01b3f80d refactor: TileLoader.createLoader() 2014-03-18 02:47:40 +01:00
Hannes Janetzek
d00e9771e0 move TagFilter stuff to OsmTileLayer 2014-03-18 02:47:40 +01:00
Hannes Janetzek
5ebc5b6244 example: fix theme menu radio toggle 2014-03-18 02:47:32 +01:00
Hannes Janetzek
e7ad7110c8 example: move theme menu to base 2014-03-18 02:47:21 +01:00
Hannes Janetzek
192bd9c96c theme: slight orange primary roads 2014-03-18 02:47:13 +01:00
Hannes Janetzek
6188baa4db theme: add Newtron
- fix: VtmThemes enum
2014-03-18 02:46:38 +01:00
Hannes Janetzek
968d97f440 theme: disable tourism=info 2014-03-18 02:46:24 +01:00
Hannes Janetzek
2fd9addc59 reduce the exceptions thrown by theme loader to ThemeException 2014-03-18 02:43:32 +01:00
Hannes Janetzek
6f9d2dafb6 theme: just print error on lineSymbol in theme 2014-03-18 00:35:58 +01:00
Hannes Janetzek
0b68a9cf58 theme: disable (now working) area textures 2014-03-18 00:13:25 +01:00
Hannes Janetzek
d502ab2561 theme: rename newtron enum 2014-03-18 00:11:14 +01:00
Hannes Janetzek
fc9901e493 cleanup: move carto theme to not working mapnik tilesource 2014-03-18 00:09:58 +01:00
Hannes Janetzek
604c1449e4 Merge branch 'theme_refactor' 2014-03-17 23:24:46 +01:00
Hannes Janetzek
0a23dc2c27 theming changes:
- select="first" also add its renderstyles when no sub-rule matched
  ... before they where only added when one subrule matched

- use select="when-matched" as last subrule in select="first" rules
  instead.
2014-03-17 22:55:34 +01:00
Hannes Janetzek
c7805c82c6 remove LineSymbol 2014-03-17 22:54:08 +01:00
Hannes Janetzek
46b2eb2a3e rename theme style classes 2014-03-17 22:48:20 +01:00
Hannes Janetzek
4e473bf242 update LineBuilder 2014-03-17 22:01:03 +01:00
Hannes Janetzek
f80b4ee2b1 use AreaBuilder in XmlThemeBuilder:
- docs
- better Area field naming
2014-03-17 21:50:08 +01:00
Hannes Janetzek
ff7c74bc70 start Line and Area builders 2014-03-17 18:18:04 +01:00
Hannes Janetzek
14e5e28998 cleanups: theme/rule:
- rename destroy -> dispose
- use EMPTY_RULES array to avoid null checks
- squash: RuleVisitor
2014-03-16 15:34:50 +01:00
Hannes Janetzek
b879830045 start ThemeBuilder api 2014-03-16 15:31:15 +01:00
Hannes Janetzek
494e553ac0 app++ 2014-03-16 15:31:15 +01:00
Hannes Janetzek
a4555631b1 add TextBuilder for Text styles 2014-03-16 15:31:15 +01:00
Hannes Janetzek
a4cd4ad767 cleanup: XmlThemeBuilder:
- rename from -> read
- cleanup theme attribute validation
2014-03-16 15:31:15 +01:00
Hannes Janetzek
abade416df cleanup: RenderTheme 2014-03-16 15:31:15 +01:00
Hannes Janetzek
4e3fc1643d rename RenderThemeHandler - XmlThemeBuilder 2014-03-10 01:15:57 +01:00
Hannes Janetzek
61ca022d5b add select="when-matched" rule option 2014-03-10 01:15:49 +01:00
Hannes Janetzek
ca1a7b90d7 refactor: extract theme RulerBuilder from Rule 2014-03-10 01:13:21 +01:00
Hannes Janetzek
5a55e33f76 fix: ElementLayers, make sure setFrom() clears previous items 2014-03-09 21:46:13 +01:00
Hannes Janetzek
c24b4addfa serious refactor: TileLoader:
- no more duplication of TileLoaders for GWT ->
- decouple loadTile() from TileDataSource completed() call
- all TileDataSource MUST call completed(success) in any case now
2014-03-09 21:46:00 +01:00
Hannes Janetzek
a8f46fdd8d rewrite VelocityTracker to work with varying frequency samples
- improve fling behaviour
- should fix #49
2014-03-09 03:06:50 +01:00
Hannes Janetzek
6d3bc0caea remove MapTile.loader field for GWT 2014-03-08 13:20:26 +01:00
Hannes Janetzek
26846d752f change url, mod_tile now provides CORS 2014-03-08 13:19:22 +01:00
Hannes Janetzek
c17eb32a8b android logger.properties 2014-03-08 13:18:11 +01:00
Hannes Janetzek
f313bb30f7 libgdx api changes 2014-03-08 13:17:56 +01:00
Hannes Janetzek
12ad13c0af app++ 2014-03-06 17:15:29 +01:00
Hannes Janetzek
e3234ecf8d gradle: dont build parallel by default 2014-03-06 17:11:52 +01:00
Hannes Janetzek
397dd27649 jeo: desktop indoor example 2014-03-06 16:52:17 +01:00
Hannes Janetzek
5aefd7f5cb gradle: update jeo config 2014-03-06 16:51:47 +01:00
Hannes Janetzek
11870a500b Merge branch 'jeo' 2014-03-06 16:25:24 +01:00
Hannes Janetzek
2c133a87cb update Indoor example 2014-03-06 16:24:36 +01:00
Hannes Janetzek
bb439236d6 add gradle 2014-03-06 16:24:36 +01:00
Hannes Janetzek
a480ef4b8b update target sdk 2014-03-06 16:23:56 +01:00
Hannes Janetzek
3fd92982c4 add examples 2014-03-06 16:23:24 +01:00
Hannes Janetzek
9109da9784 add vtm-jeo 2014-03-06 16:23:24 +01:00
Hannes Janetzek
05b977be70 use android-logger 2014-03-06 16:18:29 +01:00
Hannes Janetzek
b04b5f235c fix NPE in SimpleWorker cleanup 2014-03-06 16:18:23 +01:00
Hannes Janetzek
10a00753e7 gradle: use daemon/parallel options 2014-03-04 20:14:14 +01:00
Hannes Janetzek
906ad1be15 Merge branch 'ios' 2014-03-04 20:14:05 +01:00
Hannes Janetzek
7605e55ac7 libs++ 2014-03-04 20:12:46 +01:00
Hannes Janetzek
4eeaf59075 gdx api changes 2014-03-04 20:12:46 +01:00
Hannes Janetzek
9a473e84dc add ios assets 2014-03-04 20:12:46 +01:00
Hannes Janetzek
1c4979bdaa add vtm-gdx-ios 2014-03-04 20:12:46 +01:00
Hannes Janetzek
3cda9684cb update README 2014-03-04 01:43:28 +01:00
Hannes Janetzek
1cec1bb0dc gdx api changes
- disable gdx-html build for now
2014-03-04 00:52:40 +01:00
Hannes Janetzek
5bb865a561 Merge branch 'gradle' 2014-03-01 16:57:27 +01:00
Hannes Janetzek
45dba44432 update README 2014-03-01 16:15:32 +01:00
Hannes Janetzek
3118086ff3 gradle: add android-example run task 2014-03-01 16:01:16 +01:00
Hannes Janetzek
cee96c9ed0 gradle: test configureondemand 2014-03-01 15:58:08 +01:00
Hannes Janetzek
1f1cd2ef57 package vtm-natives with gdx-desktop 2014-02-28 19:11:16 +01:00
Hannes Janetzek
ae808dce2e refactor BitmapTileLayer:
- move to layer.tile.bitmap
- extract BitmapTileLoader
- bring back GWT BitmapTileLayer to life
2014-02-28 19:11:16 +01:00
Hannes Janetzek
ec7f75cf67 set default max/min zoom 2014-02-28 19:11:16 +01:00
Hannes Janetzek
50e3794cb9 add getter for UrlTileSource.getUrl() 2014-02-28 19:11:15 +01:00
Hannes Janetzek
9fe4be522a theme: only add casing when core is rendered 2014-02-28 19:11:11 +01:00
Hannes Janetzek
7e2cd4459c cleanup: emu VectorTileLayer 2014-02-28 19:09:10 +01:00
Hannes Janetzek
d7914f4807 add VectorTileLayer constructor with TileSource 2014-02-28 19:09:10 +01:00
Hannes Janetzek
8068d6c25a fix: add default for VectorTileLoader.filterTags() 2014-02-28 19:09:10 +01:00
Hannes Janetzek
5134b522ae LineLayer: drop invalid lines 2014-02-28 19:09:10 +01:00
Hannes Janetzek
fdda6988ba LineLayer refactor:
- extract addLine()
- expand variable names
2014-02-28 19:09:10 +01:00
Hannes Janetzek
0ef16b6c5b improve LineLayer bevel joint 2014-02-28 19:09:10 +01:00
Hannes Janetzek
60438b2925 add Point utilities 2014-02-28 19:09:10 +01:00
Hannes Janetzek
9c138beb5d improve DebugTheme 2014-02-28 19:09:10 +01:00
Hannes Janetzek
5c05b81dfa LwHttp, ignore readers that try to close InputStream. 2014-02-28 19:09:09 +01:00
Hannes Janetzek
a98ddca171 add LwHttp constructor with additional request header items 2014-02-28 19:09:09 +01:00
Hannes Janetzek
96b512c831 add MapElement.toString() 2014-02-28 19:09:09 +01:00
Hannes Janetzek
d8e23fbafe fix: GeometryBuffer.startLine()
- *always* set end marker
2014-02-28 19:09:09 +01:00
Hannes Janetzek
2583ad2ce6 GeometryBuffer: return self for chaining, add toString() 2014-02-28 19:09:09 +01:00
Hannes Janetzek
5449d1cdd5 fix: clear depth buffer for tile clipping
- need to enable depthmask for clear
2014-02-28 19:08:37 +01:00
Hannes Janetzek
6d332f6ba9 docs: BitmapLayer 2014-02-24 16:03:34 +01:00
Hannes Janetzek
759e7b97b8 Merge branch 'gradle' 2014-02-24 16:03:18 +01:00
Hannes Janetzek
da6c0608a2 tryin travis 2014-02-24 16:01:09 +01:00
Hannes Janetzek
dac9b8adad gradle cleanups 2014-02-24 16:01:09 +01:00
Hannes Janetzek
c5479c18f6 use original libgdx 2014-02-24 15:09:33 +01:00
Hannes Janetzek
60f9ccc9f6 compile gwt with vtm-themes 2014-02-24 15:09:33 +01:00
Hannes Janetzek
df7fa68787 update gradle nexus 2014-02-24 15:09:33 +01:00
Hannes Janetzek
f193921432 extract theme assets to vtm-themes project 2014-02-24 15:09:33 +01:00
Hannes Janetzek
ff83629054 create eclipse configuration with gradle 2014-02-24 15:05:54 +01:00
Hannes Janetzek
ad62e26b59 remove eclipse project settings 2014-02-24 15:05:54 +01:00
Hannes Janetzek
3b232b403e add newtron theme 2014-02-24 15:05:17 +01:00
Hannes Janetzek
6e422ade94 add dotProduct for float[] 2014-02-24 15:03:22 +01:00
Hannes Janetzek
6d4f344326 add douglas-peucker simplifier 2014-02-24 15:03:22 +01:00
Hannes Janetzek
2241f3f27f add visvalingam-wyatt geometry simplification 2014-02-24 15:03:22 +01:00
Hannes Janetzek
e3b279ed6d cleanup: MarkerLayer, add simple ItemizedLayer constructor 2014-02-24 15:03:22 +01:00
Hannes Janetzek
1653e54541 cleanup: LineLayer 2014-02-24 15:03:22 +01:00
Hannes Janetzek
e947248ea4 make render-styles overrideable 2014-02-24 15:03:22 +01:00
Hannes Janetzek
8428f438db start OsmVectorLayer 2014-02-24 15:03:22 +01:00
Hannes Janetzek
6a40c3c375 extract OSM vector-tile specifics to OsmTileLayer 2014-02-24 15:03:22 +01:00
Hannes Janetzek
1b232cca84 make VectorTileLayer extendable 2014-02-24 15:03:22 +01:00
Hannes Janetzek
99cfdd6e14 make VectorTileLoader extendable 2014-02-24 15:03:21 +01:00
Hannes Janetzek
5c2eaf961f remove unused MapElement.priority 2014-02-24 15:03:21 +01:00
Hannes Janetzek
48fa5d5434 refactor: move tile layer classes back to layers.tile
they *really* belong there
2014-02-24 15:03:21 +01:00
Hannes Janetzek
6507b1369a add AbstractVectorLayer 2014-02-24 15:03:21 +01:00
Hannes Janetzek
e15163bb08 use EventDispatcher for Input- and Map-Events 2014-02-24 15:03:21 +01:00
Hannes Janetzek
940a753b41 fixup: boxtree 2014-02-24 15:03:21 +01:00
Hannes Janetzek
733d9dac96 fix: GeometryBuffer.getNumPoints() 2014-02-24 15:03:21 +01:00
Hannes Janetzek
3896358ba8 add ElementLayers.setFrom() 2014-02-24 15:03:21 +01:00
Hannes Janetzek
deff7d2a86 gdx: decrease scroll-zoom amount 2014-02-24 15:02:25 +01:00
Hannes Janetzek
b006cacc89 improve combined move/scale animation 2014-02-17 01:51:49 +01:00
Hannes Janetzek
2fc078e80d fix rotation in animateTo(MapPosition) 2014-02-17 01:51:45 +01:00
Hannes Janetzek
848449e32a extract VectorTileRenderer from TileRenderer 2014-02-16 23:40:07 +01:00
Hannes Janetzek
adb56c7613 refactor TileLayer:
- set specific TileRenderer in sub-class constructor
- remove TileLoader generics from TileLayer
2014-02-16 23:40:07 +01:00
Hannes Janetzek
5cffe3a3b3 fix: Animator.zoomTo() 2014-02-16 18:03:25 +01:00
Hannes Janetzek
46ad2be83b set default building height in VectorTileLoader 2014-02-16 16:08:11 +01:00
Hannes Janetzek
904360ff69 rename MapPosition.angle -> bearing 2014-02-16 04:22:36 +01:00
Hannes Janetzek
79b5a09ac8 big refactor: copy Viewport state for rendering 2014-02-16 04:15:25 +01:00
Hannes Janetzek
91d1e7b1a6 split Viewport modifiers into ViewController 2014-02-16 04:12:27 +01:00
Hannes Janetzek
46878c81b7 some Animator improvements
- fixes annoying zoomTo jumping
2014-02-16 04:11:05 +01:00
Hannes Janetzek
5d07d45f86 rename MapAnimator -> Animator 2014-02-15 17:13:23 +01:00
Hannes Janetzek
38c27c051d make fields protected to allow extending MapView 2014-02-15 14:18:02 +01:00
Hannes Janetzek
dc0d161c14 cleanup: MapView 2014-02-15 14:17:00 +01:00
Hannes Janetzek
9285ae8536 do not set Tile.SIZE in MapView constructor
this way users can change static Tile.SIZE before initiating
the MapView.
2014-02-15 14:16:09 +01:00
Hannes Janetzek
0aaca44795 cleanup: MapAnimator 2014-02-15 01:05:22 +01:00
Hannes Janetzek
106b45f0c4 make Viewport.MAX_TILT public 2014-02-15 01:05:17 +01:00
Hannes Janetzek
c6b27aadf0 cleanup: MapPosition 2014-02-15 00:37:20 +01:00
Hannes Janetzek
c299529ccb no mapsforge in here 2014-02-15 00:33:07 +01:00
Hannes Janetzek
77fa5b1fd0 fix: also copy MapPosition.tilt 2014-02-15 00:31:23 +01:00
Hannes Janetzek
478078dc23 add animateTo(MapPosition)
patch from Kimmo Vuorinen. Thanks!
2014-02-15 00:29:56 +01:00
Hannes Janetzek
eacc9a2d30 fix: double-tap, wait for second move event 2014-02-14 12:05:20 +01:00
Hannes Janetzek
d3b25cd3d5 docs 2014-02-14 12:03:59 +01:00
Hannes Janetzek
7468d0beeb put 'scale screen coordinates' into projection matrix 2014-02-14 12:03:17 +01:00
Hannes Janetzek
ea49b47afd cleanup: remove local.properties 2014-02-14 00:13:10 +01:00
Hannes Janetzek
ef395ddb39 Merge pull request #42 from mapzen/maven
Updates build.gradle for maven compatibility.
2014-02-14 00:06:47 +01:00
Chuck Greb
00ff342e86 Updates build.gradle for maven compatibility.
* Explicitly set support library version 19.0.1.
* Include slf4j-android dependency from maven central instead of local jar.
* Adds local.properties to .gitignore
2014-02-13 14:18:07 -05:00
Hannes Janetzek
eab9d26594 fix ext-libs 2014-02-13 00:55:25 +01:00
Hannes Janetzek
d56eb31aef use pre-package jnis for gradle... 2014-02-12 23:20:57 +01:00
Hannes Janetzek
ab0cadf81f unset MeshLayer heightOffset at start 2014-02-12 20:47:42 +01:00
Hannes Janetzek
e9d8cdd329 get JTS geometry from OSMElements 2014-02-12 20:46:41 +01:00
Hannes Janetzek
424f44ba12 double tap scale is back 2014-02-12 02:11:50 +01:00
Hannes Janetzek
8d350238cf add heightOffset for Line- and MeshLayer 2014-02-12 02:08:19 +01:00
Hannes Janetzek
27153c8093 LwHttp: handle 'Connection: close' header 2014-02-12 01:46:02 +01:00
Hannes Janetzek
3409f5ff3c libs++ 2014-02-10 23:22:35 +01:00
Hannes Janetzek
67e168bf92 app++ 2014-02-10 23:20:25 +01:00
Hannes Janetzek
78d125a0f6 move rotten tilesources to extras 2014-02-09 22:25:01 +01:00
Hannes Janetzek
320295bfba add AndroidGraphics.makeMarker() utility for loading rawResource 2014-02-09 20:35:12 +01:00
Hannes Janetzek
2df9e8fccc MarkerItem: change UID to hold Object 2014-02-09 19:59:26 +01:00
Hannes Janetzek
025c482725 MarkerItem: remove HotspotPlace already in MarkerSymbol 2014-02-09 19:57:15 +01:00
Hannes Janetzek
d3c03fb564 add Viewport.getBBox(int expand) to expand by gived pixels 2014-02-09 17:15:22 +01:00
Hannes Janetzek
4dfbf1f088 animate PathLayer example 2014-02-09 17:05:09 +01:00
Hannes Janetzek
3ef832efb8 PathLayer: run first update without delay 2014-02-09 17:04:00 +01:00
Hannes Janetzek
83b914d1b2 GeoPoint: cheaper range limiting 2014-02-09 17:03:24 +01:00
Hannes Janetzek
87f4277b8b add: Color.premulFade, fade should not be premultiplied by default 2014-02-09 17:02:15 +01:00
Hannes Janetzek
438c8d15e1 fix: do not unset alpha of BitmapLayer 2014-02-09 17:01:28 +01:00
Hannes Janetzek
fd87d1480d cleanup: Viewport 2014-02-09 17:00:50 +01:00
Hannes Janetzek
99b7a5eb74 MarkerLayer: check if touch hits within marker extents 2014-02-09 17:00:31 +01:00
Hannes Janetzek
eb9194fe73 MarkerLayer: render items in z-order 2014-02-09 16:59:19 +01:00
Hannes Janetzek
fccf3212e6 gradle: cleanups 2014-02-08 21:22:07 +01:00
Hannes Janetzek
f49c9e2b3a libs: jni for osx 2014-02-08 20:23:50 +01:00
Hannes Janetzek
14bc0aea74 refactor: move utility classes utils.math/geom 2014-02-08 19:47:00 +01:00
Hannes Janetzek
35566a2334 refactor: Viewport.getViewBox() -> getBBox() 2014-02-08 18:13:40 +01:00
Hannes Janetzek
c64eb9aa88 rename getViewport/Animator/Layer() to viewport/animator/layers()
- these are composite parts of Map
2014-02-08 17:48:01 +01:00
Hannes Janetzek
5ef8026ac4 refactor: extract MarkerRenderer from ItemizedLayer
- move ItemizedLayer stuff to MarkerLayer
- rename ItemizedIconLayer to ItemizedLayer
2014-02-08 17:48:01 +01:00
Hannes Janetzek
7f64fff46d BoxTree:
- use coordinates in Node to avoid calculation in query()
- inline node overlap check in query
2014-02-08 17:48:01 +01:00
Hannes Janetzek
1d0fcedeb0 update readme 2014-02-08 17:48:01 +01:00
Hannes Janetzek
46f8f7d22a copy assets, make androidstudio happy 2014-02-08 07:28:02 +01:00
Hannes Janetzek
1bda4d29e1 update to target sdk 19 2014-02-08 05:38:46 +01:00
Hannes Janetzek
316f4b7461 libs++ 2014-02-08 04:13:06 +01:00
Hannes Janetzek
ed179e6207 app++ 2014-02-08 03:42:56 +01:00
Hannes Janetzek
b0ebe7e0cf use TILE_LOADED event to trigger labeling 2014-02-08 03:42:28 +01:00
Hannes Janetzek
a26dea0065 disable GridLayer 2014-02-08 03:42:01 +01:00
Hannes Janetzek
7e4f314646 add gradle gdx builds 2014-02-08 03:36:44 +01:00
Hannes Janetzek
d836ffaad1 cleanup vtm-android 2014-02-08 03:01:37 +01:00
Hannes Janetzek
7bbb74b985 fix docs 2014-02-08 02:51:35 +01:00
Hannes Janetzek
cb82d4cc45 Merge branch 'gradle_build' 2014-02-08 01:45:37 +01:00
Hannes Janetzek
5b09735249 let MapActivity extend FragmentActivity 2014-02-08 01:42:01 +01:00
Hannes Janetzek
d1dbce8682 register MapView when Context is instance of MapActivity 2014-02-08 01:42:01 +01:00
Hannes Janetzek
ccb00b17a5 bump target SDK 2014-02-08 01:42:01 +01:00
Hannes Janetzek
5443cf5417 gradle stuff 2014-02-08 01:41:50 +01:00
Hannes Janetzek
a53568f100 refactor: TileManager/MapTile
- remove tile from TileManager cache when canceled
- changed MapTile.STATE_* to MapTile.State.*
2014-02-07 21:50:09 +01:00
Hannes Janetzek
77c933b7d8 docs: TileRenderer 2014-02-07 21:50:09 +01:00
Hannes Janetzek
ae24860d1e docs: TileManager 2014-02-07 21:50:09 +01:00
Hannes Janetzek
e71f866b14 docs: FastMath 2014-02-07 21:50:09 +01:00
Hannes Janetzek
ebaffdb123 rename Viewport.getMapViewProjection to getMapExtents
- add parameter to increase extents
2014-02-07 21:50:08 +01:00
Hannes Janetzek
dd954e3416 pass VectorTileLayer to LabelLayer and BuildingLayer 2014-02-07 21:50:08 +01:00
Hannes Janetzek
db780d9939 add TileManager TILE_LOADED/REMOVED events 2014-02-07 21:50:08 +01:00
Hannes Janetzek
655136f52d add EventDispatcher 2014-02-07 21:50:08 +01:00
Hannes Janetzek
bdc18c9eb6 add option to run SimpleWorker task onMainLoop before execution on worker-thread 2014-02-07 21:50:08 +01:00
Hannes Janetzek
bf2e0e44a8 use Inlist.List for MapTile.labels/symbols 2014-02-07 21:50:08 +01:00
Hannes Janetzek
6dddf614dd add Inlist iterator + LList 2014-02-07 21:50:08 +01:00
Hannes Janetzek
8aa9cafa5e make MapTile.node final 2014-02-07 21:50:08 +01:00
Hannes Janetzek
3ea697763f start quad tree for bounding boxes 2014-02-07 21:50:08 +01:00
Hannes Janetzek
59e6240766 fixup: MapRenderer 2014-02-07 21:50:08 +01:00
Hannes Janetzek
600bf2c105 add LineTexLayer randomize offset option 2014-02-07 21:50:08 +01:00
Hannes Janetzek
bb4bee7623 add GeometryUtils.squaredDistance(float[], a, b) 2014-02-07 21:50:08 +01:00
Hannes Janetzek
7ade143297 add ElementLayers.addMeshLayer/PolygonLayer
+ docs
2014-02-07 21:50:08 +01:00
Hannes Janetzek
cabd470709 cleanup: vtm-android 2014-02-07 21:50:08 +01:00
Hannes Janetzek
cefb9f367f cleanup: ItemizedIconLayer 2014-02-07 21:50:08 +01:00
Hannes Janetzek
aa1b2f32b1 cleanup: android-example 2014-02-07 21:50:08 +01:00
Hannes Janetzek
625c0ecc1c export slf4j api 2014-02-07 21:50:08 +01:00
Hannes Janetzek
76c7a49648 add RenderElement.getOffset() 2014-02-07 21:50:08 +01:00
Hannes Janetzek
8685b3331b update copyright, add authors 2014-02-07 21:50:08 +01:00
Hannes Janetzek
8157af9fb0 cleanup: remove orphaned file 2014-02-07 21:50:08 +01:00
Hannes Janetzek
9f7e8dbad7 formatter 2014-02-07 21:50:07 +01:00
Hannes Janetzek
842d20cf7b add BezierPath utility 2014-02-07 21:50:07 +01:00
Hannes Janetzek
bbaa19ef7b add GeometryBuffer.addPoint(Point) 2014-02-07 21:50:07 +01:00
Hannes Janetzek
83d36fe04b add Point.distance() 2014-02-07 21:50:07 +01:00
Hannes Janetzek
91d99c0efb add LineLayer.setDropDistance() for point reduction by distance 2014-02-07 21:50:07 +01:00
Hannes Janetzek
e80eae230c cleanup: remove redundant ipos 2014-02-07 21:50:07 +01:00
Hannes Janetzek
bfadf66053 increase minimal touch sloppiness to 2mm
#23
2014-02-02 00:06:53 +01:00
Hannes Janetzek
f95f31f5f3 fix: do not set uninitialized uniform 2014-02-02 00:06:53 +01:00
Hannes Janetzek
ccebf49e46 fix NPE: test mTileDataSource == null
fixes #34
2014-02-02 00:06:53 +01:00
Hannes Janetzek
ebc8cbcaf0 fix: reset currentTexId when surface is recreated
caused textured lines not to be rendered when resuming application
2014-02-02 00:06:53 +01:00
Hannes Janetzek
9b1eb04a51 docs 2014-02-02 00:06:53 +01:00
Hannes Janetzek
3c46fb15cf docs 2014-02-02 00:00:16 +01:00
Hannes Janetzek
f48144791b reset pinch scale delta when going into scale mode 2014-02-02 00:00:10 +01:00
Hannes Janetzek
a5c9b9edac reduce async task priority 2014-02-01 23:59:38 +01:00
Hannes Janetzek
5e722c091f fix: GridRenderer, do not recompile when no text is set
guess this fixes #29
2014-02-01 11:51:02 +01:00
Hannes Janetzek
b3125c607e fix: gwt compilation 2014-02-01 11:50:38 +01:00
Hannes Janetzek
f6f64deffb TileGridLayer 2014-01-31 03:56:30 +01:00
Hannes Janetzek
a828007c89 android example: use StamenToner bitmaps 2014-01-31 03:56:30 +01:00
Hannes Janetzek
50d9481d73 reduce default in-memory tile cache size 2014-01-31 03:56:29 +01:00
Hannes Janetzek
e99200cd61 cleanups 2014-01-31 03:56:29 +01:00
Hannes Janetzek
f631e6736f load mapsforge germany on low zoom-level... 2014-01-31 03:55:12 +01:00
Hannes Janetzek
8b645a0e8f Merge branch 'render_refactor' 2014-01-31 03:54:45 +01:00
Hannes Janetzek
ce69dde08a pass non-inverted scale to TextureRenderer 2014-01-31 03:42:22 +01:00
Hannes Janetzek
c5de7d6051 change parameter order to be more consistent 2014-01-31 03:42:21 +01:00
Hannes Janetzek
67d1813665 remove depth-projection from viewproj for tile rendering, again
- fixes issue with flickering when proxy tiles are drawn,
  where the depth buffer is used to remember previous
  clipping areas
2014-01-31 03:42:21 +01:00
Hannes Janetzek
e0e94f7286 cleanup TileRenderer 2014-01-31 03:42:21 +01:00
Hannes Janetzek
20ddff3d26 use depth clipping again but only when proxy tiles are drawn 2014-01-31 03:42:21 +01:00
Hannes Janetzek
5235e8483b refactor and cleanup RenderElement and related classes 2014-01-31 03:42:20 +01:00
Hannes Janetzek
e38c9a11ff use SimpleWorker to update PathLayer 2014-01-31 02:08:04 +01:00
Hannes Janetzek
e6c9bd09f1 fix NPE, handle CancellationException in BitmapTileLayer 2014-01-31 02:01:00 +01:00
Hannes Janetzek
3ad98603a4 fix: show markers that are partially on screen
this is more appropriate. closes #26
2014-01-29 03:57:03 +01:00
Hannes Janetzek
f5c162330a remove depth-buffer tile clipping
not needed anymore, yay!
2014-01-29 03:57:03 +01:00
Hannes Janetzek
a0111e09b7 MapRenderer: disable writes to stencil- and depth-buffer by default 2014-01-29 03:10:25 +01:00
Hannes Janetzek
bc28e0ed11 fix: LocationOverlay 2014-01-29 01:58:14 +01:00
Hannes Janetzek
be03c58402 update app
fixes #31
2014-01-29 01:23:58 +01:00
Hannes Janetzek
246d692dd7 cleanup: marker layer 2014-01-29 00:59:24 +01:00
Hannes Janetzek
aaf250dca4 show markers that are partially on screen 2014-01-29 00:56:50 +01:00
Hannes Janetzek
5ca313a9b2 fix: ItemizedLayer use item.getPoint()
closes #24
2014-01-29 00:54:34 +01:00
Hannes Janetzek
2ac7cfc7b9 add MapPosition.setByBoundingBox() 2014-01-28 17:45:35 +01:00
Hannes Janetzek
d52d761a5c add mapsforge activity to example 2014-01-28 17:45:08 +01:00
Hannes Janetzek
a7519724f8 fixup gwt 2014-01-28 07:31:09 +01:00
Hannes Janetzek
9b771595f8 reduce label flickering 2014-01-28 07:03:55 +01:00
Hannes Janetzek
beef0bfae9 more gesture improvements
good enough for today
2014-01-28 07:03:55 +01:00
Hannes Janetzek
a19a82cf6e no Closable for socket until Java 7
fixes #30
2014-01-28 05:02:24 +01:00
Hannes Janetzek
e300664a28 handle pivot for Viewport.rotateMap() and .scaleMap() consistenly 2014-01-28 05:01:36 +01:00
Hannes Janetzek
2525b60f86 improve gesture detection 2014-01-28 05:01:36 +01:00
Hannes Janetzek
0198f3d6af make start of move gesture dependent on dpi 2014-01-28 02:23:55 +01:00
Hannes Janetzek
0bc0d59446 start to improve gesture detection:
#21, #28
2014-01-28 01:57:00 +01:00
Hannes Janetzek
bda080f34f Merge branch 'refactor_labeling' 2014-01-28 01:03:19 +01:00
Hannes Janetzek
2c0eb751a7 disable clipping of way label segments for now 2014-01-28 01:01:15 +01:00
Hannes Janetzek
d70a6c5997 move WayDecorator to layers.tile.vector 2014-01-28 01:01:15 +01:00
Hannes Janetzek
b6d9ed254e splitup labeling 2014-01-28 01:01:15 +01:00
Hannes Janetzek
e620d15964 android: ScaleBar layer is back 2014-01-28 00:41:36 +01:00
Hannes Janetzek
cad5c1ed7b cancel tile loading when tile was removed from cache 2014-01-28 00:36:57 +01:00
Hannes Janetzek
3543b71671 fix NPE in LwHttp
hopefully this fixes #27, check mResposeStream != null.
release references to streams when socket is closed()
2014-01-28 00:36:57 +01:00
Hannes Janetzek
9351380645 fix: only write to cache when full content was read 2014-01-28 00:36:56 +01:00
Hannes Janetzek
666803250c fix: typo in api
fixes #25
2014-01-27 15:21:26 +01:00
Hannes Janetzek
c49618a653 Merge branch 'android_marker' 2014-01-27 15:16:53 +01:00
Hannes Janetzek
ffce767615 remove old Android.makeMarker() 2014-01-27 15:08:05 +01:00
Stephan Leuschner
9ec72aabe3 Update AndroidGraphics.java
add static makeMarker to create Marker from Drawable
2014-01-27 14:42:42 +01:00
Hannes Janetzek
8eb6377a69 fix: NPE in BitmapTileLayer
fixes #27
2014-01-27 14:35:24 +01:00
Hannes Janetzek
67edb98d12 fix deadlock: do not lock Viewport while calling MapAnimator
"GLThread 4500" prio=5 tid=11 MONITOR
at org.oscim.map.MapAnimator.updateAnimation(MapAnimator.java:~186)
  - waiting to lock <0x42105030> (a org.oscim.map.MapAnimator) held by tid=1 (main)

"main" prio=5 tid=1 MONITOR
    at org.oscim.map.Viewport.getMapPosition(Viewport.java:~111)
  - waiting to lock <0x42103368> (a org.oscim.map.Viewport) held by tid=11 (GLThread 4500)
  at org.oscim.map.MapAnimator.animateFling(MapAnimator.java:151)
2014-01-27 00:58:20 +01:00
Hannes Janetzek
d85782b055 add attribution/terms-of-use note 2014-01-26 21:58:39 +01:00
Hannes Janetzek
e0df6ce58a refactor: rename QuadTreeIndex to QuadTree 2014-01-26 20:36:08 +01:00
Hannes Janetzek
27dc7f1f2d refactor: rename QuadTree to Node 2014-01-26 20:36:07 +01:00
Hannes Janetzek
a42bd9684f LineLayer: drop line segments short than 1/8 2014-01-26 20:36:07 +01:00
Hannes Janetzek
457e3006a6 add debug draw for MeshLayer 2014-01-26 20:36:07 +01:00
Hannes Janetzek
4351ff82fc add FastMath.withinSquaredDistance() 2014-01-26 20:36:07 +01:00
Hannes Janetzek
7ae8ee4405 add GeometryUtils.squareSegmentDistance() 2014-01-26 20:36:07 +01:00
Hannes Janetzek
44fc754b6f OBB2D optimizaitons 2014-01-26 20:36:07 +01:00
Hannes Janetzek
77e2a6607c reduce default of bitmap tiles kept in memory 2014-01-26 20:36:07 +01:00
Hannes Janetzek
818e9ecbb8 what was this sqrt() for? 2014-01-26 20:36:06 +01:00
Hannes Janetzek
f8603dafe1 cleanup: Color 2014-01-26 20:36:06 +01:00
Hannes Janetzek
45b851c55c cleanup: Pool 2014-01-26 20:36:06 +01:00
Hannes Janetzek
0f02215e63 refactor: RenderElement:
- remove curItem
- rename verticesCnt -> numVertices
- add getter/setters
2014-01-26 20:36:06 +01:00
Hannes Janetzek
eff5935068 refactor: TextureItem:
- use different pools for TextLayer and bitmap tiles
  to always get the correct (matching) texture from
  pool.
- the common TextureItem pool is only used to provide
  the same api, it does not keep images or textures
2014-01-26 20:36:06 +01:00
Hannes Janetzek
fa2d3dd7a4 add GeometryUtils.area() for arrays 2014-01-26 20:36:06 +01:00
Hannes Janetzek
f2a140e414 add option to use MeshLayer for tile polygon rendering 2014-01-26 20:36:05 +01:00
Hannes Janetzek
dc37296750 use color from Area style in MeshLayer 2014-01-26 20:36:05 +01:00
Hannes Janetzek
36d540da18 Tessellator: process all polygons from GeometryBuffer
(not just the first)
2014-01-26 20:36:05 +01:00
Hannes Janetzek
a0586a1897 rename: ContinuousTask -> SimpleWorker 2014-01-26 20:36:05 +01:00
Hannes Janetzek
401b0bf2dc implement managing of tasks instances in ContinuousTask 2014-01-26 20:36:05 +01:00
Hannes Janetzek
c8d79ee6fc LineLayer.Renderer: pass relative scale 2014-01-26 20:36:05 +01:00
Hannes Janetzek
683e0733a5 add TileGridLayer wrapper for GridRenderer
set GridRenderer line- and text-style
2014-01-26 20:36:05 +01:00
Hannes Janetzek
baceacccd5 enable logging for gwt 2014-01-26 20:36:04 +01:00
Hannes Janetzek
ec1954a83a fix: gwt LwHttp emulation 2014-01-26 20:36:04 +01:00
Hannes Janetzek
9f626e3716 api changes: UrlTileSource
- move option to override getTileUrl() to UrlTileSource
- remove requirement to provide expected mime-type
- only need to use setExtension() when using the default
  url formatter.
2014-01-26 05:44:14 +01:00
Hannes Janetzek
cb629744ec testing tilecache for bitmap tiles 2014-01-25 23:35:20 +01:00
Hannes Janetzek
64c4c3b93c move getZoomLevelMin()/Max() to TileSource 2014-01-25 23:35:20 +01:00
Hannes Janetzek
a82da20981 TileCache: use dbName to acutally create multiple databases.. 2014-01-25 23:35:20 +01:00
Hannes Janetzek
1bda9aff3f LwHttp: take skip() position into account for writing to cache 2014-01-25 23:35:20 +01:00
Hannes Janetzek
305032707b google maps tiles 2014-01-25 23:35:19 +01:00
Hannes Janetzek
7f41a591c8 LwHttp: add workaround for bug in Android image decoder (around version 4.1.2) 2014-01-25 22:05:30 +01:00
Hannes Janetzek
ddb410fea0 rename DBG -> dbg, looks nicer imo 2014-01-25 21:35:22 +01:00
Hannes Janetzek
984a17ef35 LwHttp: add Buffer.skip() 2014-01-25 21:35:22 +01:00
Hannes Janetzek
3c133af4df LwHttp: provide user-agent in header 2014-01-25 21:35:22 +01:00
Hannes Janetzek
833f49eb35 refactor: theme...RenderInstruction -> theme.styles.RenderStyle 2014-01-25 20:42:32 +01:00
Hannes Janetzek
1e2837c33f reenable building layer in example 2014-01-25 20:41:48 +01:00
Hannes Janetzek
3e2a9a5187 rename: TileLayer.getTileLayer() -> .getTileRenderer() 2014-01-25 20:41:48 +01:00
Hannes Janetzek
142b2e143d android-example app name 2014-01-25 20:36:54 +01:00
Hannes Janetzek
5364651a94 cleanups 2014-01-25 20:36:54 +01:00
Hannes Janetzek
1170e4a91a implement LwHttp.Buffer.mark()/reset()
- fixes bitmap tile loading
2014-01-25 20:36:54 +01:00
Hannes Janetzek
a739c92f4a eclipse: gwt 2014-01-24 03:09:18 +01:00
Hannes Janetzek
93af135d6d eclipse: export slf4j 2014-01-24 03:09:08 +01:00
Hannes Janetzek
b2f0bd0e3d disable debug 2014-01-21 17:22:37 +01:00
Hannes Janetzek
154da99d40 fix: LwHttp cache writes 2014-01-21 16:51:30 +01:00
Hannes Janetzek
dc74949736 fix: sync ElementRenderer, add docs 2014-01-21 14:57:32 +01:00
Hannes Janetzek
404df03f25 cleanup: BitmapTileSource 2014-01-21 14:56:33 +01:00
Hannes Janetzek
b6cbc960f3 cleanup: VectorTileLoader 2014-01-21 14:56:14 +01:00
Hannes Janetzek
29189c77ff dbg-- 2014-01-21 05:42:03 +01:00
Hannes Janetzek
8890875a7f use FSAA on desktop 2014-01-21 05:32:37 +01:00
Hannes Janetzek
d2381e06fb add DebugTheme 2014-01-21 05:32:37 +01:00
Hannes Janetzek
1e34a823b3 cleanup: QuadTree 2014-01-21 05:32:37 +01:00
Hannes Janetzek
f2e1b33db5 cleanup: TextureItem 2014-01-21 05:32:32 +01:00
Hannes Janetzek
ec69fc7a68 fix typo 2014-01-21 05:29:40 +01:00
Hannes Janetzek
c027ebdbb4 update app 2014-01-21 05:25:16 +01:00
Hannes Janetzek
c8949194cc Merge branch 'unify_tilesources' 2014-01-21 05:24:03 +01:00
Hannes Janetzek
77088b84ad settings: export slf4j 2014-01-21 05:22:53 +01:00
Hannes Janetzek
9baf5b2b6e new BitmapTileLayer implementation 2014-01-21 05:22:53 +01:00
Hannes Janetzek
f9d262d6a7 cleanup 2014-01-21 05:22:53 +01:00
Hannes Janetzek
6e543303c6 simplify UrlTileDataSource initialization 2014-01-21 05:22:53 +01:00
Hannes Janetzek
94011804be add isValid() to Bitmap interface 2014-01-21 05:22:53 +01:00
Hannes Janetzek
652024c5dc fix: always initialize TileManager 2014-01-21 05:22:53 +01:00
Hannes Janetzek
c88d5707ad add ITileDataSink.setTileImage(bitmap) to interface 2014-01-21 05:22:53 +01:00
Hannes Janetzek
b70090ea3a refactor: add TileLayer.initLoader()
- need to initialize worker thread after (super) class is constructed
2014-01-21 05:22:53 +01:00
Hannes Janetzek
402cbe7e57 use LwHttp.Buffer to set limit on InputStream 2014-01-21 05:22:53 +01:00
Hannes Janetzek
9ed4bb6ec5 refactor: PbfTileDataSource -> UrlTileDataSource 2014-01-21 05:22:53 +01:00
Hannes Janetzek
764a62986e fix gwt: 'join' in PausableThread 2014-01-20 15:39:45 +01:00
Hannes Janetzek
ab2e82a456 Merge branch 'wip_android' 2014-01-19 22:57:40 +01:00
Hannes Janetzek
5b3c2ed1a8 TileCache: dont use ParcelFileDescriptor for now, cleanups 2014-01-19 22:57:17 +01:00
Hannes Janetzek
2fa0a53fdd cleanups 2014-01-19 22:57:17 +01:00
Hannes Janetzek
0b9e81a6c0 android-example: add BitmapTileLayer 2014-01-19 22:57:17 +01:00
Hannes Janetzek
350f6394fd vtm-android: dont force MapView to use MapActivity context 2014-01-19 22:57:17 +01:00
Hannes Janetzek
35d7d2c0b5 android-example: add theme chooser menu + stress test 2014-01-19 22:57:17 +01:00
Hannes Janetzek
e4eeae2821 cleanups: dont keep track of current theme in Map 2014-01-19 22:56:18 +01:00
Hannes Janetzek
b587990602 Merge branch 'tile_fade' 2014-01-19 22:55:49 +01:00
Hannes Janetzek
aba6cc5778 add tile fade effect:
use theme background color to overdraw tiles
2014-01-19 22:55:23 +01:00
Hannes Janetzek
90b005a2fd add MapRenderer.animate() to trigger animations on GL-Thread 2014-01-19 22:55:23 +01:00
Hannes Janetzek
2c7cd1c880 Merge branch 'wip_sync' 2014-01-19 22:53:48 +01:00
Hannes Janetzek
25c95da80c set MapTile.STATE_CANCEL when tile is cleared
in TileManager.jobCompleted clear tile when tile state is CANCEL
2014-01-19 22:51:27 +01:00
Hannes Janetzek
e76b0a3740 refactor TextRenderer, sync MapTile in Label-Thread 2014-01-19 22:51:27 +01:00
Hannes Janetzek
ec8821e557 cancel TileLoader job when thread shouldPause
- handle Exceptions in PbfTileDataSource, cleanup in finally{}
2014-01-19 22:51:27 +01:00
Hannes Janetzek
c2eac63ce6 fix: clear previous tile jobs when changing theme 2014-01-19 22:51:26 +01:00
Hannes Janetzek
0710e5776e fix deadlock on AndroidMap<>Viewport:
- on GL-Thread:
MapRenderer.draw()->MapAnimator->update()->AndroidMap.updateMap
                    [sync: Viewport       [sync: AndroidMap ]]
- on Mainloop:
AndroidMap.redrawMapInternal()->updateLayers()->Viewport.getMapPosition()
[sync:AndroidMap                               [sync:Viewport]]

... no need to sync on AndroidMap
2014-01-19 22:51:26 +01:00
Hannes Janetzek
42a6887ae2 fix: Color.fade() 2014-01-19 22:51:26 +01:00
Hannes Janetzek
348e63b4fb synchronize clearing TileLayer on its TileRenderer instead of global MapRenderer.drawlock 2014-01-19 22:51:26 +01:00
Hannes Janetzek
ab56e9c212 fix themes 2014-01-19 22:51:26 +01:00
Hannes Janetzek
2de6576765 fix PausableThread:
set 'mPausing = false' on thread after pause, not on call to proceed()
as the thread may already have been stopped in which case awaitPausing
will loop forever -- short: dont use thread utility classes you havent
written yourself :)
2014-01-19 22:51:26 +01:00
Hannes Janetzek
7d57b8e9ec merge Vec2 class into OBB2D 2014-01-19 22:51:26 +01:00
Hannes Janetzek
58e48088f9 update README 2014-01-17 21:19:57 +01:00
Hannes Janetzek
8a8cf64873 funky color path example 2014-01-17 21:09:38 +01:00
Hannes Janetzek
d76d5ca754 add Color.rainbow() 2014-01-17 20:43:16 +01:00
Hannes Janetzek
dd681e390d fix possible concurrent modification 2014-01-17 20:41:45 +01:00
Hannes Janetzek
143e981ad1 add MarkerLayer example 2014-01-17 19:23:10 +01:00
Hannes Janetzek
ec7b7276c5 flip MarkerLayer items over date-line 2014-01-17 19:21:55 +01:00
Hannes Janetzek
8ea6fef1ca improve MapRenderer
- add functions to bind shared VBOs
- make MapView field non-static
2014-01-17 19:19:01 +01:00
Hannes Janetzek
5e27740761 update slf4j android 2014-01-17 17:58:43 +01:00
Hannes Janetzek
f385725311 fix: async task, handle RejectedExecutionException 2014-01-17 15:13:04 +01:00
Hannes Janetzek
bfb86e0a57 use arrays for listeners (avoid allocating iterators) 2014-01-17 15:09:50 +01:00
Hannes Janetzek
828c6d9212 update README 2014-01-17 14:30:18 +01:00
Hannes Janetzek
6f14569da4 app++ 2014-01-17 14:16:05 +01:00
Hannes Janetzek
1f3124ac6e libs++ 2014-01-17 13:54:26 +01:00
Hannes Janetzek
a9db7989c3 add PathLayer example 2014-01-17 03:23:40 +01:00
Hannes Janetzek
4789ecb8d7 fix NPE: grow PathLayer point array 2014-01-17 03:22:46 +01:00
Hannes Janetzek
cf9bbec9a5 cleanup: remove mapsforge header template 2014-01-17 03:21:32 +01:00
Hannes Janetzek
4a5cfa5d5a add vtm-android-app submodule 2014-01-17 01:47:48 +01:00
Hannes Janetzek
96b5b09501 update JNI build instructions 2014-01-17 01:41:20 +01:00
Hannes Janetzek
d021ac4a6f fix html backend 2014-01-17 00:01:11 +01:00
Hannes Janetzek
b48f3fb1a2 move license files to root directory 2014-01-17 00:00:19 +01:00
Hannes Janetzek
b28ef3d877 update README 2014-01-16 23:15:24 +01:00
Hannes Janetzek
bb90488018 use TimSort from Android project 2014-01-16 23:14:24 +01:00
Hannes
1c7473e534 api: remove IRenderTheme.scaleStrokeWidth() 2014-01-16 23:14:24 +01:00
Hannes
aa5f11e754 update license headers 2014-01-16 23:14:24 +01:00
Hannes Janetzek
73e46e7a6f add sqlite tile cache 2014-01-14 18:20:54 +01:00
Hannes Janetzek
9ff8e149ef release handle to android native MotionEvent 2014-01-14 18:20:54 +01:00
Hannes Janetzek
98ea108b22 fix eclipse android project: compile with java 6 compliance mode 2014-01-14 18:20:54 +01:00
Hannes Janetzek
30714a3ba6 fix project classpath 2014-01-14 18:20:54 +01:00
Hannes Janetzek
05b0902754 add instructions for running GWT in superdevmode 2013-12-11 15:17:25 +01:00
Hannes Janetzek
ba52bfddbe add pluggable gesture detection
- extract inner Map.Layers class
- extract inner MapView.Map class -> AndroidMap
2013-12-08 20:54:24 +01:00
Hannes
68bfa27a99 return TileSource for chaining 2013-12-08 20:54:24 +01:00
Hannes Janetzek
50fb6c1531 remove deprecated method 2013-12-03 20:31:17 +01:00
Hannes Janetzek
3630155ad0 move vtm/jni to separate c project 2013-12-03 20:10:56 +01:00
Hannes Janetzek
c16ffef0bd add cacheLimit parameter to TileLayer constructor 2013-12-03 19:53:42 +01:00
Hannes Janetzek
16f4d85086 organize imports 2013-12-03 19:22:19 +01:00
Hannes Janetzek
467fbb386e Merge branch 'fix_mapsforge' 2013-12-03 01:19:25 +01:00
Hannes Janetzek
e6eecebf4e use IOUtils to close file 2013-12-03 01:18:53 +01:00
stleusc
0a474bd3d9 Close FileHandle 2013-12-03 01:11:08 +01:00
Hannes Janetzek
940a32668e add line-clipping to TileClipper 2013-12-03 01:09:59 +01:00
Hannes Janetzek
50ec62264e settings: link android libs folder 2013-12-03 01:09:59 +01:00
Hannes Janetzek
02706d40ef fix vtm-gdx-android build 2013-12-03 01:09:59 +01:00
Hannes Janetzek
294d50c50c Update README.md 2013-11-30 22:41:17 +01:00
Hannes Janetzek
4eae1575a3 workaround OpenJDK quirks - bytecode missing an implicit cast 2013-11-30 05:55:36 +01:00
Hannes Janetzek
ae414292c1 add some bitmap tile-sources 2013-11-27 15:40:39 +01:00
Hannes Janetzek
bda65d6ad3 remove orphaned class 2013-11-27 15:36:20 +01:00
Hannes Janetzek
9314e2bc0f build JNI on windows 2013-11-27 15:35:46 +01:00
Hannes Janetzek
f7308f748c libs++ 2013-11-26 14:02:21 +01:00
Hannes Janetzek
6c66b2d6eb html: extend GwtGL20 instead of emulating it 2013-11-26 13:57:01 +01:00
Hannes Janetzek
c40fc7faa3 remove orphaned file 2013-11-26 13:43:02 +01:00
Hannes Janetzek
104a9c689f use floats in LineClipper 2013-11-26 13:43:02 +01:00
Hannes Janetzek
215d1261ca SmbolLayer, use offset of individual items. Fixes #6 2013-11-26 13:43:02 +01:00
Hannes Janetzek
7533b98780 quadtree: add getParent(), abort on invalid index 2013-11-26 13:43:02 +01:00
Hannes Janetzek
153c9b3ec5 add list screen for examples 2013-11-26 13:43:02 +01:00
Hannes Janetzek
e33a863d3b set MapView clickable/focusable by default 2013-11-26 13:43:02 +01:00
Hannes Janetzek
bb02b5d461 add ext libs submodule 2013-11-25 18:05:55 +01:00
Hannes Janetzek
b9b1830451 update jni build docs 2013-11-23 21:19:41 +01:00
Hannes Janetzek
1d6bdcb0f2 simplify map listener handling 2013-11-23 21:19:41 +01:00
Hannes Janetzek
0b880e0f0c fix: clear labels should not always trigger relabeling 2013-11-23 21:19:41 +01:00
Hannes Janetzek
5cb3eb9dd1 update gwt 2013-11-23 21:19:41 +01:00
Hannes Janetzek
2d18e7d25f switch to slf4j 2013-11-23 21:19:40 +01:00
Hannes Janetzek
1cf2ea60a7 initialize PathLayer array properly 2013-11-23 21:19:40 +01:00
Hannes Janetzek
33d5e39869 reduce number of array accesses 2013-11-23 21:19:40 +01:00
Hannes Janetzek
7f4825afa5 GeometryBuffer: use 'pointLimit' field in addPoint 2013-11-23 21:19:40 +01:00
Hannes Janetzek
46b641c6cc update formatter 2013-11-23 21:19:40 +01:00
Hannes Janetzek
afeaf60c3f make extrusion-layer themeable 2013-11-23 21:19:40 +01:00
Hannes Janetzek
a5c3f92826 add Color int-to-float utility 2013-11-23 21:19:40 +01:00
Hannes Janetzek
d0dd09a5a4 docs 2013-11-23 21:19:40 +01:00
Hannes Janetzek
bd0b45d0b4 fix android min-sdk 2013-11-23 21:19:40 +01:00
Hannes Janetzek
75206211f8 ignore++ 2013-11-23 21:19:40 +01:00
Hannes Janetzek
0d62cc5279 add GdxMapApp.init(GdxMap, config, size) for simple test-cases 2013-11-23 21:19:40 +01:00
Hannes Janetzek
eb8fd81aef use TileClipper for mapsforge tiles 2013-11-23 21:19:40 +01:00
Hannes Janetzek
d44489819a add TileClipper 2013-11-23 21:19:40 +01:00
Hannes Janetzek
6a28480510 PolygonLayer: repeat pattern textures 2013-11-23 21:19:40 +01:00
Hannes Janetzek
3b92134b2a TextRenderer: handle 'clear' on update to remove all previous labels 2013-11-23 21:19:40 +01:00
Hannes Janetzek
af4df27d42 fix GeometryBuffer.clear(), first index should never be -1 2013-11-23 21:19:40 +01:00
Hannes Janetzek
19ee048582 add theme debugging switch 2013-11-23 21:19:40 +01:00
Hannes Janetzek
6bc24595da place area text on polygon 2013-11-23 21:19:40 +01:00
Hannes Janetzek
03908dc437 move theme textures 2013-11-23 21:19:40 +01:00
Hannes Janetzek
82061f1410 RenderTheme:
- use Area 'stroke' for rendering
- rename style-outline to outline-layer
- add 'outline' option to line for referencing outline-layer
- Text/Symbol remove 'symbol' String, only hold TextureRegion for symbol
- rename text options: font-size to size, font-style to style
- some refactoring
2013-11-23 21:19:40 +01:00
Hannes Janetzek
0ae1f99269 disable special 'thin-line' rendering again 2013-11-23 21:19:40 +01:00
Hannes Janetzek
0762e13c0f RenderTheme: add <m select="first">
- this stops checking sub-rules after first match
- the rules renderinstruction will only applied when
  any subrule matched
2013-11-23 21:19:40 +01:00
Hannes Janetzek
fc1a907af0 fix: no NPE when theme is invalid 2013-11-23 21:19:40 +01:00
Hannes Janetzek
9189cbd51c move ThemeException to IRenderTheme 2013-11-23 21:19:40 +01:00
Hannes Janetzek
18d0bfc3c5 make TileManager.jobQueue private
- use hasTileJobs(), getTileJob(), jobCompleted() instead
2013-11-23 21:19:39 +01:00
Hannes Janetzek
e35f39c9f4 add BufferObject.isMaxFill(), used to reduce number of in-memory tiles 2013-11-23 21:19:39 +01:00
Hannes Janetzek
af37be4502 BufferObject: 'flip' buffer automatically when position != 0 2013-11-23 21:19:39 +01:00
Hannes Janetzek
c07709803c fix animateToBBox 2013-11-23 21:19:39 +01:00
Hannes Janetzek
8ab84c4e85 updates themes:
- nicer amenity area color
- add osmarender symbols
- use 'extrusion' layer styles
- keep meadow and conservation below residential
- fade wood on zoomlevel 8
2013-11-23 21:18:50 +01:00
Hannes Janetzek
5367fe4537 fix: annotations.jar missing from classpath 2013-11-23 21:11:05 +01:00
Hannes Janetzek
03f5c7fc39 ignore++ 2013-11-23 21:11:05 +01:00
Hannes Janetzek
82f169f2d5 TagSet: refactor + add docs
- removed duplicate hasKey/hasValue functions
- renamed asString -> toString
2013-11-23 21:11:05 +01:00
Hannes Janetzek
a6c2ac1d41 cleanup: remove orphaned class 2013-11-23 21:11:05 +01:00
Hannes Janetzek
d1fa4d426f update GWT emulation 2013-11-23 21:11:05 +01:00
Hannes Janetzek
53572671de add ThemeException, formatting 2013-11-23 21:11:04 +01:00
Hannes Janetzek
b5ec02e2a0 init static fillCoordinates outside of constructor 2013-11-23 21:11:04 +01:00
Hannes Janetzek
f236fa33de add 'Extrusion' RenderInstruction to RenderTheme 2013-11-23 21:11:04 +01:00
Hannes Janetzek
206003e1ec improve tag-replacement(for theme cache) in VectorTileLoader 2013-11-23 21:11:04 +01:00
Hannes Janetzek
7c090e921a remove 'heigh','minHeight' fields from MapElement 2013-11-23 21:11:04 +01:00
Hannes Janetzek
5775c8cbf3 use @CheckReturnValue for safer pool/Inlist usage 2013-11-23 21:11:04 +01:00
Hannes Janetzek
d771d70c3a remove TagSet.EMTPTY 2013-11-23 21:11:04 +01:00
Hannes Janetzek
47e6602f9b add GdxMap.onKeyDown() for direct use in subclasses, should be in Map maybe 2013-11-23 21:11:04 +01:00
Hannes Janetzek
f4224eb4d1 gdx: update to current libgdx API 2013-11-23 21:11:04 +01:00
Hannes Janetzek
3c3d68d073 fix warning for MatchingCacheKey.equals() 2013-11-23 21:11:04 +01:00
Hannes Janetzek
7ef611945d Tessellator: formatting, dbg-- 2013-11-23 21:11:04 +01:00
Hannes Janetzek
f807e003fd TextureItem: docs 2013-11-23 21:11:04 +01:00
Hannes Janetzek
9107beff7e throw exception when layer type is invalid 2013-11-23 21:11:04 +01:00
Hannes Janetzek
d7b3ef43d6 use default glCullFace 2013-11-23 21:11:04 +01:00
Hannes Janetzek
538998cb83 throw exception when BufferObjects got lost 2013-11-23 21:11:04 +01:00
Hannes Janetzek
3e4aa25446 increase MAX_ZOOM default 2013-11-23 21:11:04 +01:00
Hannes Janetzek
f34d23ca18 back to default OSM service 2013-11-23 21:11:04 +01:00
Hannes Janetzek
0cf7364c78 TextRenderer: cleanup, use label in loop 2013-11-23 21:11:04 +01:00
Hannes Janetzek
620ce368b5 use CheckReturnValue for BufferObject.release() 2013-11-23 21:11:04 +01:00
Hannes Janetzek
5b2cd72940 fix: cast to long for shift 2013-11-23 21:11:04 +01:00
Hannes Janetzek
92abdbb328 also *throw* exception 2013-11-23 21:11:04 +01:00
Hannes Janetzek
c1bb637fbf fix: SymbolLayer first item from prevTextures could not have been removed 2013-11-23 21:11:04 +01:00
Hannes Janetzek
9653c02b46 add PointF 2013-11-23 21:11:04 +01:00
Hannes Janetzek
1226e6c292 add MapPosition(lat,lon,scale), Map.setMapPosition(lat,lon,scale) 2013-11-23 21:11:04 +01:00
Hannes Janetzek
170e8287ab add GeometryBuffer.translate(x,y)/scale() functions 2013-11-23 21:11:04 +01:00
Hannes Janetzek
01d98cbcb7 add Color.fade(color, alpha) 2013-11-23 21:11:04 +01:00
Hannes Janetzek
32d17cca18 utils.pool: remove debug + docs 2013-11-23 21:11:03 +01:00
Hannes Janetzek
113f8180cc reset GL program and texture state each frame 2013-11-23 21:11:03 +01:00
Hannes Janetzek
4ccc8ed147 add TileSet.contains(Tile) 2013-11-23 21:11:03 +01:00
Hannes Janetzek
68cd2f345a GeometryUtils: add docs 2013-11-23 21:11:03 +01:00
Hannes Janetzek
ed7ff6e7a1 improve LineLayer rendering 2013-11-23 21:11:03 +01:00
Hannes Janetzek
c05710fcdb oscim.core.Tag: cleanups
- consistent String constants
2013-11-23 21:11:03 +01:00
Hannes Janetzek
2db1cf8b6c org.oscim.backend: docs and cleanups 2013-11-23 21:11:03 +01:00
Hannes Janetzek
a9d9c97bff move 'fillCoordinates' and uploadLayers from MapRenderer to ElementRenderer
- handle MeshLayer in ElementRenderer
2013-11-23 21:11:03 +01:00
Hannes Janetzek
c519a4f34b start of MeshLayer for 2D Meshes w/ tessellation 2013-11-23 21:11:03 +01:00
Hannes Janetzek
836f6a60e0 improve Tessellator, no more 'synchronized' needed
- pass VertexItem arrays to tessGetVertices/Indices until
  everything is fetched
- re-reverse vertices in jni
2013-11-23 21:11:03 +01:00
Hannes Janetzek
768df7f6d6 some hints for building jni 2013-11-23 21:11:03 +01:00
Hannes Janetzek
3161013481 add VertexItem.getSize() 2013-11-23 21:11:03 +01:00
Hannes Janetzek
39c0fcafea share GL reference in RenderElement 2013-11-23 21:11:03 +01:00
Hannes Janetzek
47b8a379a4 ignore++ 2013-11-23 21:11:03 +01:00
Hannes Janetzek
beba45fcdf use ArrayUtils.reverse(), some cleanups and docs 2013-11-23 21:11:03 +01:00
Hannes Janetzek
4c77ae6c4b add ArrayUtils.reverse() 2013-11-23 21:11:03 +01:00
Hannes Janetzek
178f096b60 add Inlist.appendList(), rename append() to appendItem() 2013-11-23 21:11:03 +01:00
Hannes Janetzek
3782ab8f57 project settings: remove cdt builder 2013-11-23 21:11:03 +01:00
Hannes Janetzek
86a77a77d6 update to new libgdx api 2013-11-23 21:11:03 +01:00
Hannes Janetzek
0c175119b9 desktop: remove duplicated GdxGL20, wrap LwjglGL20 2013-11-23 21:11:03 +01:00
Hannes Janetzek
1fd50d1faa desktop: export jars 2013-11-23 21:11:03 +01:00
Hannes Janetzek
c720cf22aa consistent formatting 2013-11-23 21:10:22 +01:00
Hannes Janetzek
57dfd91378 add TestLogger 2013-11-23 21:10:21 +01:00
Hannes Janetzek
ab53fecce5 vtm-gdx: key for tronrender theme 2013-11-23 21:10:21 +01:00
Hannes Janetzek
5a602786f3 add some example code 2013-11-23 21:10:21 +01:00
Hannes Janetzek
31e1fce550 settings: formatter 2013-11-23 21:10:21 +01:00
Hannes Janetzek
b7b15e120a use jars from vtm-ext-libs 2013-11-23 21:10:21 +01:00
Hannes Janetzek
973949180f add FIXME 2013-11-23 21:10:21 +01:00
Hannes Janetzek
425c12593b enable PolygonLayer pattern textures and repeat (tile_size/texture_width) times 2013-11-23 21:10:21 +01:00
Hannes Janetzek
fa28799a5b fix: also clear unused ELEMENT_ARRAY vbos 2013-11-23 21:10:21 +01:00
Hannes Janetzek
5c011a2402 reduce points on-the-fly while reading from mapfile 2013-11-23 21:10:21 +01:00
Hannes Janetzek
8a2060ca6e make constructor public 2013-11-23 21:10:21 +01:00
Hannes Janetzek
e40d7136f1 FIX: jogl seems to be picky about flip to limit reads 2013-11-23 21:10:21 +01:00
Hannes Janetzek
7e6833d5fd try to load external themes from asset path first 2013-11-23 21:10:21 +01:00
Hannes Janetzek
21020abcbd theme: add osmarender patterns 2013-11-23 21:10:21 +01:00
Hannes Janetzek
da4d1c1ee7 use libtess-jni in ExtrusionLayer, remove Triangle 2013-11-23 21:10:20 +01:00
Hannes Janetzek
bc3885cd54 remove commented code 2013-11-23 21:10:20 +01:00
Hannes Janetzek
8cc115a108 fix: make updateAnimation synchronized 2013-11-23 21:10:20 +01:00
Hannes Janetzek
4aae6c0a09 fix MapAnimator: ensure 'adv' is within 0..1 2013-11-23 21:10:20 +01:00
Hannes Janetzek
3608e49885 formatting 2013-11-23 21:10:20 +01:00
Hannes Janetzek
df9d94ac51 simplify LayerRenderer, move setMatrix to ElementRenderer 2013-11-23 21:10:20 +01:00
Hannes Janetzek
19b32adc34 add docs 2013-11-23 21:10:20 +01:00
Hannes Janetzek
5ce9024eae use MapRenderer.frametime 2013-11-23 21:10:20 +01:00
Hannes Janetzek
c093fe3b0c add TouchListener Interface 2013-11-23 21:10:20 +01:00
Hannes Janetzek
ba9300da91 API: remove Map.setMapCenter() -> use Map.setMapPosition 2013-11-23 21:10:20 +01:00
Hannes Janetzek
510c201e17 jni: add missing include 2013-11-23 21:10:20 +01:00
Hannes Janetzek
7dde869f4a refactor: utils.GlUtils -> renderer.GLUtils, utils.Matrix4 -> renderer.GLMatrix
- init 'GL' handle of rendering classes in MapRenderer.onSurfaceCreated,
  at this point handle is safe to use, i.e. GL context is available
- all LayerRenderer share one static 'GL' field now
2013-11-23 21:10:20 +01:00
Hannes Janetzek
83a276becf cleanups 2013-11-23 21:10:20 +01:00
Hannes Janetzek
4fadd929ee add docs 2013-11-23 21:10:20 +01:00
Hannes Janetzek
f049673412 add file header 2013-11-23 21:10:20 +01:00
Hannes Janetzek
43de62f4bc use Closeable interface in IOUtils 2013-11-23 21:10:20 +01:00
Hannes Janetzek
eab0f5e87a remove unused functions 2013-11-23 21:10:20 +01:00
Hannes Janetzek
57b94e1d5d theme: use our schema 2013-11-23 21:10:20 +01:00
Hannes Janetzek
0dc0ec9394 cleanup VectorTileLoader 2013-11-23 21:10:20 +01:00
Hannes Janetzek
eada09d060 API: SymbolItem add set(x,y,symbol,billboard) 2013-11-23 21:10:20 +01:00
Hannes Janetzek
61e9deb101 use new GeometryBuffer functions 2013-11-23 21:10:20 +01:00
Hannes Janetzek
949ebb5d8e API: GeometryBuffer add getNumPoints(), getPoint():PointF
- ignore start of new geometry when the current is empty
2013-11-23 21:10:20 +01:00
Hannes Janetzek
1a4e3b4c7c combine mStrokeScale and mLineScaleFactor 2013-11-23 21:10:20 +01:00
Hannes Janetzek
d91402da3c add getters for MapTile state, modify 'state' only within package
- clear tile in TileManager when loading has failed
2013-11-23 21:10:19 +01:00
Hannes Janetzek
0107ade039 fix MapAnimator.animateTo()
- cleanups
2013-11-23 21:10:19 +01:00
Hannes Janetzek
f6bb944907 API: add TileSet.{lockTiles,releaseTiles,setTiles} 2013-11-23 21:10:19 +01:00
Hannes Janetzek
e5761ef601 fix warnings, cleanups 2013-11-23 21:10:19 +01:00
Hannes Janetzek
1421a1f6b6 API: remove TileSource.getMapInfo(), cleanups
- move MapInfo to mapfile package
2013-11-23 21:10:19 +01:00
Hannes Janetzek
1738bfd0bc remove DebugSettings class 2013-11-23 21:10:19 +01:00
Hannes Janetzek
4f1b3f262b refactor and document Map
- merge Layers into Map
- change UpdateEvent to Map.UpdateListener
- make updateLayers protected
2013-11-23 21:10:19 +01:00
Hannes Janetzek
9a82c24a89 cleanup and document Viewport
- rename project() to toScreenPoint()
2013-11-23 21:10:19 +01:00
Hannes Janetzek
3b5539da22 cleanup: unused code 2013-11-23 21:10:19 +01:00
Hannes Janetzek
b71ef1667c remove obsolete class 2013-11-23 21:10:19 +01:00
Hannes Janetzek
96b582b58d fix function signature 2013-11-23 21:10:19 +01:00
Hannes Janetzek
7a35bb48b1 API: PolygonLayer add addPolygon(GeometryBuffer) 2013-11-23 21:10:19 +01:00
Hannes Janetzek
15aa35e56f API: LayerRenderer add isReady() 2013-11-23 21:10:19 +01:00
Hannes Janetzek
7f4cdc86bc workaround: strip shader 'precision' qualifier for desktop GL 2013-11-23 21:10:19 +01:00
Hannes Janetzek
131876463a add jni build instructions and remove build files 2013-11-23 21:10:19 +01:00
Hannes Janetzek
36a721a8e1 fixup Layer 2013-11-23 21:10:19 +01:00
Hannes Janetzek
a660048bcb gdx: simplify sub-classing GdxMap apps, add createLayers() 2013-11-23 21:10:19 +01:00
Hannes Janetzek
1498325ecd settings: export libs and projects 2013-11-23 21:10:19 +01:00
Hannes Janetzek
1c0315cd54 docs 2013-11-23 21:10:19 +01:00
Hannes Janetzek
d50a6fa203 fix: assets path links for eclipse 2013-11-23 21:10:19 +01:00
Hannes Janetzek
876b8b6d37 refactor: IRenderCallback -> IRenderTheme.Callback
- more consistent function names
2013-11-23 21:10:19 +01:00
Hannes Janetzek
1137f48882 fix: ensure that variables are not modified while rendering 2013-11-23 21:10:19 +01:00
Hannes Janetzek
2f9e303889 refactor: for -> while 2013-11-23 21:10:19 +01:00
Hannes Janetzek
027c2e7618 theme: change some theme attribute names and fix renderTheme.xsd
- element '<use-* name="x">' changed to <* use="x">
- style 'name' attribute changed to 'id'
2013-11-23 21:10:18 +01:00
Hannes Janetzek
8fe8c3a1f2 refactor: merge BitmapUtils.createBitmap() into CanvasAdapter 2013-11-23 21:10:18 +01:00
Hannes Janetzek
0f52eff9c9 comment out all InputLayer stuff 2013-11-23 21:10:18 +01:00
Hannes Janetzek
4e01de31f7 some event mechanism 2013-11-23 21:10:18 +01:00
Hannes Janetzek
5389f59df0 jni: use double coordinates in Triangle. try to return safely when internal error occured 2013-11-23 21:10:18 +01:00
Hannes Janetzek
67a3cbadf7 package/naming reorganization:
- RenderLayer -> LayerRenderer
  as this LayerRenderer just the rendering implementation of a Layer
  - not a 'layer' itself
- move renderer.sublayer.*Renderer into their respective *Layer classes
- move layers.labeling to layers.tile.vector.labeling
  (until there is a common labeling framework)
- remove layers.overlay
  - move Marker stuff to layers.marker
- merge TileRenderer into TileRenderLayer

- rename renderer.sublayers to renderer.elements
- move layers.tile.* to tiling package
- move tilesource.* to tiling.source

- rename oscim.view -> oscim.map
2013-11-23 21:09:30 +01:00
Hannes Janetzek
c6eedc4df7 eclipse: link relative assets path 2013-10-09 02:38:01 +02:00
Hannes Janetzek
7c0e1540cb RenderTheme: ignore missing symbol atlas for now. formatting 2013-10-09 02:38:01 +02:00
Hannes Janetzek
d05c4ad0d1 return null when asset cannot be read 2013-10-09 02:38:01 +02:00
Hannes Janetzek
6f2f74089b theme: start porting osmarender theme 2013-10-09 02:38:01 +02:00
Hannes Janetzek
e43545eec9 html: fix
- maybe some 'dependency injection' might help here
  behaviour of static vars is kind of nasty with GWT
2013-10-09 02:38:01 +02:00
Hannes Janetzek
3eca8ee8b4 remove orphaned classes 2013-10-09 02:38:01 +02:00
Hannes Janetzek
0aa7818731 API change: RenderLayer
- use setReady(bool) instead of public field
- no more implicit call to compile() when 'newData' is true
  -> call compile() when needed
- make RenderLayer function protected
2013-10-09 02:38:01 +02:00
Hannes Janetzek
eb1e8b63c5 refactor: extract animation stuff from Viewport into MapAnimator 2013-10-09 02:38:01 +02:00
Hannes Janetzek
51c2c5d62a optimize: inline temporary variable in shader 2013-10-09 02:38:01 +02:00
Hannes Janetzek
2474fe621b ITileCache: remove setStoragePath from API 2013-10-09 02:38:01 +02:00
Hannes Janetzek
6fbfeb2848 refactor: change Layer.destroy to Layer.onDetach 2013-10-09 02:38:01 +02:00
Hannes Janetzek
d397624fdc refactor: PointD -> Point, remove PointF 2013-10-09 02:38:00 +02:00
1558 changed files with 125495 additions and 67028 deletions

11
.gitattributes vendored Normal file
View File

@@ -0,0 +1,11 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.sh text
*.java text
*.xml text
*.js text
*.css text
*.svg text

15
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,15 @@
## How to contribute
As an open source project, we welcome new contributors and appreciate your help.
Before you start working on an unresolved issue or try to implement a new feature, please contact us via our public [mailing list](https://groups.google.com/group/mapsforge-dev).
You may also create a new issue on [Github](https://github.com/mapsforge/vtm/issues) or comment on an existing one to describe your ideas. We will then discuss the best way to realize your proposal and figure out how we can help you to get started quickly.
If you are only requesting a small change in the code, you may attach a patch file to the corresponding issue, but it is best to create a pull request on Github. Make sure that your patch is derived from the latest version in our **master** repository, otherwise we might be unable to apply it. Please follow our code and style conventions.
Also please keep the pull request commits squashed, in order to avoid the clutter in repository and have only the finally changed files together. One way is described [here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
Regarding syntax make sure your IDE uses for indentation 4 spaces (no tabs) and follow the conventions you already see in the code.
Please note that the VTM project is licenced under the [GNU LGPL3 licence](http://www.gnu.org/licenses/lgpl.html). Thus, all your contributions are going to be published under this license.

48
.gitignore vendored
View File

@@ -1,24 +1,34 @@
*/bin/*
*/gen/*
*/obj/*
target/
build/
robovm-build
*.o
*.jar
*.so
*.class
vtm/jni/jni-headers/
vtm/jni/build*
vtm/jni/*.mk
vtm/jni/memcpy_wrap.c
vtm/jni/poly2tri/
vtm/libs/
vtm-gdx-html/war/assets/
vtm-gdx-html/war/WEB_INF/
vtm-gdx-html/war/org.oscim.gdx.GwtDefinition/
vtm-gdx-html/gwt-unitCache
vtm-gdx-ios/
vtm-spatialite/
vtm-spatialite-android/
vtm-ext-libs/
tmp/
themes/
vtm/assets/freizeitkarte/
vtm/jni/target/
/vtm-tests/tmp/
/vtm-web/war/
/vtm-web/assets/
/vtm-web/gwt-unitCache
/vtm-web-app/assets/
/vtm-web-app/src/main/webapp/
/vtm-web-js/assets/
/vtm-web-js/src/main/webapp/
/vtm-spatialite/
/vtm-spatialite-android/
/vtm-examples/
/vtm-osmscout/
.gradle
.idea
*.iml
.settings
.classpath
.project
project.properties
local.properties
/ma*/

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "libtess2"]
path = jni/jni/libtess2
url = https://github.com/memononen/libtess2.git

22
.travis.yml Normal file
View File

@@ -0,0 +1,22 @@
sudo: false
language: android
jdk:
- oraclejdk8
android:
components:
- platform-tools
- tools
- build-tools-25.0.2
- android-25
- extra-android-m2repository
env:
global:
- GRADLE_OPTS="-Xmx2048m"
- secure: sW674wuFZOuoX7jHQHDbX3j8NxL8JxR07cyq+CrrqJ537dU9lxWQmMBRUpOb+p/q7sQ74PUtiKJkmFgKCSJSAKY+nr6GJ8P/q6u5TUKbmUWODSn8znehX2zualfvFwpF4PILok/wUzXBQE62jn4lUua7cMdsHRMNHbLmKqBoVL0meObDDjsaJ/RCbOPuruy3FmgvXPp0+Y4zl1GsklDSyjFzg4LBzjAk9Ryvh1O4zvJBkkyfCgurLKCnOKIPy3v5fPMS9oDfO1aarAVGoZZe416pvTW4hb8cdB6kn9XWYDob4NDFX/sP5k7XIhd/NAIn9LrKFg0sLtATaKLX+BcasF1CgDR/u6+SEeQd5QaRF7Go2Nq5Ltuu4OIFONI2qhEeVDDK6Otf2WSWj9KPno2GHuumBfbg4ypWoJgmZrMXk8JeVV/OP/0jIQz3p/7yfF21X1XBEqYaVHPAMKdEYYkCSa46KfACyOt6LfnkuCHtoTOpFo7sq0omIA2HOtpIx1u3vMBUyAbQqT6cokkKB1b6gNTFwhHc+8ybfLFPljJB8cWshI+V/b06S6fekRmvTNxvDykWNsdlkENBYqc9hMfjcT4hO4K+76SWN62mimQYODvFyfTVMC7WkQ3k/XEnmqUPV5XkbaILbS1d/tA57N148FiJ5/QXtI6Y94imubYyVqU=
- secure: AdKSZKA4gMuKXI4X4dQNJqcMv5OmPIHdN8fpy55Y9yoOQPQHZE3Zwc4QDWBh20q298jyEC854tVTPTysdZ7h+2s2FhsprYv1Bt/QNzKIrLpeIMj2quuVGMbdPuk08y55gost94KwVLJv0sIDpRlB/PEQkA7Mg/UDsT9zR8E1Ms5x+ul2C8e1ag0zzNl1wVnT5jY8WCp74uA/XXCcJl/80qT1stUERazCKwbKNo007hi7rdm4HA7YGevORq8e2r67je+WIBZUAwrHT0Zjuo4ibwUii4LdwvjuN3w0Z6e9Wf4x5bBqGgnih0T31uom2yPjNx+U/c2AWI+Nxfy/SEF2U+9bjBEZ3ZhI7F1B9ofXo2mhvvsVDiUrymMBbG2V64C9kAzeUh7xIBTqIrbdtpAEBV9FlLAtF2swVTwtCgZgcVTOt3RKXCi3X3nk3cuH7PAorFa/QGfT4xxVu2011FVAt2Rm7SD0ZWztZTSTz/4Nt/egtGBOJfrCc7oLEygLzDmLqsqCwCROITVQjWLjrtqDyLteaNiSXeNIQMKun3izApbXnHmXB+FV3R3EZocboqk3v5bmPTahnG6Ghc2zknWyyxSx+O9qIfOpHUL8JMJiT82lUQUeibtCn7DCE8wVQ/gYC5i+a+KO/d3NemSzIFlZ8aoUiEPYq18dYlsDXeLXwF0=
script:
- ./gradlew clean build
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
./gradlew uploadArchives -PSONATYPE_USERNAME="${SONATYPE_USERNAME}" -PSONATYPE_PASSWORD="${SONATYPE_PASSWORD}";
fi

View File

@@ -1,38 +1,72 @@
## VTM - Very experimental Tile Map library
[![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/vtm.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapsforge%22)
[![Build Status](https://travis-ci.org/mapsforge/vtm.svg?branch=master)](https://travis-ci.org/mapsforge/vtm)
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](http://www.gnu.org/licenses/lgpl-3.0)
Future development branch based on https://github.com/opensciencemap/vtm-android
# V™
VectorTileMap is part of the OpenScienceMap project, developed at University of Bremen.
http://www.opensciencemap.org
VTM was developed within the [OpenScienceMap](https://github.com/opensciencemap) project.
### Features
**This fork continues VTM development. And provides compatibility with latest [Mapsforge](https://github.com/mapsforge/mapsforge).**
See the **[integration guide](docs/Integration.md)** and [changelog](docs/Changelog.md). And read through [how to contribute](.github/CONTRIBUTING.md) guidelines.
If you have any questions or problems, don't hesitate to ask our public [mailing list](https://groups.google.com/group/mapsforge-dev) for help.
## Features
- Java map library
- OpenGL vector-tile rendering
- Themeable vector layers
- Support for multiple tile sources: primary opensciencemap (.vtm)
- vector: partially mapbox vector-tile and mapsforge files
- bitmap: any quadtree-scheme tiles as texture
- Backends for Android, Desktop and HTML5/WebGL (through libgdx and GWT)
- Support for multiple tile sources:
- OpenScienceMap (.vtm)
- Mapsforge (.map)
- Mapbox tiles (.mvt)
- GeoJSON tiles
- Raster tiles: any quadtree-scheme tiles as texture
- Backends:
- Android (optional libGDX)
- iOS (using libGDX/RoboVM, [instructions](docs/ios.md))
- Desktop (using libGDX/LWJGL)
- HTML5/WebGL (using libGDX/GWT, [instructions](docs/web.md))
### Notes
- To set up your own tile server for .vtm tiles see https://github.com/opensciencemap/TileStache/tree/master/TileStache/OSciMap4
- Almost everything is still in early/experimental stage and subject for being rewritten
- pull requests welcome :)
### Projects
- **vtm** contains the core library
- **vtm-android** Android backend (no libGDX required)
- **vtm-android-example** provides examples using vtm-android
- **vtm-gdx** common libGDX backend
- **vtm-android-gdx** Android backend (with libGDX)
- **vtm-desktop** Desktop backend
- **vtm-ios** iOS backend
- **vtm-web** HTML5/GWT backend
- **vtm-web-app** HTML5/GWT application
### Demo
work in progress..
http://city.informatik.uni-bremen.de/~jeff/map/#scale=17,rot=61,tilt=51,lat=53.075,lon=8.807
- hold middle mouse button to change view direction
- Keys
- g - toggle tile-grid layer
- d - default theme
- t - tubes theme
## WebGL Demo
[OpenScienceMap](http://opensciencemap.org/s3db/#scale=17,rot=61,tilt=51,lat=53.075,lon=8.807) view of Bremen.
- Hold right mouse button to change view direction.
## Applications
- VTM is used by many [applications](docs/Applications.md).
### Credits
## Maps
- Mapsforge [map providers](docs/Mapsforge-Maps.md).
## Credits
This library contains code from several projects:
- mapsforge: based on 0.2.4
- osmdroid: some overlay code
- libgdx: AsyncTask, some modfied classes
- android: some Matrix code
- Triangle: stripped down for simple triangulation (through jni)
- **Android** (Apache 2.0): some Matrix code, TimSort (http://source.android.com)
- **libGDX** (Apache 2.0): AsyncTask, MathUtils and Interpolation classes (https://github.com/libgdx)
- **mapsforge** (LGPL3): based on 0.2.4 (https://github.com/mapsforge/mapsforge)
- **osmdroid** (Apache 2.0): some overlay classes (https://github.com/osmdroid/osmdroid)
- **tessellate** (SGI Free Software License B 2.0): (https://github.com/cscheid/tessellate)
## Screenshots
### Android
![Android](docs/images/android.png)
### iOS
![iOS](docs/images/ios.png)
### Desktop
![Desktop](docs/images/desktop.png)
### Browser
![Browser](docs/images/browser.png)

49
build.gradle Normal file
View File

@@ -0,0 +1,49 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
allprojects {
group = 'org.mapsforge'
version = 'master-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
ext.androidBuildVersionTools = "25.0.2"
ext.gdxVersion = "1.9.5"
ext.gwtVersion = "2.8.0"
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
}
}
}
def androidCompileSdk() { return 25 }
def androidMinSdk() { return 10 }
def androidTargetSdk() { return 22 }
def versionCode() { return 50 }
def versionName() { return version }
subprojects {
repositories {
maven { url 'https://repo.boundlessgeo.com/main' }
jcenter()
}
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}

49
config/vtm-pmd.xml Normal file
View File

@@ -0,0 +1,49 @@
<?xml version="1.0"?>
<ruleset name="vtm ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
This ruleset checks my code for bad stuff
</description>
<!-- We'll use the entire 'strings' ruleset -->
<rule ref="rulesets/java/strings.xml"/>
<!-- Here's some rules we'll specify one at a time -->
<rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable"/>
<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField"/>
<rule ref="rulesets/java/imports.xml/DuplicateImports"/>
<rule ref="rulesets/java/basic.xml/UnnecessaryConversionTemporary"/>
<!-- We want to customize this rule a bit, change the message and raise the priority -->
<rule
ref="rulesets/java/basic.xml/EmptyCatchBlock"
message="Must handle exceptions">
<priority>2</priority>
</rule>
<!-- Now we'll customize a rule's property value -->
<rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" value="30"/>
</properties>
</rule>
<!-- We want everything from braces.xml except WhileLoopsMustUseBraces -->
<!-- ><rule ref="rulesets/java/braces.xml">
<exclude name="WhileLoopsMustUseBraces"/>
<exclude name="IfElseStmtsMustUseBraces"/>
</rule>
-->
<rule ref="rulesets/java/design.xml">
<exclude name="AvoidSynchronizedAtMethodLevel" />
<exclude name="AvoidReassigningParameters" />
<exclude name="CompareObjectsWithEquals" />
<exclude name="FieldDeclarationsShouldBeAtStartOfClass" />
</rule>
</ruleset>

BIN
data/g3d/test.g3db Normal file

Binary file not shown.

4748
data/g3d/test.g3dj Normal file

File diff suppressed because it is too large Load Diff

BIN
data/g3d/tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

177
data/g3d/treeA.g3dj Normal file
View File

@@ -0,0 +1,177 @@
{
"version": [ 0, 1],
"id": "",
"meshes": [
{
"attributes": ["POSITION", "NORMAL", "TEXCOORD0"],
"vertices": [
-0.003717, -0.043092, 0.000001, 0.000000, -1.000000, 0.000000, 0.000000, 0.000000,
-0.003717, -0.043092, -0.019798, 0.000000, -0.609973, -0.792383, 0.000000, 0.000000,
0.013430, -0.043092, -0.009898, 0.686239, -0.609973, -0.396191, 0.000000, 0.000000,
-0.003717, 0.527242, 0.000001, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000,
0.013430, 0.527242, -0.009898, 0.686239, 0.609973, -0.396191, 0.000000, 0.000000,
-0.003717, 0.527242, -0.019798, 0.000000, 0.609973, -0.792383, 0.000000, 0.000000,
0.013430, -0.043092, 0.009901, 0.686239, -0.609973, 0.396191, 0.000000, 0.000000,
0.013430, 0.527242, 0.009901, 0.686239, 0.609973, 0.396191, 0.000000, 0.000000,
-0.003717, -0.043092, 0.019801, 0.000000, -0.609973, 0.792383, 0.000000, 0.000000,
-0.003717, 0.527242, 0.019801, 0.000000, 0.609973, 0.792383, 0.000000, 0.000000,
-0.020865, -0.043092, 0.009901, -0.686239, -0.609973, 0.396191, 0.000000, 0.000000,
-0.020865, 0.527242, 0.009901, -0.686239, 0.609973, 0.396191, 0.000000, 0.000000,
-0.020865, -0.043092, -0.009898, -0.686239, -0.609973, -0.396191, 0.000000, 0.000000,
-0.020865, 0.527242, -0.009898, -0.686239, 0.609973, -0.396191, 0.000000, 0.000000,
-0.000052, 1.708732, 0.000001, 0.000000, 1.000000, 0.000000, 0.627643, 0.963260,
-0.056858, 1.692897, -0.056805, -0.359325, 0.861232, -0.359325, 0.811107, 0.943917,
-0.080388, 1.692897, 0.000001, -0.508194, 0.861232, 0.000000, 0.930977, 0.971962,
-0.112293, 1.619116, -0.112239, -0.584552, 0.562639, -0.584552, 0.871491, 0.884983,
-0.158784, 1.619116, 0.000001, -0.826655, 0.562639, 0.000000, 1.012361, 0.910828,
-0.176420, 1.422079, -0.176367, -0.675863, 0.293832, -0.675863, 0.903795, 0.728324,
-0.249474, 1.422079, 0.000001, -0.955840, 0.293832, 0.000000, 1.035246, 0.751852,
-0.210746, 1.159339, -0.210693, -0.704306, 0.088870, -0.704306, 0.922129, 0.451029,
-0.298019, 1.159339, 0.000001, -0.996033, 0.088870, 0.000000, 1.045340, 0.473093,
-0.210605, 0.903175, -0.210552, -0.705252, -0.072024, -0.705252, 0.936767, 0.254108,
-0.297820, 0.903175, 0.000001, -0.997375, -0.072024, 0.000000, 1.052424, 0.274946,
-0.180964, 0.617981, -0.180911, -0.685263, -0.246529, -0.685263, 0.956801, 0.142573,
-0.255900, 0.617981, 0.000001, -0.969115, -0.246529, 0.000000, 1.061122, 0.161660,
-0.116291, 0.378825, -0.116238, -0.610279, -0.505051, -0.610279, 0.991689, 0.079506,
-0.164439, 0.378825, 0.000001, -0.863063, -0.505051, 0.000000, 1.074527, 0.095355,
-0.059153, 0.290116, -0.059100, -0.407514, -0.817194, -0.407544, 1.038003, 0.052079,
-0.083634, 0.290116, 0.000001, -0.576312, -0.817194, 0.000000, 1.090933, 0.063214,
-0.083634, 0.290116, 0.000001, -0.576312, -0.817194, 0.000000, 0.090933, 0.063214,
-0.059153, 0.290116, -0.059100, -0.407514, -0.817194, -0.407544, 0.038003, 0.052079,
-0.000125, 0.265210, -0.000071, -0.000244, -0.999969, -0.000244, 0.127500, 0.036749,
-0.000051, 0.290116, -0.083580, 0.000000, -0.817194, -0.576312, 0.994047, 0.033372,
-0.000125, 0.265210, -0.000071, -0.000244, -0.999969, -0.000244, 1.127500, 0.036749,
-0.000051, 0.378825, -0.164386, 0.000000, -0.505051, -0.863063, 0.893772, 0.053663,
-0.000052, 0.617981, -0.255847, 0.000000, -0.246529, -0.969115, 0.836458, 0.114704,
-0.000052, 0.903175, -0.297766, 0.000000, -0.072024, -0.997375, 0.812221, 0.226047,
-0.000052, 1.159339, -0.297966, 0.000000, 0.088870, -0.996033, 0.797565, 0.423137,
-0.000052, 1.422079, -0.249421, 0.000000, 0.293832, -0.955840, 0.781975, 0.700922,
-0.000052, 1.619116, -0.158731, 0.000000, 0.562639, -0.826655, 0.759783, 0.858997,
-0.000052, 1.692897, -0.080335, 0.000000, 0.861232, -0.508194, 0.728165, 0.921879,
0.056754, 1.692897, -0.056805, 0.359325, 0.861232, -0.359325, 0.652361, 0.910987,
0.112189, 1.619116, -0.112239, 0.584552, 0.562639, -0.584552, 0.659906, 0.845090,
0.176316, 1.422079, -0.176367, 0.675863, 0.293832, -0.675863, 0.665734, 0.684958,
0.210643, 1.159339, -0.210693, 0.704306, 0.088870, -0.704306, 0.670277, 0.405750,
0.210502, 0.903175, -0.210552, 0.705252, -0.072024, -0.705252, 0.675032, 0.207335,
0.180860, 0.617981, -0.180910, 0.685263, -0.246529, -0.685263, 0.684415, 0.093825,
0.116188, 0.378825, -0.116237, 0.610279, -0.505051, -0.610279, 0.723612, 0.027920,
0.059050, 0.290116, -0.059099, 0.407483, -0.817255, -0.407422, 1.018456, 0.011649,
0.059050, 0.290116, -0.059099, 0.407483, -0.817255, -0.407422, 0.018456, 0.011649,
0.083530, 0.290116, 0.000002, 0.576159, -0.817316, 0.000000, 0.267608, 0.018648,
0.164335, 0.378825, 0.000002, 0.863063, -0.505051, 0.000000, 0.457225, 0.035136,
0.255796, 0.617981, 0.000002, 0.969115, -0.246529, 0.000000, 0.515690, 0.098717,
0.297716, 0.903175, 0.000002, 0.997375, -0.072024, 0.000000, 0.532803, 0.211513,
0.297915, 1.159339, 0.000002, 0.996033, 0.088870, 0.000000, 0.541872, 0.409545,
0.249370, 1.422079, 0.000002, 0.955840, 0.293832, 0.000000, 0.550746, 0.688375,
0.158680, 1.619116, 0.000002, 0.826655, 0.562639, 0.000000, 0.562378, 0.848006,
0.080284, 1.692897, 0.000001, 0.508194, 0.861232, 0.000000, 0.577714, 0.913236,
0.056754, 1.692897, 0.056808, 0.359325, 0.861232, 0.359325, 0.500528, 0.928224,
0.112188, 1.619116, 0.112242, 0.584552, 0.562670, 0.584552, 0.459880, 0.866817,
0.176316, 1.422079, 0.176370, 0.675863, 0.293832, 0.675863, 0.433163, 0.709519,
0.210642, 1.159339, 0.210696, 0.704306, 0.088870, 0.704306, 0.415507, 0.432148,
0.210501, 0.903175, 0.210555, 0.705252, -0.072024, 0.705252, 0.399773, 0.235351,
0.180860, 0.617981, 0.180914, 0.685263, -0.246529, 0.685263, 0.375517, 0.124299,
0.116187, 0.378825, 0.116241, 0.610279, -0.505051, 0.610279, 0.325269, 0.063109,
0.059049, 0.290116, 0.059103, 0.407361, -0.817347, 0.407392, 0.248452, 0.040330,
-0.000053, 0.290116, 0.083583, 0.000000, -0.817316, 0.576159, 0.199939, 0.056802,
-0.000053, 0.378825, 0.164389, 0.000000, -0.505051, 0.863063, 0.234895, 0.086200,
-0.000053, 0.617981, 0.255850, 0.000000, -0.246529, 0.969115, 0.262269, 0.150492,
-0.000052, 0.903175, 0.297769, 0.000000, -0.072024, 0.997375, 0.278892, 0.262611,
-0.000052, 1.159339, 0.297968, 0.000000, 0.088870, 0.996033, 0.291619, 0.459894,
-0.000052, 1.422079, 0.249424, 0.000000, 0.293832, 0.955840, 0.308400, 0.737559,
-0.000052, 1.619116, 0.158734, 0.000000, 0.562670, 0.826655, 0.340691, 0.894603,
-0.000052, 1.692897, 0.080338, 0.000000, 0.861232, 0.508194, 0.411564, 0.953109,
-0.056858, 1.692897, 0.056808, -0.359325, 0.861232, 0.359325, 0.247502, 0.980115,
-0.112293, 1.619116, 0.112242, -0.584552, 0.562670, 0.584552, 0.186319, 0.915857,
-0.176420, 1.422079, 0.176369, -0.675863, 0.293832, 0.675863, 0.173739, 0.755927,
-0.210747, 1.159339, 0.210696, -0.704306, 0.088870, 0.704306, 0.168491, 0.476740,
-0.210606, 0.903175, 0.210555, -0.705252, -0.072024, 0.705252, 0.164886, 0.278291,
-0.180964, 0.617981, 0.180913, -0.685263, -0.246529, 0.685263, 0.160531, 0.164632,
-0.116292, 0.378825, 0.116240, -0.610279, -0.505051, 0.610279, 0.153922, 0.097744,
-0.059154, 0.290116, 0.059102, -0.407453, -0.817255, 0.407483, 0.145909, 0.064880,
-0.164439, 0.378825, 0.000001, -0.863063, -0.505051, 0.000000, 0.074527, 0.095355,
-0.255900, 0.617981, 0.000001, -0.969115, -0.246529, 0.000000, 0.061122, 0.161660,
-0.297820, 0.903175, 0.000001, -0.997375, -0.072024, 0.000000, 0.052424, 0.274946,
-0.298019, 1.159339, 0.000001, -0.996033, 0.088870, 0.000000, 0.045340, 0.473093,
-0.249474, 1.422079, 0.000001, -0.955840, 0.293832, 0.000000, 0.035246, 0.751852,
-0.158784, 1.619116, 0.000001, -0.826655, 0.562639, 0.000000, 0.012361, 0.910828,
-0.056858, 1.692897, 0.056808, -0.359325, 0.861232, 0.359325, 1.247502, 0.980115,
-0.112293, 1.619116, 0.112242, -0.584552, 0.562670, 0.584552, 1.186319, 0.915857
],
"parts": [
{
"id": "mpart1",
"type": "TRIANGLES",
"indices": [
0, 1, 2, 3, 4, 5, 0, 2, 6, 3, 7, 4,
0, 6, 8, 3, 9, 7, 0, 8, 10, 3, 11, 9,
0, 10, 12, 3, 13, 11, 12, 1, 0, 3, 5, 13,
1, 5, 4, 1, 4, 2, 2, 4, 7, 2, 7, 6,
6, 7, 9, 6, 9, 8, 8, 9, 11, 8, 11, 10,
10, 11, 13, 10, 13, 12, 5, 1, 12, 5, 12, 13,
14, 15, 16, 16, 15, 17, 16, 17, 18, 18, 17, 19,
18, 19, 20, 20, 19, 21, 20, 21, 22, 22, 21, 23,
22, 23, 24, 24, 23, 25, 24, 25, 26, 26, 25, 27,
26, 27, 28, 28, 27, 29, 28, 29, 30, 31, 32, 33,
29, 34, 35, 27, 36, 34, 27, 34, 29, 25, 37, 36,
25, 36, 27, 23, 38, 37, 23, 37, 25, 21, 39, 38,
21, 38, 23, 19, 40, 39, 19, 39, 21, 17, 41, 40,
17, 40, 19, 15, 42, 41, 15, 41, 17, 15, 14, 42,
42, 14, 43, 42, 43, 44, 42, 44, 41, 41, 44, 45,
41, 45, 40, 40, 45, 46, 40, 46, 39, 39, 46, 47,
39, 47, 38, 38, 47, 48, 38, 48, 37, 37, 48, 49,
37, 49, 36, 36, 49, 50, 36, 50, 34, 34, 50, 35,
51, 52, 33, 49, 53, 52, 49, 52, 50, 48, 54, 53,
48, 53, 49, 47, 55, 54, 47, 54, 48, 46, 56, 55,
46, 55, 47, 45, 57, 56, 45, 56, 46, 44, 58, 57,
44, 57, 45, 43, 59, 58, 43, 58, 44, 43, 14, 59,
59, 14, 60, 59, 60, 61, 59, 61, 58, 58, 61, 62,
58, 62, 57, 57, 62, 63, 57, 63, 56, 56, 63, 64,
56, 64, 55, 55, 64, 65, 55, 65, 54, 54, 65, 66,
54, 66, 53, 53, 66, 67, 53, 67, 52, 52, 67, 33,
67, 68, 33, 66, 69, 68, 66, 68, 67, 65, 70, 69,
65, 69, 66, 64, 71, 70, 64, 70, 65, 63, 72, 71,
63, 71, 64, 62, 73, 72, 62, 72, 63, 61, 74, 73,
61, 73, 62, 60, 75, 74, 60, 74, 61, 60, 14, 75,
75, 14, 76, 75, 76, 77, 75, 77, 74, 74, 77, 78,
74, 78, 73, 73, 78, 79, 73, 79, 72, 72, 79, 80,
72, 80, 71, 71, 80, 81, 71, 81, 70, 70, 81, 82,
70, 82, 69, 69, 82, 83, 69, 83, 68, 68, 83, 33,
83, 31, 33, 82, 84, 31, 82, 31, 83, 81, 85, 84,
81, 84, 82, 80, 86, 85, 80, 85, 81, 79, 87, 86,
79, 86, 80, 78, 88, 87, 78, 87, 79, 77, 89, 88,
77, 88, 78, 90, 16, 18, 90, 18, 91, 90, 14, 16
]
}
]
}
],
"materials": [
{
"id": "_tree.png",
"diffuse": [ 0.900000, 0.900000, 0.900000],
"specular": [ 0.100000, 0.100000, 0.100000],
"textures": [
{
"id": "_tree.png",
"filename": "tree.png",
"type": "DIFFUSE"
}
]
}
],
"nodes": [
{
"id": "treeA_root",
"parts": [
{
"meshpartid": "mpart1",
"materialid": "_tree.png",
"uvMapping": [[ 0]]
}
]
}
],
"animations": []
}

85
deploy.gradle Normal file
View File

@@ -0,0 +1,85 @@
apply plugin: 'signing'
if (project.hasProperty("android")) {
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
exclude 'android-logger.properties'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
exclude 'android-logger.properties'
}
} else {
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: SONATYPE_USERNAME, password: SONATYPE_PASSWORD)
}
pom.project {
packaging 'jar'
name 'vtm'
description 'OpenGL vector map library written in Java - running on Android, iOS, Desktop and within the browser.'
url 'https://github.com/mapsforge/vtm'
licenses {
license {
name 'GNU Lesser GPL'
url 'http://www.gnu.org/licenses/lgpl.html'
distribution 'repo'
}
}
scm {
connection 'scm:git:https://github.com/mapsforge/vtm'
developerConnection 'scm:git:https://github.com/mapsforge/vtm'
url 'https://github.com/mapsforge/vtm'
}
developers {
developer {
id 'hannes.janetzek'
name 'Hannes Janetzek'
email 'hannes.janetzek@gmail.com'
}
developer {
id 'devemux86'
name 'Emux'
email 'devemux86@gmail.com'
}
}
}
}
}
}

10
docs/Applications.md Normal file
View File

@@ -0,0 +1,10 @@
# Applications using VTM software (in lexical order)
|**Name**|**Type**|**License/Cost**|**Platforms**|**Sources**|
|--------|--------|----------------|-------------|-----------|
| [Cachebox 3.0](https://github.com/Longri/cachebox3.0) | Geocaching application | Apache 2.0/Free | Android, Desktop, iOS | Open |
| [Cruiser](http://wiki.openstreetmap.org/wiki/Cruiser) | Map and navigation application | Proprietary/Free | Android, Desktop | Closed |
| [Hunt Cyprus](https://play.google.com/store/apps/details?id=gr.talent.hunt.cy17) | Map and navigation application for hunters | Proprietary/Commercial | Android | Closed |
| [MapTrek](http://maptrek.mobi) | Application for outdoor activities | GPL3/Free and Commercial | Android | Open |
You know an application that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev).

67
docs/Changelog.md Normal file
View File

@@ -0,0 +1,67 @@
# Changelog
### Version 0.7.0-rc2 (2017-02-20)
- Fix theme parsing in non-Latin locales [#297](https://github.com/mapsforge/vtm/issues/297)
### Version 0.7.0-rc1 (2017-02-16)
- Mapsforge multiple map files [#208](https://github.com/mapsforge/vtm/issues/208)
- Improved gestures implementation [#253](https://github.com/mapsforge/vtm/issues/253)
- Polygon label position enhancements [#80](https://github.com/mapsforge/vtm/issues/80)
- vtm-web modules update [#51](https://github.com/mapsforge/vtm/issues/51)
- Mapbox (Mapzen) vector tiles [#57](https://github.com/mapsforge/vtm/issues/57)
- SVG resources scaling in themes [#214](https://github.com/mapsforge/vtm/issues/214)
- Circle map style [#122](https://github.com/mapsforge/vtm/issues/122)
- Oneway arrows in themes [#275](https://github.com/mapsforge/vtm/issues/275)
- Texture atlas from bitmaps [#283](https://github.com/mapsforge/vtm/pull/283)
- PathLayer (vtm) fix disappearing segments [#108](https://github.com/mapsforge/vtm/issues/108)
- House numbers (nodes) fix visibility [#168](https://github.com/mapsforge/vtm/issues/168)
- Android fix quick scale vs long press [#250](https://github.com/mapsforge/vtm/issues/250)
- Use baseline 160dpi in scaling [#236](https://github.com/mapsforge/vtm/issues/236)
- OkHttp3 update [#138](https://github.com/mapsforge/vtm/issues/138)
- libGDX double tap zoom [#263](https://github.com/mapsforge/vtm/issues/263)
- MapFileTileSource zoom level API enhancements [#219](https://github.com/mapsforge/vtm/issues/219)
- Animator enhancements with easing functions [#246](https://github.com/mapsforge/vtm/issues/246)
- Tile grid layer scaling [#238](https://github.com/mapsforge/vtm/issues/238)
- Internal render themes new SVG resources [#251](https://github.com/mapsforge/vtm/issues/251)
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.7.0)
## Version 0.6.0 (2016-10-28) -- VTM revive
- Same as 0.6.0-rc3
### Version 0.6.0-rc3 (2016-10-22)
- Minor improvements and bug fixes
### Version 0.6.0-rc2 (2016-10-16)
- Location layer [#171](https://github.com/mapsforge/vtm/issues/171)
- Minor improvements and bug fixes
### Version 0.6.0-rc1 (2016-10-08)
- Render theme SVG resources [#60](https://github.com/mapsforge/vtm/issues/60)
- Mapsforge multilingual maps [#34](https://github.com/mapsforge/vtm/issues/34)
- Render theme styles [#93](https://github.com/mapsforge/vtm/issues/93)
- vtm-ios module update [#29](https://github.com/mapsforge/vtm/issues/29)
- Native libraries for all platforms [#14](https://github.com/mapsforge/vtm/issues/14)
- Line stipple and texture rendering [#105](https://github.com/mapsforge/vtm/issues/105)
- Layer groups [#99](https://github.com/mapsforge/vtm/issues/99) [#103](https://github.com/mapsforge/vtm/issues/103)
- Location renderer [#171](https://github.com/mapsforge/vtm/issues/171)
- Map scale bar [#84](https://github.com/mapsforge/vtm/issues/84)
- Tile size based on scale factor [#183](https://github.com/mapsforge/vtm/issues/183)
- libGDX layer gestures [#151](https://github.com/mapsforge/vtm/issues/151)
- Render theme area tessellation option [#37](https://github.com/mapsforge/vtm/issues/37)
- Graphics API platform enhancements [#92](https://github.com/mapsforge/vtm/issues/92)
- GeoPoint & BoundingBox improvements [#201](https://github.com/mapsforge/vtm/issues/201) [#200](https://github.com/mapsforge/vtm/issues/200)
- vtm-jts module [#53](https://github.com/mapsforge/vtm/issues/53)
- vtm-http module [#140](https://github.com/mapsforge/vtm/issues/140)
- Internal render themes various improvements [#41](https://github.com/mapsforge/vtm/issues/41)
- LWJGL desktop libGDX backend [#129](https://github.com/mapsforge/vtm/issues/129)
- SNAPSHOT builds publish to Sonatype OSSRH [#165](https://github.com/mapsforge/vtm/issues/165)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.6.0)

84
docs/Integration.md Normal file
View File

@@ -0,0 +1,84 @@
# Integration guide
This article describes how to integrate the library in your project, with Gradle / Maven / Jars or SNAPSHOT builds.
Current version is [![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/vtm.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapsforge%22)
## Gradle
### Core
```groovy
compile 'org.mapsforge:vtm:[CURRENT-VERSION]'
compile 'org.mapsforge:vtm-themes:[CURRENT-VERSION]'
compile 'org.slf4j:slf4j-api:1.7.21'
```
### Android
```groovy
compile 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
compile 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi'
compile 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
compile 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
```
### iOS
Detailed iOS instructions can be found [here](ios.md).
### Desktop
```groovy
compile 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]'
compile 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]'
compile 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux'
compile 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-osx'
compile 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
compile 'com.badlogicgames.gdx:gdx:1.9.5'
compile 'com.badlogicgames.gdx:gdx-platform:1.9.5:natives-desktop'
compile 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.9.5'
compile 'org.lwjgl.lwjgl:lwjgl:2.9.3'
compile 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
compile 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
compile 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-windows'
compile 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19'
```
## Snapshots
We publish regularly SNAPSHOT builds to Sonatype OSS Repository Hosting.
You need to add the repository:
```groovy
configurations.all {
// check for latest snapshot on every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
```
And declare the dependencies like:
```groovy
compile 'org.mapsforge:vtm:master-SNAPSHOT'
...
```
## Maven
The dependencies for Maven are declared in a similar way. For example:
```xml
<dependency>
<groupId>org.mapsforge</groupId>
<artifactId>vtm</artifactId>
<version>[CURRENT-VERSION]</version>
</dependency>
```
## Jars
You can find release and snapshot jars (regular and with dependencies) in [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.mapsforge%22) and [Sonatype OSS Repository Hosting](https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/).
Third party jars can be found at their respective sites or in Maven Central repository.

9
docs/Mapsforge-Maps.md Normal file
View File

@@ -0,0 +1,9 @@
# Mapsforge map providers (in lexical order)
- [AndroidMaps](http://www.androidmaps.co.uk/)
- [Freizeitkarte](http://www.freizeitkarte-osm.de/android/en/index.html)
- [Locusvectormaps](http://www.locusvectormaps.com)
- [Mapsforge](http://download.mapsforge.org/)
- [OpenAndroMaps](http://www.openandromaps.org/en/)
You know a Mapsforge map provider that is missing here? Please inform us by sending a message via our public [mailing list](https://groups.google.com/group/mapsforge-dev).

BIN
docs/images/android.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 KiB

BIN
docs/images/browser.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 KiB

BIN
docs/images/desktop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

BIN
docs/images/ios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

64
docs/ios.md Normal file
View File

@@ -0,0 +1,64 @@
### iOS implementation
RoboVm needs the native libs / frameworks to create a build.
Create a copy task into your iOS **build.gradle** and add the dependencies.
```groovy
configurations { natives }
dependencies {
compile "org.mapsforge:vtm-ios:[CURRENT-VERSION]"
natives "org.mapsforge:vtm-ios:[CURRENT-VERSION]:natives"
...
}
// Called every time Gradle gets executed. Takes the native dependencies of
// the 'natives' configuration and extracts them to the proper build folders
// so they get packed with the IPA.
task copyNatives() {
file("build/native/").mkdirs();
configurations.natives.files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives.jar")) outputDir = file("build/native/")
if (outputDir != null) {
copy {
from zipTree(jar)
into outputDir
}
}
}
}
```
Now you can configure your `robovm.xml` to implement the vtm-natives and the SVG-Framework.
```xml
<libs>
<lib>z</lib>
<lib>build/native/libvtm-jni.a</lib> <!--vtm native -->
</libs>
<frameworkPaths>
<path>build/native</path> <!--SVGgh framework path -->
</frameworkPaths>
<frameworks>
<framework>SVGgh</framework> <!--SVGgh framework name -->
<framework>UIKit</framework>
<framework>OpenGLES</framework>
<framework>QuartzCore</framework>
<framework>CoreGraphics</framework>
<framework>OpenAL</framework>
<framework>AudioToolbox</framework>
<framework>AVFoundation</framework>
</frameworks>
```
Remember the implementation of a iOS framework is possible since iOS 8.
So we must set the min iOS-Version at `Info.plist.xml`.
```xml
<dict>
<key>MinimumOSVersion</key>
<string>8.0</string>
...
```

7
docs/web.md Normal file
View File

@@ -0,0 +1,7 @@
### Web implementation
`./gradlew :vtm-web-app:jettyDraftWar` will run standalone Jetty server at port 8080.
Then go to `http://localhost:8080/vtm-web-app` in the web browser to see the map.
Hold right mouse button to change view direction.

View File

@@ -2,18 +2,18 @@
<profiles version="12">
<profile kind="CodeFormatterProfile" name="eclipse-vtm" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="false"/>
@@ -33,37 +33,37 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.compiler.source" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="84"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
@@ -72,7 +72,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="100"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
@@ -87,9 +87,9 @@
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="80"/>
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
@@ -104,8 +104,8 @@
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
@@ -116,17 +116,17 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
@@ -141,24 +141,24 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
@@ -170,35 +170,35 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="82"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
@@ -248,9 +248,9 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.7"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>

View File

@@ -1,22 +1,22 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=82
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=82
org.eclipse.jdt.core.formatter.alignment_for_assignment=80
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
@@ -27,7 +27,7 @@ org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=84
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
@@ -56,8 +56,8 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
@@ -69,7 +69,7 @@ org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=false
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
org.eclipse.jdt.core.formatter.compact_else_if=true
@@ -282,10 +282,10 @@ org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

17
gradle.properties Normal file
View File

@@ -0,0 +1,17 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Tue Aug 16 13:14:49 EEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

160
gradlew vendored Executable file
View File

@@ -0,0 +1,160 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

75
jni/.cproject Normal file
View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1587393048">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1587393048" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1587393048" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.1587393048.116574534" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.223412825" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.385578518" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder command="make" enableCleanBuild="false" enabledIncrementalBuild="false" id="cdt.managedbuild.target.gnu.builder.base.156937647" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1823835369" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.360207042" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.preprocessor.def.145805607" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CORE_EXPORT"/>
</option>
<option id="gnu.cpp.compiler.option.include.paths.1744312971" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/vtm-jni}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.111801070" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1095290162" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option id="gnu.c.compiler.option.include.paths.542022155" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include"/>
<listOptionValue builtIn="false" value="/usr/lib/jvm/java-7-openjdk-amd64/include/linux"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.506992692" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.335083411" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1727739418" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1457207088" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2019534622" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
<option id="gnu.both.asm.option.include.paths.66240236" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.622641223" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="vtm-jni.null.1777174385" name="vtm-jni"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1587393048;cdt.managedbuild.toolchain.gnu.base.1587393048.116574534;cdt.managedbuild.tool.gnu.c.compiler.base.1095290162;cdt.managedbuild.tool.gnu.c.compiler.input.506992692">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1587393048;cdt.managedbuild.toolchain.gnu.base.1587393048.116574534;cdt.managedbuild.tool.gnu.cpp.compiler.base.360207042;cdt.managedbuild.tool.gnu.cpp.compiler.input.111801070">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/vtm-jni"/>
</configuration>
</storageModule>
</cproject>

14
jni/BUILD_JNI.txt Normal file
View File

@@ -0,0 +1,14 @@
# Build native libraries:
- modify src/JniBuilder.java for your platform.
## to build android:
export NDK_HOME=/path_to_android_sdk
## compile
ant -v
## copy vtm/libs/armeabi* to vtm-android/libs
rm -rf ../../vtm-ext-libs/vtm-android/libs/*
cp -r ../libs/armeabi* ../../vtm-ext-libs/vtm-android/libs/

10
jni/build.gradle Normal file
View File

@@ -0,0 +1,10 @@
apply plugin: 'java'
dependencies {
compile "com.badlogicgames.gdx:gdx-jnigen:$gdxVersion"
}
sourceSets {
main.java.srcDirs = ['src']
main.resources.srcDirs = ['src']
}

3
jni/cp.sh Executable file
View File

@@ -0,0 +1,3 @@
cp libs/armeabi/libvtm-jni.so ../vtm-ext-libs/vtm-android/armeabi
cp libs/armeabi-v7a/libvtm-jni.so ../vtm-ext-libs/vtm-android/armeabi-v7a
cp libs/vtm-jni-natives.jar ../vtm-ext-libs/gdx/

22
jni/jni/Android.mk Normal file
View File

@@ -0,0 +1,22 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := vtm-jni
LOCAL_C_INCLUDES := . libtess2/Include
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -O2 -Wall -D__ANDROID__ -Wall -std=c99 -O2 -ffast-math -DNDEBUG
LOCAL_CPPFLAGS := $(LOCAL_C_INCLUDES:%=-I%) -O2 -Wall -D__ANDROID__ -Wall -std=c99 -O2 -ffast-math -DNDEBUG
LOCAL_LDLIBS := -lm -llog
LOCAL_ARM_MODE := arm
LOCAL_SRC_FILES := org.oscim.utils.TessJNI.cpp\
libtess2/Source/sweep.c\
libtess2/Source/priorityq.c\
libtess2/Source/bucketalloc.c\
libtess2/Source/geom.c\
libtess2/Source/tess.c\
libtess2/Source/dict.c\
libtess2/Source/mesh.c\
gl/utils.c
include $(BUILD_SHARED_LIBRARY)

2
jni/jni/Application.mk Normal file
View File

@@ -0,0 +1,2 @@
APP_ABI := armeabi armeabi-v7a x86
APP_PLATFORM := android-8

View File

@@ -1,33 +1,33 @@
<project name="android-natives" basedir="." default="postcompile">
<property environment="env" />
<!-- the suffix ndk-build executable -->
<property name="ndkSuffix" value="" />
<target name="clean" depends="check-for-ndk" if="has-ndk-build">
<exec executable="${env.NDK_HOME}/ndk-build${ndkSuffix}" failonerror="true">
<arg value="clean"/>
</exec>
</target>
<target name="precompile" depends="check-for-ndk">
</target>
<target name="compile-natives" depends="precompile" if="has-ndk-build">
<echo>ndk_home: ${env.NDK_HOME}</echo>
<exec executable="${env.NDK_HOME}/ndk-build${ndkSuffix}" failonerror="true"/>
</target>
<target name="postcompile" depends="compile-natives">
</target>
<target name="check-for-ndk">
<condition property="ndk-build-found">
<available file="ndk-build${ndkSuffix}" filepath="${env.NDK_HOME}"/>
</condition>
<condition property="has-ndk-build">
<equals arg1="${ndk-build-found}" arg2="true"/>
</condition>
</target>
</project>
<project name="android-natives" basedir="." default="postcompile">
<property environment="env" />
<!-- the suffix ndk-build executable -->
<property name="ndkSuffix" value="" />
<target name="clean" depends="check-for-ndk" if="has-ndk-build">
<exec executable="${env.NDK_HOME}/ndk-build${ndkSuffix}" failonerror="true">
<arg value="clean"/>
</exec>
</target>
<target name="precompile" depends="check-for-ndk">
</target>
<target name="compile-natives" depends="precompile" if="has-ndk-build">
<echo>ndk_home: ${env.NDK_HOME}</echo>
<exec executable="${env.NDK_HOME}/ndk-build${ndkSuffix}" failonerror="true"/>
</target>
<target name="postcompile" depends="compile-natives">
</target>
<target name="check-for-ndk">
<condition property="ndk-build-found">
<available file="ndk-build${ndkSuffix}" filepath="${env.NDK_HOME}"/>
</condition>
<condition property="has-ndk-build">
<equals arg1="${ndk-build-found}" arg2="true"/>
</condition>
</target>
</project>

View File

@@ -1,147 +1,153 @@
<project name="vtm-jni-Linux-64" basedir="." default="postcompile">
<!-- include the environment -->
<property environment="env"/>
<!-- output directory for temporary object files -->
<property name="buildDir" value="target/linux64" />
<!-- output directory for the shared library -->
<property name="libsDir" value="../libs/linux64" />
<!-- the name of the shared library -->
<property name="libName" value="libvtm-jni64.so"/>
<!-- the jni header jniPlatform to use -->
<property name="jniPlatform" value="linux"/>
<!-- the compilerPrefix for the C & C++ compilers -->
<property name="compilerPrefix" value=""/>
<!-- the compilerSuffix for the C & C++ compilers -->
<property name="compilerSuffix" value="" />
<!-- define gcc compiler, options and files to compile -->
<property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
<property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -Wall -std=c99 -O2 -DTRILIBRARY -DREDUCED -DCDT_ONLY -DNO_TIMER"/>
<fileset id="gcc-files" dir="./">
<exclude name="target/"/>
<project name="vtm-jni-Linux-64" basedir="." default="postcompile">
<!-- include the environment -->
<property environment="env"/>
<!-- output directory for temporary object files -->
<property name="buildDir" value="target/linux64" />
<!-- output directory for the shared library -->
<property name="libsDir" value="../libs/linux64" />
<!-- the name of the shared library -->
<property name="libName" value="libvtm-jni64.so"/>
<!-- the jni header jniPlatform to use -->
<property name="jniPlatform" value="linux"/>
<!-- the compilerPrefix for the C & C++ compilers -->
<property name="compilerPrefix" value=""/>
<!-- the compilerSuffix for the C & C++ compilers -->
<property name="compilerSuffix" value="" />
<!-- define gcc compiler, options and files to compile -->
<property name="gcc" value="${compilerPrefix}gcc${compilerSuffix}"/>
<property name="gcc-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -Wall -std=c99 -O2 -ffast-math -DNDEBUG"/>
<fileset id="gcc-files" dir="./">
<exclude name="target/"/>
<include name="memcpy_wrap.c"/>
<include name="gl/utils.c"/>
<include name="triangle/TriangleJni.c"/>
<include name="triangle/triangle.c"/>
<include name="triangle/triangle_dbg.c"/>
</fileset>
<!-- define g++ compiler, options and files to compile -->
<property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
<property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -Wall -std=c99 -O2 -DTRILIBRARY -DREDUCED -DCDT_ONLY -DNO_TIMER"/>
<fileset id="g++-files" dir="./">
<exclude name="target/"/>
<include name="libtess2/Source/bucketalloc.c"/>
<include name="libtess2/Source/dict.c"/>
<include name="libtess2/Source/geom.c"/>
<include name="libtess2/Source/mesh.c"/>
<include name="libtess2/Source/priorityq.c"/>
<include name="libtess2/Source/sweep.c"/>
<include name="libtess2/Source/tess.c"/>
</fileset>
<!-- define g++ compiler, options and files to compile -->
<property name="g++" value="${compilerPrefix}g++${compilerSuffix}"/>
<property name="g++-opts" value="-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC -Wall -std=c99 -O2 -ffast-math -DNDEBUG"/>
<fileset id="g++-files" dir="./">
<exclude name="target/"/>
<include name="**/*.cpp"/>
</fileset>
<!-- define linker and options -->
<property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
<property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
<property name="libraries" value=""/>
<!-- cleans the build directory, removes all object files and shared libs -->
<target name="clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${buildDir}"/>
<fileset dir="${libsDir}" includes="**/*" excludes="**/.svn"/>
</delete>
</target>
<target name="precompile">
<condition property="compiler-found">
<and>
<or>
<!-- Include both b/c Windows might be either -->
<available file="${g++}" filepath="${env.PATH}"/>
<available file="${g++}" filepath="${env.Path}"/>
</or>
<or>
<!-- Include both b/c Windows might be either -->
<available file="${gcc}" filepath="${env.PATH}"/>
<available file="${gcc}" filepath="${env.Path}"/>
</or>
</and>
</condition>
<condition property="has-compiler">
<equals arg1="${compiler-found}" arg2="true"/>
</condition>
</target>
<target name="create-build-dir" depends="precompile" if="has-compiler">
<!-- FIXME this is pretty nasty :/ -->
<copy todir="${buildDir}">
<fileset refid="g++-files"/>
<fileset refid="gcc-files"/>
</copy>
<delete>
<fileset dir="${buildDir}">
<include name="*"/>
<exclude name="*.o"/>
</fileset>
</delete>
</target>
<!-- compiles all C and C++ files to object files in the build directory -->
<target name="compile" depends="create-build-dir" if="has-compiler">
<mkdir dir="${buildDir}"/>
<apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
<arg line="${g++-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
</fileset>
<!-- define linker and options -->
<property name="linker" value="${compilerPrefix}g++${compilerSuffix}"/>
<property name="linker-opts" value="-shared -m64 -Wl,-wrap,memcpy"/>
<property name="libraries" value=""/>
<!-- cleans the build directory, removes all object files and shared libs -->
<target name="clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${buildDir}"/>
<fileset dir="${libsDir}" includes="**/*" excludes="**/.svn"/>
</delete>
</target>
<target name="precompile">
<condition property="compiler-found">
<and>
<or>
<!-- Include both b/c Windows might be either -->
<available file="${g++}" filepath="${env.PATH}"/>
<available file="${g++}" filepath="${env.Path}"/>
</or>
<or>
<!-- Include both b/c Windows might be either -->
<available file="${gcc}" filepath="${env.PATH}"/>
<available file="${gcc}" filepath="${env.Path}"/>
</or>
</and>
</condition>
<condition property="has-compiler">
<equals arg1="${compiler-found}" arg2="true"/>
</condition>
</target>
<target name="create-build-dir" depends="precompile" if="has-compiler">
<!-- FIXME this is pretty nasty :/ -->
<copy todir="${buildDir}">
<fileset refid="g++-files"/>
<fileset refid="gcc-files"/>
</copy>
<delete>
<fileset dir="${buildDir}">
<include name="*"/>
<exclude name="*.o"/>
</fileset>
</delete>
</target>
<!-- compiles all C and C++ files to object files in the build directory -->
<target name="compile" depends="create-build-dir" if="has-compiler">
<mkdir dir="${buildDir}"/>
<apply failonerror="true" executable="${g++}" dest="${buildDir}" verbose="true">
<arg line="${g++-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
<arg value="-I."/>
<srcfile/>
<arg value="-o"/>
<targetfile/>
<fileset refid="g++-files"/>
<compositemapper>
<mapper type="glob" from="*.cpp" to="*.o"/>
<mapper type="glob" from="*.mm" to="*.o"/>
</compositemapper>
</apply>
<apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
<arg line="${gcc-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
<arg value="-Ilibtess2/Include"/>
<srcfile/>
<arg value="-o"/>
<targetfile/>
<fileset refid="g++-files"/>
<compositemapper>
<mapper type="glob" from="*.cpp" to="*.o"/>
<mapper type="glob" from="*.mm" to="*.o"/>
</compositemapper>
</apply>
<apply failonerror="true" executable="${gcc}" dest="${buildDir}" verbose="true">
<arg line="${gcc-opts}"/>
<arg value="-Ijni-headers"/>
<arg value="-Ijni-headers/${jniPlatform}"/>
<arg value="-I."/>
<arg value="-I."/>
<srcfile/>
<arg value="-o"/>
<targetfile/>
<fileset refid="gcc-files"/>
<compositemapper>
<arg value="-Ilibtess2/Include"/>
<srcfile/>
<arg value="-o"/>
<targetfile/>
<fileset refid="gcc-files"/>
<compositemapper>
<mapper type="glob" from="*.c" to="*.o"/>
<mapper type="glob" from="*.m" to="*.o"/>
</compositemapper>
</apply>
</target>
<!-- links the shared library based on the previously compiled object files -->
<target name="link" depends="compile" if="has-compiler">
<fileset dir="${buildDir}" id="objFileSet">
<patternset>
<include name="**/*.o" />
</patternset>
</fileset>
<pathconvert pathsep=" " property="objFiles" refid="objFileSet" />
<mkdir dir="${libsDir}" />
<exec executable="${linker}" failonerror="true" dir="${buildDir}">
<arg line="${linker-opts}" />
<arg value="-o" />
<arg path="${libsDir}/${libName}" />
<arg line="${objFiles}"/>
<arg line="${libraries}" />
</exec>
</target>
<target name="postcompile" depends="link">
</target>
</project>
<mapper type="glob" from="*.m" to="*.o"/>
</compositemapper>
</apply>
</target>
<!-- links the shared library based on the previously compiled object files -->
<target name="link" depends="compile" if="has-compiler">
<fileset dir="${buildDir}" id="objFileSet">
<patternset>
<include name="**/*.o" />
</patternset>
</fileset>
<pathconvert pathsep=" " property="objFiles" refid="objFileSet" />
<mkdir dir="${libsDir}" />
<exec executable="${linker}" failonerror="true" dir="${buildDir}">
<arg line="${linker-opts}" />
<arg value="-o" />
<arg path="${libsDir}/${libName}" />
<arg line="${objFiles}"/>
<arg line="${libraries}" />
</exec>
</target>
<target name="postcompile" depends="link">
</target>
</project>

View File

@@ -1,20 +1,29 @@
<project name="vtm-jni-natives" basedir="." default="all">
<target name="clean">
<ant antfile="build-linux64.xml" target="clean"/>
<ant antfile="build-android32.xml" target="clean"/>
<ant antfile="build-linux64.xml" target="clean"/>
<ant antfile="build-linux32.xml" target="clean"/>
<ant antfile="build-windows32.xml" target="clean"/>
<ant antfile="build-windows64.xml" target="clean"/>
</target>
<target name="compile-natives">
<ant antfile="build-linux64.xml"/>
<ant antfile="build-android32.xml"/>
<ant antfile="build-linux64.xml"/>
<ant antfile="build-linux32.xml"/>
<ant antfile="build-windows32.xml"/>
<ant antfile="build-windows64.xml"/>
</target>
<target name="pack-natives">
<jar destfile="../libs/vtm-jni-natives.jar">
<fileset dir="../libs/linux64" includes="libvtm-jni64.so"/>
<fileset dir="../libs/android32" includes="libvtm-jni.so"/>
<fileset dir="../libs/linux32" includes="libvtm-jni.so"/>
<fileset dir="../libs/macosx32" includes="libvtm-jni.so"/>
<fileset dir="../libs/windows32" includes="libvtm-jni.dylib"/>
<fileset dir="../libs/windows64" includes="libvtm-jni.a"/>
</jar>
</target>

View File

@@ -3,10 +3,15 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <alloca.h>
#include <math.h>
#include <stdint.h>
#ifndef __WIN32__
#include <alloca.h>
//#else
//#define alloca(size) __builtin_alloca(size)
#endif
//#ifndef uintptr_t
//typedef unsigned long uintptr_t;
//#endif
@@ -72,7 +77,7 @@ void JNI(setColorBlend)(JNIEnv *env, jclass* clazz, jint location, jint c1, jint
#endif // 0
#undef JNI
#define JNI(X) JNIEXPORT Java_org_oscim_utils_Matrix4_##X
#define JNI(X) JNIEXPORT Java_org_oscim_renderer_GLMatrix_##X
#define CAST(x) (float *)(uintptr_t) x
#define MAT_SIZE 16 * sizeof(float)
@@ -92,6 +97,9 @@ transposeM(float* mTrans, int mTransOffset, float* m, int mOffset);
static inline void
matrix4_proj(float* mat, float* vec);
static inline void
matrix4_proj2D(float* mat, float* vec, float *out);
jlong JNI(alloc)(JNIEnv *env, jclass* clazz)
{
return (long) calloc(16, sizeof(float));
@@ -239,16 +247,59 @@ void JNI(strans)(JNIEnv* env, jclass* clazz, jlong ptr_r, jlong ptr_a)
transposeM(matr, 0, mata, 0);
}
void JNI(prj)(JNIEnv* env, jclass* clazz, jlong ptr, jfloatArray obj_vec)
void JNI(prj)(JNIEnv* env, jclass* clazz, jlong ptr, jfloatArray obj_vec){
float* m = CAST(ptr);
float* vec = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_vec, 0);
matrix4_proj(m, vec);
(*env)->ReleasePrimitiveArrayCritical(env, obj_vec, vec, 0);
}
void JNI(prj3D)(JNIEnv* env, jclass* clazz, jlong ptr, jfloatArray obj_vec, int offset, int cnt)
{
float* m = CAST(ptr);
float* vec = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_vec, 0);
matrix4_proj(m, vec);
int length = cnt * 3;
for (int i = offset * 3; i < length; i += 3)
matrix4_proj(m, (vec + i));
(*env)->ReleasePrimitiveArrayCritical(env, obj_vec, vec, 0);
}
void JNI(prj2D)(JNIEnv* env, jclass* clazz, jlong ptr, jfloatArray obj_vec, int offset, int cnt)
{
float* m = CAST(ptr);
float* vec = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_vec, 0);
offset *= 2;
for (int end = offset + cnt * 2; offset < end; offset += 2)
matrix4_proj2D(m, (vec + offset), (vec + offset));
(*env)->ReleasePrimitiveArrayCritical(env, obj_vec, vec, 0);
}
void JNI(prj2D2)(JNIEnv* env, jclass* clazz, jlong ptr,
jfloatArray obj_src_vec, int src_offset,
jfloatArray obj_dst_vec, int dst_offset, int cnt)
{
float* m = CAST(ptr);
float* src = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_src_vec, 0);
float* dst = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_dst_vec, 0);
int off_src = src_offset * 2;
int off_dst = dst_offset * 2;
for (int end = off_src + cnt * 2; off_src < end; off_src += 2, off_dst += 2)
matrix4_proj2D(m, (src + off_src), (dst + off_dst));
(*env)->ReleasePrimitiveArrayCritical(env, obj_dst_vec, dst, 0);
(*env)->ReleasePrimitiveArrayCritical(env, obj_src_vec, src, 0);
}
static float someRandomEpsilon = 1.0f / (1 << 11);
void JNI(addDepthOffset)(JNIEnv* env, jclass* clazz, jlong ptr, jint delta)
@@ -485,3 +536,15 @@ matrix4_proj(float* mat, float* vec)
vec[1] = y;
vec[2] = z;
}
static inline void
matrix4_proj2D(float* mat, float* vec, float *out)
{
float inv_w = 1.0f / (vec[0] * mat[M30] + vec[1] * mat[M31] + mat[M33]);
float x = (vec[0] * mat[M00] + vec[1] * mat[M01] + mat[M03]) * inv_w;
float y = (vec[0] * mat[M10] + vec[1] * mat[M11] + mat[M13]) * inv_w;
out[0] = x;
out[1] = y;
}

View File

@@ -0,0 +1,523 @@
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*/
#ifndef CLASSFILE_CONSTANTS_H
#define CLASSFILE_CONSTANTS_H
#ifdef __cplusplus
extern "C" {
#endif
/* Flags */
enum {
JVM_ACC_PUBLIC = 0x0001,
JVM_ACC_PRIVATE = 0x0002,
JVM_ACC_PROTECTED = 0x0004,
JVM_ACC_STATIC = 0x0008,
JVM_ACC_FINAL = 0x0010,
JVM_ACC_SYNCHRONIZED = 0x0020,
JVM_ACC_SUPER = 0x0020,
JVM_ACC_VOLATILE = 0x0040,
JVM_ACC_BRIDGE = 0x0040,
JVM_ACC_TRANSIENT = 0x0080,
JVM_ACC_VARARGS = 0x0080,
JVM_ACC_NATIVE = 0x0100,
JVM_ACC_INTERFACE = 0x0200,
JVM_ACC_ABSTRACT = 0x0400,
JVM_ACC_STRICT = 0x0800,
JVM_ACC_SYNTHETIC = 0x1000,
JVM_ACC_ANNOTATION = 0x2000,
JVM_ACC_ENUM = 0x4000
};
/* Used in newarray instruction. */
enum {
JVM_T_BOOLEAN = 4,
JVM_T_CHAR = 5,
JVM_T_FLOAT = 6,
JVM_T_DOUBLE = 7,
JVM_T_BYTE = 8,
JVM_T_SHORT = 9,
JVM_T_INT = 10,
JVM_T_LONG = 11
};
/* Constant Pool Entries */
enum {
JVM_CONSTANT_Utf8 = 1,
JVM_CONSTANT_Unicode = 2, /* unused */
JVM_CONSTANT_Integer = 3,
JVM_CONSTANT_Float = 4,
JVM_CONSTANT_Long = 5,
JVM_CONSTANT_Double = 6,
JVM_CONSTANT_Class = 7,
JVM_CONSTANT_String = 8,
JVM_CONSTANT_Fieldref = 9,
JVM_CONSTANT_Methodref = 10,
JVM_CONSTANT_InterfaceMethodref = 11,
JVM_CONSTANT_NameAndType = 12
};
/* StackMapTable type item numbers */
enum {
JVM_ITEM_Top = 0,
JVM_ITEM_Integer = 1,
JVM_ITEM_Float = 2,
JVM_ITEM_Double = 3,
JVM_ITEM_Long = 4,
JVM_ITEM_Null = 5,
JVM_ITEM_UninitializedThis = 6,
JVM_ITEM_Object = 7,
JVM_ITEM_Uninitialized = 8
};
/* Type signatures */
enum {
JVM_SIGNATURE_ARRAY = '[',
JVM_SIGNATURE_BYTE = 'B',
JVM_SIGNATURE_CHAR = 'C',
JVM_SIGNATURE_CLASS = 'L',
JVM_SIGNATURE_ENDCLASS = ';',
JVM_SIGNATURE_ENUM = 'E',
JVM_SIGNATURE_FLOAT = 'F',
JVM_SIGNATURE_DOUBLE = 'D',
JVM_SIGNATURE_FUNC = '(',
JVM_SIGNATURE_ENDFUNC = ')',
JVM_SIGNATURE_INT = 'I',
JVM_SIGNATURE_LONG = 'J',
JVM_SIGNATURE_SHORT = 'S',
JVM_SIGNATURE_VOID = 'V',
JVM_SIGNATURE_BOOLEAN = 'Z'
};
/* Opcodes */
enum {
JVM_OPC_nop = 0,
JVM_OPC_aconst_null = 1,
JVM_OPC_iconst_m1 = 2,
JVM_OPC_iconst_0 = 3,
JVM_OPC_iconst_1 = 4,
JVM_OPC_iconst_2 = 5,
JVM_OPC_iconst_3 = 6,
JVM_OPC_iconst_4 = 7,
JVM_OPC_iconst_5 = 8,
JVM_OPC_lconst_0 = 9,
JVM_OPC_lconst_1 = 10,
JVM_OPC_fconst_0 = 11,
JVM_OPC_fconst_1 = 12,
JVM_OPC_fconst_2 = 13,
JVM_OPC_dconst_0 = 14,
JVM_OPC_dconst_1 = 15,
JVM_OPC_bipush = 16,
JVM_OPC_sipush = 17,
JVM_OPC_ldc = 18,
JVM_OPC_ldc_w = 19,
JVM_OPC_ldc2_w = 20,
JVM_OPC_iload = 21,
JVM_OPC_lload = 22,
JVM_OPC_fload = 23,
JVM_OPC_dload = 24,
JVM_OPC_aload = 25,
JVM_OPC_iload_0 = 26,
JVM_OPC_iload_1 = 27,
JVM_OPC_iload_2 = 28,
JVM_OPC_iload_3 = 29,
JVM_OPC_lload_0 = 30,
JVM_OPC_lload_1 = 31,
JVM_OPC_lload_2 = 32,
JVM_OPC_lload_3 = 33,
JVM_OPC_fload_0 = 34,
JVM_OPC_fload_1 = 35,
JVM_OPC_fload_2 = 36,
JVM_OPC_fload_3 = 37,
JVM_OPC_dload_0 = 38,
JVM_OPC_dload_1 = 39,
JVM_OPC_dload_2 = 40,
JVM_OPC_dload_3 = 41,
JVM_OPC_aload_0 = 42,
JVM_OPC_aload_1 = 43,
JVM_OPC_aload_2 = 44,
JVM_OPC_aload_3 = 45,
JVM_OPC_iaload = 46,
JVM_OPC_laload = 47,
JVM_OPC_faload = 48,
JVM_OPC_daload = 49,
JVM_OPC_aaload = 50,
JVM_OPC_baload = 51,
JVM_OPC_caload = 52,
JVM_OPC_saload = 53,
JVM_OPC_istore = 54,
JVM_OPC_lstore = 55,
JVM_OPC_fstore = 56,
JVM_OPC_dstore = 57,
JVM_OPC_astore = 58,
JVM_OPC_istore_0 = 59,
JVM_OPC_istore_1 = 60,
JVM_OPC_istore_2 = 61,
JVM_OPC_istore_3 = 62,
JVM_OPC_lstore_0 = 63,
JVM_OPC_lstore_1 = 64,
JVM_OPC_lstore_2 = 65,
JVM_OPC_lstore_3 = 66,
JVM_OPC_fstore_0 = 67,
JVM_OPC_fstore_1 = 68,
JVM_OPC_fstore_2 = 69,
JVM_OPC_fstore_3 = 70,
JVM_OPC_dstore_0 = 71,
JVM_OPC_dstore_1 = 72,
JVM_OPC_dstore_2 = 73,
JVM_OPC_dstore_3 = 74,
JVM_OPC_astore_0 = 75,
JVM_OPC_astore_1 = 76,
JVM_OPC_astore_2 = 77,
JVM_OPC_astore_3 = 78,
JVM_OPC_iastore = 79,
JVM_OPC_lastore = 80,
JVM_OPC_fastore = 81,
JVM_OPC_dastore = 82,
JVM_OPC_aastore = 83,
JVM_OPC_bastore = 84,
JVM_OPC_castore = 85,
JVM_OPC_sastore = 86,
JVM_OPC_pop = 87,
JVM_OPC_pop2 = 88,
JVM_OPC_dup = 89,
JVM_OPC_dup_x1 = 90,
JVM_OPC_dup_x2 = 91,
JVM_OPC_dup2 = 92,
JVM_OPC_dup2_x1 = 93,
JVM_OPC_dup2_x2 = 94,
JVM_OPC_swap = 95,
JVM_OPC_iadd = 96,
JVM_OPC_ladd = 97,
JVM_OPC_fadd = 98,
JVM_OPC_dadd = 99,
JVM_OPC_isub = 100,
JVM_OPC_lsub = 101,
JVM_OPC_fsub = 102,
JVM_OPC_dsub = 103,
JVM_OPC_imul = 104,
JVM_OPC_lmul = 105,
JVM_OPC_fmul = 106,
JVM_OPC_dmul = 107,
JVM_OPC_idiv = 108,
JVM_OPC_ldiv = 109,
JVM_OPC_fdiv = 110,
JVM_OPC_ddiv = 111,
JVM_OPC_irem = 112,
JVM_OPC_lrem = 113,
JVM_OPC_frem = 114,
JVM_OPC_drem = 115,
JVM_OPC_ineg = 116,
JVM_OPC_lneg = 117,
JVM_OPC_fneg = 118,
JVM_OPC_dneg = 119,
JVM_OPC_ishl = 120,
JVM_OPC_lshl = 121,
JVM_OPC_ishr = 122,
JVM_OPC_lshr = 123,
JVM_OPC_iushr = 124,
JVM_OPC_lushr = 125,
JVM_OPC_iand = 126,
JVM_OPC_land = 127,
JVM_OPC_ior = 128,
JVM_OPC_lor = 129,
JVM_OPC_ixor = 130,
JVM_OPC_lxor = 131,
JVM_OPC_iinc = 132,
JVM_OPC_i2l = 133,
JVM_OPC_i2f = 134,
JVM_OPC_i2d = 135,
JVM_OPC_l2i = 136,
JVM_OPC_l2f = 137,
JVM_OPC_l2d = 138,
JVM_OPC_f2i = 139,
JVM_OPC_f2l = 140,
JVM_OPC_f2d = 141,
JVM_OPC_d2i = 142,
JVM_OPC_d2l = 143,
JVM_OPC_d2f = 144,
JVM_OPC_i2b = 145,
JVM_OPC_i2c = 146,
JVM_OPC_i2s = 147,
JVM_OPC_lcmp = 148,
JVM_OPC_fcmpl = 149,
JVM_OPC_fcmpg = 150,
JVM_OPC_dcmpl = 151,
JVM_OPC_dcmpg = 152,
JVM_OPC_ifeq = 153,
JVM_OPC_ifne = 154,
JVM_OPC_iflt = 155,
JVM_OPC_ifge = 156,
JVM_OPC_ifgt = 157,
JVM_OPC_ifle = 158,
JVM_OPC_if_icmpeq = 159,
JVM_OPC_if_icmpne = 160,
JVM_OPC_if_icmplt = 161,
JVM_OPC_if_icmpge = 162,
JVM_OPC_if_icmpgt = 163,
JVM_OPC_if_icmple = 164,
JVM_OPC_if_acmpeq = 165,
JVM_OPC_if_acmpne = 166,
JVM_OPC_goto = 167,
JVM_OPC_jsr = 168,
JVM_OPC_ret = 169,
JVM_OPC_tableswitch = 170,
JVM_OPC_lookupswitch = 171,
JVM_OPC_ireturn = 172,
JVM_OPC_lreturn = 173,
JVM_OPC_freturn = 174,
JVM_OPC_dreturn = 175,
JVM_OPC_areturn = 176,
JVM_OPC_return = 177,
JVM_OPC_getstatic = 178,
JVM_OPC_putstatic = 179,
JVM_OPC_getfield = 180,
JVM_OPC_putfield = 181,
JVM_OPC_invokevirtual = 182,
JVM_OPC_invokespecial = 183,
JVM_OPC_invokestatic = 184,
JVM_OPC_invokeinterface = 185,
JVM_OPC_xxxunusedxxx = 186,
JVM_OPC_new = 187,
JVM_OPC_newarray = 188,
JVM_OPC_anewarray = 189,
JVM_OPC_arraylength = 190,
JVM_OPC_athrow = 191,
JVM_OPC_checkcast = 192,
JVM_OPC_instanceof = 193,
JVM_OPC_monitorenter = 194,
JVM_OPC_monitorexit = 195,
JVM_OPC_wide = 196,
JVM_OPC_multianewarray = 197,
JVM_OPC_ifnull = 198,
JVM_OPC_ifnonnull = 199,
JVM_OPC_goto_w = 200,
JVM_OPC_jsr_w = 201,
JVM_OPC_MAX = 201
};
/* Opcode length initializer, use with something like:
* unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
*/
#define JVM_OPCODE_LENGTH_INITIALIZER { \
1, /* nop */ \
1, /* aconst_null */ \
1, /* iconst_m1 */ \
1, /* iconst_0 */ \
1, /* iconst_1 */ \
1, /* iconst_2 */ \
1, /* iconst_3 */ \
1, /* iconst_4 */ \
1, /* iconst_5 */ \
1, /* lconst_0 */ \
1, /* lconst_1 */ \
1, /* fconst_0 */ \
1, /* fconst_1 */ \
1, /* fconst_2 */ \
1, /* dconst_0 */ \
1, /* dconst_1 */ \
2, /* bipush */ \
3, /* sipush */ \
2, /* ldc */ \
3, /* ldc_w */ \
3, /* ldc2_w */ \
2, /* iload */ \
2, /* lload */ \
2, /* fload */ \
2, /* dload */ \
2, /* aload */ \
1, /* iload_0 */ \
1, /* iload_1 */ \
1, /* iload_2 */ \
1, /* iload_3 */ \
1, /* lload_0 */ \
1, /* lload_1 */ \
1, /* lload_2 */ \
1, /* lload_3 */ \
1, /* fload_0 */ \
1, /* fload_1 */ \
1, /* fload_2 */ \
1, /* fload_3 */ \
1, /* dload_0 */ \
1, /* dload_1 */ \
1, /* dload_2 */ \
1, /* dload_3 */ \
1, /* aload_0 */ \
1, /* aload_1 */ \
1, /* aload_2 */ \
1, /* aload_3 */ \
1, /* iaload */ \
1, /* laload */ \
1, /* faload */ \
1, /* daload */ \
1, /* aaload */ \
1, /* baload */ \
1, /* caload */ \
1, /* saload */ \
2, /* istore */ \
2, /* lstore */ \
2, /* fstore */ \
2, /* dstore */ \
2, /* astore */ \
1, /* istore_0 */ \
1, /* istore_1 */ \
1, /* istore_2 */ \
1, /* istore_3 */ \
1, /* lstore_0 */ \
1, /* lstore_1 */ \
1, /* lstore_2 */ \
1, /* lstore_3 */ \
1, /* fstore_0 */ \
1, /* fstore_1 */ \
1, /* fstore_2 */ \
1, /* fstore_3 */ \
1, /* dstore_0 */ \
1, /* dstore_1 */ \
1, /* dstore_2 */ \
1, /* dstore_3 */ \
1, /* astore_0 */ \
1, /* astore_1 */ \
1, /* astore_2 */ \
1, /* astore_3 */ \
1, /* iastore */ \
1, /* lastore */ \
1, /* fastore */ \
1, /* dastore */ \
1, /* aastore */ \
1, /* bastore */ \
1, /* castore */ \
1, /* sastore */ \
1, /* pop */ \
1, /* pop2 */ \
1, /* dup */ \
1, /* dup_x1 */ \
1, /* dup_x2 */ \
1, /* dup2 */ \
1, /* dup2_x1 */ \
1, /* dup2_x2 */ \
1, /* swap */ \
1, /* iadd */ \
1, /* ladd */ \
1, /* fadd */ \
1, /* dadd */ \
1, /* isub */ \
1, /* lsub */ \
1, /* fsub */ \
1, /* dsub */ \
1, /* imul */ \
1, /* lmul */ \
1, /* fmul */ \
1, /* dmul */ \
1, /* idiv */ \
1, /* ldiv */ \
1, /* fdiv */ \
1, /* ddiv */ \
1, /* irem */ \
1, /* lrem */ \
1, /* frem */ \
1, /* drem */ \
1, /* ineg */ \
1, /* lneg */ \
1, /* fneg */ \
1, /* dneg */ \
1, /* ishl */ \
1, /* lshl */ \
1, /* ishr */ \
1, /* lshr */ \
1, /* iushr */ \
1, /* lushr */ \
1, /* iand */ \
1, /* land */ \
1, /* ior */ \
1, /* lor */ \
1, /* ixor */ \
1, /* lxor */ \
3, /* iinc */ \
1, /* i2l */ \
1, /* i2f */ \
1, /* i2d */ \
1, /* l2i */ \
1, /* l2f */ \
1, /* l2d */ \
1, /* f2i */ \
1, /* f2l */ \
1, /* f2d */ \
1, /* d2i */ \
1, /* d2l */ \
1, /* d2f */ \
1, /* i2b */ \
1, /* i2c */ \
1, /* i2s */ \
1, /* lcmp */ \
1, /* fcmpl */ \
1, /* fcmpg */ \
1, /* dcmpl */ \
1, /* dcmpg */ \
3, /* ifeq */ \
3, /* ifne */ \
3, /* iflt */ \
3, /* ifge */ \
3, /* ifgt */ \
3, /* ifle */ \
3, /* if_icmpeq */ \
3, /* if_icmpne */ \
3, /* if_icmplt */ \
3, /* if_icmpge */ \
3, /* if_icmpgt */ \
3, /* if_icmple */ \
3, /* if_acmpeq */ \
3, /* if_acmpne */ \
3, /* goto */ \
3, /* jsr */ \
2, /* ret */ \
99, /* tableswitch */ \
99, /* lookupswitch */ \
1, /* ireturn */ \
1, /* lreturn */ \
1, /* freturn */ \
1, /* dreturn */ \
1, /* areturn */ \
1, /* return */ \
3, /* getstatic */ \
3, /* putstatic */ \
3, /* getfield */ \
3, /* putfield */ \
3, /* invokevirtual */ \
3, /* invokespecial */ \
3, /* invokestatic */ \
5, /* invokeinterface */ \
0, /* xxxunusedxxx */ \
3, /* new */ \
2, /* newarray */ \
3, /* anewarray */ \
1, /* arraylength */ \
1, /* athrow */ \
3, /* checkcast */ \
3, /* instanceof */ \
1, /* monitorenter */ \
1, /* monitorexit */ \
0, /* wide */ \
4, /* multianewarray */ \
3, /* ifnull */ \
3, /* ifnonnull */ \
5, /* goto_w */ \
5 /* jsr_w */ \
}
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* CLASSFILE_CONSTANTS */

278
jni/jni/jni-headers/jawt.h Normal file
View File

@@ -0,0 +1,278 @@
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JAWT_H_
#define _JAVASOFT_JAWT_H_
#include "jni.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* AWT native interface (new in JDK 1.3)
*
* The AWT native interface allows a native C or C++ application a means
* by which to access native structures in AWT. This is to facilitate moving
* legacy C and C++ applications to Java and to target the needs of the
* community who, at present, wish to do their own native rendering to canvases
* for performance reasons. Standard extensions such as Java3D also require a
* means to access the underlying native data structures of AWT.
*
* There may be future extensions to this API depending on demand.
*
* A VM does not have to implement this API in order to pass the JCK.
* It is recommended, however, that this API is implemented on VMs that support
* standard extensions, such as Java3D.
*
* Since this is a native API, any program which uses it cannot be considered
* 100% pure java.
*/
/*
* AWT Native Drawing Surface (JAWT_DrawingSurface).
*
* For each platform, there is a native drawing surface structure. This
* platform-specific structure can be found in jawt_md.h. It is recommended
* that additional platforms follow the same model. It is also recommended
* that VMs on Win32 and Solaris support the existing structures in jawt_md.h.
*
*******************
* EXAMPLE OF USAGE:
*******************
*
* In Win32, a programmer wishes to access the HWND of a canvas to perform
* native rendering into it. The programmer has declared the paint() method
* for their canvas subclass to be native:
*
*
* MyCanvas.java:
*
* import java.awt.*;
*
* public class MyCanvas extends Canvas {
*
* static {
* System.loadLibrary("mylib");
* }
*
* public native void paint(Graphics g);
* }
*
*
* myfile.c:
*
* #include "jawt_md.h"
* #include <assert.h>
*
* JNIEXPORT void JNICALL
* Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
* {
* JAWT awt;
* JAWT_DrawingSurface* ds;
* JAWT_DrawingSurfaceInfo* dsi;
* JAWT_Win32DrawingSurfaceInfo* dsi_win;
* jboolean result;
* jint lock;
*
* // Get the AWT
* awt.version = JAWT_VERSION_1_3;
* result = JAWT_GetAWT(env, &awt);
* assert(result != JNI_FALSE);
*
* // Get the drawing surface
* ds = awt.GetDrawingSurface(env, canvas);
* assert(ds != NULL);
*
* // Lock the drawing surface
* lock = ds->Lock(ds);
* assert((lock & JAWT_LOCK_ERROR) == 0);
*
* // Get the drawing surface info
* dsi = ds->GetDrawingSurfaceInfo(ds);
*
* // Get the platform-specific drawing info
* dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
*
* //////////////////////////////
* // !!! DO PAINTING HERE !!! //
* //////////////////////////////
*
* // Free the drawing surface info
* ds->FreeDrawingSurfaceInfo(dsi);
*
* // Unlock the drawing surface
* ds->Unlock(ds);
*
* // Free the drawing surface
* awt.FreeDrawingSurface(ds);
* }
*
*/
/*
* JAWT_Rectangle
* Structure for a native rectangle.
*/
typedef struct jawt_Rectangle {
jint x;
jint y;
jint width;
jint height;
} JAWT_Rectangle;
struct jawt_DrawingSurface;
/*
* JAWT_DrawingSurfaceInfo
* Structure for containing the underlying drawing information of a component.
*/
typedef struct jawt_DrawingSurfaceInfo {
/*
* Pointer to the platform-specific information. This can be safely
* cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
* JAWT_X11DrawingSurfaceInfo on Solaris. See jawt_md.h for details.
*/
void* platformInfo;
/* Cached pointer to the underlying drawing surface */
struct jawt_DrawingSurface* ds;
/* Bounding rectangle of the drawing surface */
JAWT_Rectangle bounds;
/* Number of rectangles in the clip */
jint clipSize;
/* Clip rectangle array */
JAWT_Rectangle* clip;
} JAWT_DrawingSurfaceInfo;
#define JAWT_LOCK_ERROR 0x00000001
#define JAWT_LOCK_CLIP_CHANGED 0x00000002
#define JAWT_LOCK_BOUNDS_CHANGED 0x00000004
#define JAWT_LOCK_SURFACE_CHANGED 0x00000008
/*
* JAWT_DrawingSurface
* Structure for containing the underlying drawing information of a component.
* All operations on a JAWT_DrawingSurface MUST be performed from the same
* thread as the call to GetDrawingSurface.
*/
typedef struct jawt_DrawingSurface {
/*
* Cached reference to the Java environment of the calling thread.
* If Lock(), Unlock(), GetDrawingSurfaceInfo() or
* FreeDrawingSurfaceInfo() are called from a different thread,
* this data member should be set before calling those functions.
*/
JNIEnv* env;
/* Cached reference to the target object */
jobject target;
/*
* Lock the surface of the target component for native rendering.
* When finished drawing, the surface must be unlocked with
* Unlock(). This function returns a bitmask with one or more of the
* following values:
*
* JAWT_LOCK_ERROR - When an error has occurred and the surface could not
* be locked.
*
* JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
*
* JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
*
* JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
*/
jint (JNICALL *Lock)
(struct jawt_DrawingSurface* ds);
/*
* Get the drawing surface info.
* The value returned may be cached, but the values may change if
* additional calls to Lock() or Unlock() are made.
* Lock() must be called before this can return a valid value.
* Returns NULL if an error has occurred.
* When finished with the returned value, FreeDrawingSurfaceInfo must be
* called.
*/
JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
(struct jawt_DrawingSurface* ds);
/*
* Free the drawing surface info.
*/
void (JNICALL *FreeDrawingSurfaceInfo)
(JAWT_DrawingSurfaceInfo* dsi);
/*
* Unlock the drawing surface of the target component for native rendering.
*/
void (JNICALL *Unlock)
(struct jawt_DrawingSurface* ds);
} JAWT_DrawingSurface;
/*
* JAWT
* Structure for containing native AWT functions.
*/
typedef struct jawt {
/*
* Version of this structure. This must always be set before
* calling JAWT_GetAWT()
*/
jint version;
/*
* Return a drawing surface from a target jobject. This value
* may be cached.
* Returns NULL if an error has occurred.
* Target must be a java.awt.Component (should be a Canvas
* or Window for native rendering).
* FreeDrawingSurface() must be called when finished with the
* returned JAWT_DrawingSurface.
*/
JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
(JNIEnv* env, jobject target);
/*
* Free the drawing surface allocated in GetDrawingSurface.
*/
void (JNICALL *FreeDrawingSurface)
(JAWT_DrawingSurface* ds);
/*
* Since 1.4
* Locks the entire AWT for synchronization purposes
*/
void (JNICALL *Lock)(JNIEnv* env);
/*
* Since 1.4
* Unlocks the entire AWT for synchronization purposes
*/
void (JNICALL *Unlock)(JNIEnv* env);
/*
* Since 1.4
* Returns a reference to a java.awt.Component from a native
* platform handle. On Windows, this corresponds to an HWND;
* on Solaris and Linux, this is a Drawable. For other platforms,
* see the appropriate machine-dependent header file for a description.
* The reference returned by this function is a local
* reference that is only valid in this environment.
* This function returns a NULL reference if no component could be
* found with matching platform information.
*/
jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
} JAWT;
/*
* Get the AWT native structure. This function returns JNI_FALSE if
* an error occurs.
*/
_JNI_IMPORT_OR_EXPORT_
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
#define JAWT_VERSION_1_3 0x00010003
#define JAWT_VERSION_1_4 0x00010004
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* !_JAVASOFT_JAWT_H_ */

View File

@@ -0,0 +1,237 @@
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Java Debug Wire Protocol Transport Service Provider Interface.
*/
#ifndef JDWPTRANSPORT_H
#define JDWPTRANSPORT_H
#include "jni.h"
enum {
JDWPTRANSPORT_VERSION_1_0 = 0x00010000
};
#ifdef __cplusplus
extern "C" {
#endif
struct jdwpTransportNativeInterface_;
struct _jdwpTransportEnv;
#ifdef __cplusplus
typedef _jdwpTransportEnv jdwpTransportEnv;
#else
typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
#endif /* __cplusplus */
/*
* Errors. Universal errors with JVMTI/JVMDI equivalents keep the
* values the same.
*/
typedef enum {
JDWPTRANSPORT_ERROR_NONE = 0,
JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
JDWPTRANSPORT_ERROR_INTERNAL = 113,
JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
JDWPTRANSPORT_ERROR_IO_ERROR = 202,
JDWPTRANSPORT_ERROR_TIMEOUT = 203,
JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
} jdwpTransportError;
/*
* Structure to define capabilities
*/
typedef struct {
unsigned int can_timeout_attach :1;
unsigned int can_timeout_accept :1;
unsigned int can_timeout_handshake :1;
unsigned int reserved3 :1;
unsigned int reserved4 :1;
unsigned int reserved5 :1;
unsigned int reserved6 :1;
unsigned int reserved7 :1;
unsigned int reserved8 :1;
unsigned int reserved9 :1;
unsigned int reserved10 :1;
unsigned int reserved11 :1;
unsigned int reserved12 :1;
unsigned int reserved13 :1;
unsigned int reserved14 :1;
unsigned int reserved15 :1;
} JDWPTransportCapabilities;
/*
* Structures to define packet layout.
*
* See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
*/
enum {
JDWPTRANSPORT_FLAGS_NONE = 0x0,
JDWPTRANSPORT_FLAGS_REPLY = 0x80
};
typedef struct {
jint len;
jint id;
jbyte flags;
jbyte cmdSet;
jbyte cmd;
jbyte *data;
} jdwpCmdPacket;
typedef struct {
jint len;
jint id;
jbyte flags;
jshort errorCode;
jbyte *data;
} jdwpReplyPacket;
typedef struct {
union {
jdwpCmdPacket cmd;
jdwpReplyPacket reply;
} type;
} jdwpPacket;
/*
* JDWP functions called by the transport.
*/
typedef struct jdwpTransportCallback {
void *(*alloc)(jint numBytes); /* Call this for all allocations */
void (*free)(void *buffer); /* Call this for all deallocations */
} jdwpTransportCallback;
typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
jdwpTransportCallback *callback,
jint version,
jdwpTransportEnv** env);
/* Function Interface */
struct jdwpTransportNativeInterface_ {
/* 1 : RESERVED */
void *reserved1;
/* 2 : Get Capabilities */
jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
JDWPTransportCapabilities *capabilities_ptr);
/* 3 : Attach */
jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
const char* address,
jlong attach_timeout,
jlong handshake_timeout);
/* 4: StartListening */
jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
const char* address,
char** actual_address);
/* 5: StopListening */
jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
/* 6: Accept */
jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
jlong accept_timeout,
jlong handshake_timeout);
/* 7: IsOpen */
jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
/* 8: Close */
jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
/* 9: ReadPacket */
jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
jdwpPacket *pkt);
/* 10: Write Packet */
jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
const jdwpPacket* pkt);
/* 11: GetLastError */
jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
char** error);
};
/*
* Use inlined functions so that C++ code can use syntax such as
* env->Attach("mymachine:5000", 10*1000, 0);
*
* rather than using C's :-
*
* (*env)->Attach(env, "mymachine:5000", 10*1000, 0);
*/
struct _jdwpTransportEnv {
const struct jdwpTransportNativeInterface_ *functions;
#ifdef __cplusplus
jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
return functions->GetCapabilities(this, capabilities_ptr);
}
jdwpTransportError Attach(const char* address, jlong attach_timeout,
jlong handshake_timeout) {
return functions->Attach(this, address, attach_timeout, handshake_timeout);
}
jdwpTransportError StartListening(const char* address,
char** actual_address) {
return functions->StartListening(this, address, actual_address);
}
jdwpTransportError StopListening(void) {
return functions->StopListening(this);
}
jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
return functions->Accept(this, accept_timeout, handshake_timeout);
}
jboolean IsOpen(void) {
return functions->IsOpen(this);
}
jdwpTransportError Close(void) {
return functions->Close(this);
}
jdwpTransportError ReadPacket(jdwpPacket *pkt) {
return functions->ReadPacket(this, pkt);
}
jdwpTransportError WritePacket(const jdwpPacket* pkt) {
return functions->WritePacket(this, pkt);
}
jdwpTransportError GetLastError(char** error) {
return functions->GetLastError(this, error);
}
#endif /* __cplusplus */
};
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* JDWPTRANSPORT_H */

1944
jni/jni/jni-headers/jni.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
/*
* @(#)jawt_md.h 1.13 10/03/23
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Intrinsic.h>
#include "jawt.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* X11-specific declarations for AWT native interface.
* See notes in jawt.h for an example of use.
*/
typedef struct jawt_X11DrawingSurfaceInfo {
Drawable drawable;
Display* display;
VisualID visualID;
Colormap colormapID;
int depth;
/*
* Since 1.4
* Returns a pixel value from a set of RGB values.
* This is useful for paletted color (256 color) modes.
*/
int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds,
int r, int g, int b);
} JAWT_X11DrawingSurfaceInfo;
#ifdef __cplusplus
}
#endif
#endif /* !_JAVASOFT_JAWT_MD_H_ */

View File

@@ -0,0 +1,24 @@
/*
* @(#)jni_md.h 1.20 10/03/23
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
typedef int jint;
#ifdef _LP64 /* 64-bit Solaris */
typedef long jlong;
#else
typedef long long jlong;
#endif
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View File

@@ -0,0 +1,23 @@
/*
* @(#)jni_md.h 1.19 05/11/17
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT __attribute__((visibility("default")))
#define JNIIMPORT
#define JNICALL
#if __LP64__
typedef int jint;
#else
typedef long jint;
#endif
typedef long long jlong;
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

View File

@@ -0,0 +1,41 @@
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JAWT_MD_H_
#define _JAVASOFT_JAWT_MD_H_
#include <windows.h>
#include "jawt.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Win32-specific declarations for AWT native interface.
* See notes in jawt.h for an example of use.
*/
typedef struct jawt_Win32DrawingSurfaceInfo {
/* Native window, DDB, or DIB handle */
union {
HWND hwnd;
HBITMAP hbitmap;
void* pbits;
};
/*
* This HDC should always be used instead of the HDC returned from
* BeginPaint() or any calls to GetDC().
*/
HDC hdc;
HPALETTE hpalette;
} JAWT_Win32DrawingSurfaceInfo;
#ifdef __cplusplus
}
#endif
#endif /* !_JAVASOFT_JAWT_MD_H_ */

View File

@@ -0,0 +1,19 @@
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
#define JNIEXPORT __declspec(dllexport)
#define JNIIMPORT __declspec(dllimport)
#define JNICALL __stdcall
typedef long jint;
typedef __int64 jlong;
typedef signed char jbyte;
#endif /* !_JAVASOFT_JNI_MD_H_ */

1
jni/jni/libtess2 Submodule

Submodule jni/jni/libtess2 added at a43504d78a

18
jni/jni/memcpy_wrap.c Normal file
View File

@@ -0,0 +1,18 @@
#ifndef __ANDROID__
#ifdef __linux__
#ifdef __x86_64__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void * destination, const void * source, size_t num)
{
return memcpy(destination, source, num);
}
#endif
#endif
#endif

View File

@@ -0,0 +1,237 @@
#include <org.oscim.utils.TessJNI.h>
//@line:114
#include <tesselator.h>
#include <string.h>
#include <stdlib.h>
void* heapAlloc( void* userData, unsigned int size ){
TESS_NOTUSED( userData );
return malloc( size );
}
void* heapRealloc( void *userData, void* ptr, unsigned int size ){
TESS_NOTUSED( userData );
return realloc( ptr, size );
}
void heapFree( void* userData, void* ptr ){
TESS_NOTUSED( userData );
free( ptr );
}
JNIEXPORT jlong JNICALL Java_org_oscim_utils_TessJNI_newTess(JNIEnv* env, jclass clazz, jint size) {
//@line:131
{
if (size <= 0)
return (long)tessNewTess(0);
if (size > 10)
size = 10;
TESSalloc ma;
memset(&ma, 0, sizeof(ma));
ma.memalloc = heapAlloc;
ma.memfree = heapFree;
ma.memrealloc = heapRealloc;
//ma.userData = (void*)&allocated;
ma.meshEdgeBucketSize = 2 << size; // 512
ma.meshVertexBucketSize = 2 << size; // 512
ma.meshFaceBucketSize = 1 << size; // 256
ma.dictNodeBucketSize = 2 << size; // 512
ma.regionBucketSize = 1 << size; // 256
ma.extraVertices = 8;
//ma.extraVertices = 256;
return (long)tessNewTess(&ma);
}
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_freeTess(JNIEnv* env, jclass clazz, jlong inst) {
//@line:151
{
tessDeleteTess((TESStesselator*) inst);
}
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_addContour(JNIEnv* env, jclass clazz, jlong inst, jint size, jfloatArray obj_contour, jint stride, jint offset, jint count) {
float* contour = (float*)env->GetPrimitiveArrayCritical(obj_contour, 0);
//@line:164
{
tessAddContour((TESStesselator*) inst, size, contour + (offset * stride), stride, count);
}
env->ReleasePrimitiveArrayCritical(obj_contour, contour, 0);
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_addMultiContour2D(JNIEnv* env, jclass clazz, jlong inst, jintArray obj_index, jfloatArray obj_contour, jint idxStart, jint idxCount) {
int* index = (int*)env->GetPrimitiveArrayCritical(obj_index, 0);
float* contour = (float*)env->GetPrimitiveArrayCritical(obj_contour, 0);
//@line:167
{
TESStesselator* tess = (TESStesselator*) inst;
int offset = 0;
// start at 0 to get the correct offset in contour..
for (int i = 0; i < idxStart + idxCount; i++){
int len = index[i];
if ((len % 2 != 0) || (len < 0))
break;
if (len < 6 || i < idxStart) {
offset += len;
continue;
}
tessAddContour(tess, 2, contour + offset, 8, len >> 1);
offset += len;
}
}
env->ReleasePrimitiveArrayCritical(obj_index, index, 0);
env->ReleasePrimitiveArrayCritical(obj_contour, contour, 0);
}
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_tessContour2D(JNIEnv* env, jclass clazz, jlong inst, jint windingRule, jint elementType, jint polySize, jint vertexSize) {
//@line:194
{
return tessTesselate((TESStesselator*) inst, windingRule, elementType, polySize, vertexSize, 0);
}
}
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_getVertexCount(JNIEnv* env, jclass clazz, jlong inst) {
//@line:197
{
return tessGetVertexCount((TESStesselator*) inst);
}
}
static inline jboolean wrapped_Java_org_oscim_utils_TessJNI_getVertices
(JNIEnv* env, jclass clazz, jlong inst, jfloatArray obj_out, jint offset, jint length, float* out) {
//@line:203
{
const TESSreal* vertices = tessGetVertices((TESStesselator*) inst);
if (!vertices)
return 0;
memcpy(out, vertices + offset, length * sizeof(TESSreal));
return 1;
}
}
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getVertices(JNIEnv* env, jclass clazz, jlong inst, jfloatArray obj_out, jint offset, jint length) {
float* out = (float*)env->GetPrimitiveArrayCritical(obj_out, 0);
jboolean JNI_returnValue = wrapped_Java_org_oscim_utils_TessJNI_getVertices(env, clazz, inst, obj_out, offset, length, out);
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
return JNI_returnValue;
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getVerticesS(JNIEnv* env, jclass clazz, jlong inst, jshortArray obj_out, jint offset, jint length, jfloat scale) {
short* out = (short*)env->GetPrimitiveArrayCritical(obj_out, 0);
//@line:213
{
const TESSreal* vertices = tessGetVertices((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[i] = (short)(vertices[offset++] * scale + 0.5f);
}
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
}
static inline jboolean wrapped_Java_org_oscim_utils_TessJNI_getVertexIndices
(JNIEnv* env, jclass clazz, jlong inst, jintArray obj_out, jint offset, jint length, int* out) {
//@line:225
{
const TESSindex* indices = tessGetVertexIndices((TESStesselator*) inst);
if (!indices)
return 0;
memcpy(out, indices + offset, length * sizeof(TESSindex));
return 1;
}
}
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getVertexIndices(JNIEnv* env, jclass clazz, jlong inst, jintArray obj_out, jint offset, jint length) {
int* out = (int*)env->GetPrimitiveArrayCritical(obj_out, 0);
jboolean JNI_returnValue = wrapped_Java_org_oscim_utils_TessJNI_getVertexIndices(env, clazz, inst, obj_out, offset, length, out);
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
return JNI_returnValue;
}
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_getElementCount(JNIEnv* env, jclass clazz, jlong inst) {
//@line:235
{
return tessGetElementCount((TESStesselator*) inst);
}
}
static inline jboolean wrapped_Java_org_oscim_utils_TessJNI_getElements
(JNIEnv* env, jclass clazz, jlong inst, jintArray obj_out, jint offset, jint length, int* out) {
//@line:241
{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
if (!elements)
return 0;
memcpy(out, elements + offset, length * sizeof(TESSindex));
return 1;
}
}
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getElements(JNIEnv* env, jclass clazz, jlong inst, jintArray obj_out, jint offset, jint length) {
int* out = (int*)env->GetPrimitiveArrayCritical(obj_out, 0);
jboolean JNI_returnValue = wrapped_Java_org_oscim_utils_TessJNI_getElements(env, clazz, inst, obj_out, offset, length, out);
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
return JNI_returnValue;
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getElementsS(JNIEnv* env, jclass clazz, jlong inst, jshortArray obj_out, jint offset, jint length) {
short* out = (short*)env->GetPrimitiveArrayCritical(obj_out, 0);
//@line:251
{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[i] = (short)elements[offset++];
}
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
}
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getElementsWithInputVertexIds(JNIEnv* env, jclass clazz, jlong inst, jshortArray obj_out, jint dstOffset, jint offset, jint length) {
short* out = (short*)env->GetPrimitiveArrayCritical(obj_out, 0);
//@line:259
{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
const TESSindex* indices = tessGetVertexIndices((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[dstOffset++] = (short)(indices[elements[offset++]]);
}
env->ReleasePrimitiveArrayCritical(obj_out, out, 0);
}

View File

@@ -0,0 +1,155 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class org_oscim_utils_TessJNI */
#ifndef _Included_org_oscim_utils_TessJNI
#define _Included_org_oscim_utils_TessJNI
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: org_oscim_utils_TessJNI
* Method: newTess
* Signature: (I)J
*/
JNIEXPORT jlong JNICALL Java_org_oscim_utils_TessJNI_newTess
(JNIEnv *, jclass, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: freeTess
* Signature: (J)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_freeTess
(JNIEnv *, jclass, jlong);
/*
* Class: org_oscim_utils_TessJNI
* Method: addContour
* Signature: (JI[FIII)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_addContour
(JNIEnv *, jclass, jlong, jint, jfloatArray, jint, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: addMultiContour2D
* Signature: (J[I[FII)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_addMultiContour2D
(JNIEnv *, jclass, jlong, jintArray, jfloatArray, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: tessContour2D
* Signature: (JIIII)I
*/
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_tessContour2D
(JNIEnv *, jclass, jlong, jint, jint, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: getVertexCount
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_getVertexCount
(JNIEnv *, jclass, jlong);
/*
* Class: org_oscim_utils_TessJNI
* Method: getVertices
* Signature: (J[FII)Z
*/
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getVertices
(JNIEnv *, jclass, jlong, jfloatArray, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: getVerticesS
* Signature: (J[SIIF)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getVerticesS
(JNIEnv *, jclass, jlong, jshortArray, jint, jint, jfloat);
/*
* Class: org_oscim_utils_TessJNI
* Method: getVertexIndices
* Signature: (J[III)Z
*/
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getVertexIndices
(JNIEnv *, jclass, jlong, jintArray, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: getElementCount
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_org_oscim_utils_TessJNI_getElementCount
(JNIEnv *, jclass, jlong);
/*
* Class: org_oscim_utils_TessJNI
* Method: getElements
* Signature: (J[III)Z
*/
JNIEXPORT jboolean JNICALL Java_org_oscim_utils_TessJNI_getElements
(JNIEnv *, jclass, jlong, jintArray, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: getElementsS
* Signature: (J[SII)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getElementsS
(JNIEnv *, jclass, jlong, jshortArray, jint, jint);
/*
* Class: org_oscim_utils_TessJNI
* Method: getElementsWithInputVertexIds
* Signature: (J[SIII)V
*/
JNIEXPORT void JNICALL Java_org_oscim_utils_TessJNI_getElementsWithInputVertexIds
(JNIEnv *, jclass, jlong, jshortArray, jint, jint, jint);
#ifdef __cplusplus
}
#endif
#endif
/* Header for class org_oscim_utils_TessJNI_ElementType */
#ifndef _Included_org_oscim_utils_TessJNI_ElementType
#define _Included_org_oscim_utils_TessJNI_ElementType
#ifdef __cplusplus
extern "C" {
#endif
#undef org_oscim_utils_TessJNI_ElementType_POLYGONS
#define org_oscim_utils_TessJNI_ElementType_POLYGONS 0L
#undef org_oscim_utils_TessJNI_ElementType_CONNECTED_POLYGONS
#define org_oscim_utils_TessJNI_ElementType_CONNECTED_POLYGONS 1L
#undef org_oscim_utils_TessJNI_ElementType_BOUNDARY_CONTOURS
#define org_oscim_utils_TessJNI_ElementType_BOUNDARY_CONTOURS 2L
#ifdef __cplusplus
}
#endif
#endif
/* Header for class org_oscim_utils_TessJNI_WindingRule */
#ifndef _Included_org_oscim_utils_TessJNI_WindingRule
#define _Included_org_oscim_utils_TessJNI_WindingRule
#ifdef __cplusplus
extern "C" {
#endif
#undef org_oscim_utils_TessJNI_WindingRule_ODD
#define org_oscim_utils_TessJNI_WindingRule_ODD 0L
#undef org_oscim_utils_TessJNI_WindingRule_NONZERO
#define org_oscim_utils_TessJNI_WindingRule_NONZERO 1L
#undef org_oscim_utils_TessJNI_WindingRule_POSITIVE
#define org_oscim_utils_TessJNI_WindingRule_POSITIVE 2L
#undef org_oscim_utils_TessJNI_WindingRule_NEGATIVE
#define org_oscim_utils_TessJNI_WindingRule_NEGATIVE 3L
#undef org_oscim_utils_TessJNI_WindingRule_ABS_GEQ_TWO
#define org_oscim_utils_TessJNI_WindingRule_ABS_GEQ_TWO 4L
#ifdef __cplusplus
}
#endif
#endif

102
jni/src/JniBuilder.java Normal file
View File

@@ -0,0 +1,102 @@
import com.badlogic.gdx.jnigen.AntScriptGenerator;
import com.badlogic.gdx.jnigen.BuildConfig;
import com.badlogic.gdx.jnigen.BuildTarget;
import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;
import com.badlogic.gdx.jnigen.NativeCodeGenerator;
public class JniBuilder {
public static void main(String[] args) throws Exception {
String[] headers = {".", "libtess2/Include"};
String[] sources = {
"gl/utils.c",
"libtess2/Source/bucketalloc.c",
"libtess2/Source/dict.c",
"libtess2/Source/geom.c",
"libtess2/Source/mesh.c",
"libtess2/Source/priorityq.c",
"libtess2/Source/sweep.c",
"libtess2/Source/tess.c",
};
String cflags = " -Wall -std=c99 -O2 -ffast-math";
cflags += " -DNDEBUG"; /* disable debug in libtess2 */
//BuildTarget win32home = BuildTarget
// .newDefaultTarget(TargetOs.Windows, false);
//win32home.compilerPrefix = "";
//win32home.buildFileName = "build-windows32home.xml";
//win32home.excludeFromMasterBuildFile = true;
//win32home.headerDirs = headers;
//win32home.cIncludes = sources;
//win32home.cFlags += cflags;
//win32home.cppFlags += cflags;
BuildTarget win32 = BuildTarget
.newDefaultTarget(TargetOs.Windows, false);
win32.headerDirs = headers;
win32.cIncludes = sources;
win32.cFlags += cflags;
win32.cppFlags += cflags;
BuildTarget win64 = BuildTarget
.newDefaultTarget(TargetOs.Windows, true);
win64.headerDirs = headers;
win64.cIncludes = sources;
win64.cFlags += cflags;
win64.cppFlags += cflags;
BuildTarget lin32 = BuildTarget
.newDefaultTarget(TargetOs.Linux, false);
lin32.headerDirs = headers;
lin32.cIncludes = sources;
lin32.cFlags += cflags;
lin32.cppFlags += cflags;
BuildTarget lin64 = BuildTarget
.newDefaultTarget(TargetOs.Linux, true);
lin64.headerDirs = headers;
lin64.cIncludes = sources;
lin64.cFlags += cflags;
lin64.cppFlags += cflags;
BuildTarget mac = BuildTarget
.newDefaultTarget(TargetOs.MacOsX, false);
mac.headerDirs = headers;
mac.cIncludes = sources;
mac.cFlags += cflags;
mac.cppFlags += cflags;
mac.linkerFlags += " -framework CoreServices -framework Carbon";
BuildTarget android = BuildTarget
.newDefaultTarget(TargetOs.Android, false);
android.headerDirs = headers;
android.cIncludes = sources;
android.cFlags += cflags;
android.cppFlags += cflags;
android.linkerFlags += " -llog";
BuildTarget ios = BuildTarget.newDefaultTarget(TargetOs.IOS, false);
ios.headerDirs = headers;
ios.cIncludes = sources;
ios.cFlags += cflags;
ios.cppFlags += cflags;
new NativeCodeGenerator().generate();
new AntScriptGenerator()
.generate(new BuildConfig("vtm-jni"),
android,
lin64,
lin32,
mac,
ios,
//win32home,
win32,
win64
);
// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v clean");
// BuildExecutor.executeAnt("jni/build-linux64.xml", "-v");
// BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");
}
}

View File

@@ -0,0 +1,277 @@
package org.oscim.utils;
public class TessJNI {
private long inst;
public TessJNI() {
inst = newTess(0);
}
public TessJNI(int bucketSize) {
inst = newTess(bucketSize);
}
@Override
protected void finalize() {
dispose();
}
public void dispose() {
if (inst != 0) {
freeTess(inst);
inst = 0;
}
}
protected long instance() {
return inst;
}
/**
* See OpenGL Red Book for description of the winding rules
* http://www.glprogramming.com/red/chapter11.html
*/
public static final class WindingRule {
public static final int ODD = 0;
public static final int NONZERO = 1;
public static final int POSITIVE = 2;
public static final int NEGATIVE = 3;
public static final int ABS_GEQ_TWO = 4;
}
public static final class ElementType {
public static final int POLYGONS = 0;
public static final int CONNECTED_POLYGONS = 1;
public static final int BOUNDARY_CONTOURS = 2;
}
public void addContour2D(float[] points) {
addContour2D(points, 0, points.length >> 1);
}
public void addContour2D(float[] points, int offset, int length) {
if (length < 6)
return;
if ((length % 2 != 0) || (offset % 2 != 0) || (points.length >> 1) < (offset + length))
throw new IllegalArgumentException("Invalid input: length:" + length
+ ", offset:" + offset
+ ", points.length:" + points.length);
addContour(inst, 2, points, 8, offset, length);
}
public void addContour2D(int[] index, float[] contour) {
addMultiContour2D(inst, index, contour, 0, index.length);
}
public void addContour2D(int[] index, float[] contour, int idxStart, int idxEnd) {
addMultiContour2D(inst, index, contour, idxStart, idxEnd);
}
public boolean tesselate() {
return tessContour2D(inst,
TessJNI.WindingRule.POSITIVE,
TessJNI.ElementType.POLYGONS,
3, 2) == 1;
}
public boolean tesselate(int windingRule, int elementType) {
return tessContour2D(inst, windingRule, elementType, 3, 2) == 1;
}
public int getVertexCount() {
return getVertexCount(inst);
}
public int getElementCount() {
return getElementCount(inst);
}
public void getVertices(float[] out, int offset, int length) {
getVertices(inst, out, offset, length);
}
public void getVertices(short[] out, int offset, int length, float scale) {
getVerticesS(inst, out, offset, length, scale);
}
public void getElements(int[] out, int offset, int length) {
getElements(inst, out, offset, length);
}
public void getElements(short[] out, int offset, int length) {
getElementsS(inst, out, offset, length);
}
public void getVertexIndices(int[] out, int offset, int length) {
getVertexIndices(inst, out, offset, length);
}
public void getElementsWithInputVertexIds(short[] dst, int dstOffset, int offset, int length) {
getElementsWithInputVertexIds(inst, dst, dstOffset, offset, length);
}
// @formatter:off
/*JNI
#include <tesselator.h>
#include <string.h>
#include <stdlib.h>
void* heapAlloc( void* userData, unsigned int size ){
TESS_NOTUSED( userData );
return malloc( size );
}
void* heapRealloc( void *userData, void* ptr, unsigned int size ){
TESS_NOTUSED( userData );
return realloc( ptr, size );
}
void heapFree( void* userData, void* ptr ){
TESS_NOTUSED( userData );
free( ptr );
}
*/
static native long newTess(int size); /* {
if (size <= 0)
return (long)tessNewTess(0);
if (size > 10)
size = 10;
TESSalloc ma;
memset(&ma, 0, sizeof(ma));
ma.memalloc = heapAlloc;
ma.memfree = heapFree;
ma.memrealloc = heapRealloc;
//ma.userData = (void*)&allocated;
ma.meshEdgeBucketSize = 2 << size; // 512
ma.meshVertexBucketSize = 2 << size; // 512
ma.meshFaceBucketSize = 1 << size; // 256
ma.dictNodeBucketSize = 2 << size; // 512
ma.regionBucketSize = 1 << size; // 256
ma.extraVertices = 8;
//ma.extraVertices = 256;
return (long)tessNewTess(&ma);
} */
static native void freeTess(long inst); /* {
tessDeleteTess((TESStesselator*) inst);
} */
/**
* Adds a contour to be tesselated.
* The type of the vertex coordinates is assumed to be TESSreal.
*
* @param tess - pointer to tesselator object.
* @param size - number of coordinates per vertex. Must be 2 or 3.
* @param pointer - pointer to the first coordinate of the first vertex in the array.
* @param stride - defines offset in bytes between consecutive vertices.
* @param count - number of vertices in contour.
*/
static native void addContour(long inst, int size, float[] contour, int stride, int offset, int count);/* {
tessAddContour((TESStesselator*) inst, size, contour + (offset * stride), stride, count);
} */
static native void addMultiContour2D(long inst, int[] index, float[] contour, int idxStart, int idxCount);/* {
TESStesselator* tess = (TESStesselator*) inst;
int offset = 0;
// start at 0 to get the correct offset in contour..
for (int i = 0; i < idxStart + idxCount; i++){
int len = index[i];
if ((len % 2 != 0) || (len < 0))
break;
if (len < 6 || i < idxStart) {
offset += len;
continue;
}
tessAddContour(tess, 2, contour + offset, 8, len >> 1);
offset += len;
}
} */
/**
* Tesselate contours.
*
* @param tess - pointer to tesselator object.
* @param windingRule - winding rules used for tesselation, must be one of TessWindingRule.
* @param elementType - defines the tesselation result element type, must be one of TessElementType.
* @param polySize - defines maximum vertices per polygons if output is polygons.
* @param vertexSize - defines the number of coordinates in tesselation result vertex, must be 2 or 3.
* @param normal - defines the normal of the input contours, of null the normal is calculated automatically.
* @return 1 if succeed, 0 if failed.
*/
static native int tessContour2D(long inst, int windingRule, int elementType, int polySize, int vertexSize);/*{
return tessTesselate((TESStesselator*) inst, windingRule, elementType, polySize, vertexSize, 0);
} */
static native int getVertexCount(long inst); /*{
return tessGetVertexCount((TESStesselator*) inst);
}*/
/**
* Returns pointer to first coordinate of first vertex.
*/
static native boolean getVertices(long inst, float[] out, int offset, int length);/*{
const TESSreal* vertices = tessGetVertices((TESStesselator*) inst);
if (!vertices)
return 0;
memcpy(out, vertices + offset, length * sizeof(TESSreal));
return 1;
}*/
/**
* Returns pointer to first coordinate of first vertex.
*/
static native void getVerticesS(long inst, short[] out, int offset, int length, float scale);/*{
const TESSreal* vertices = tessGetVertices((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[i] = (short)(vertices[offset++] * scale + 0.5f);
}*/
/**
* Returns pointer to first vertex index.
* <p/>
* Vertex indices can be used to map the generated vertices to the original vertices.
* Every point added using tessAddContour() will get a new index starting at 0.
* New vertices generated at the intersections of segments are assigned value TESS_UNDEF.
*/
static native boolean getVertexIndices(long inst, int[] out, int offset, int length);/* {
const TESSindex* indices = tessGetVertexIndices((TESStesselator*) inst);
if (!indices)
return 0;
memcpy(out, indices + offset, length * sizeof(TESSindex));
return 1;
} */
/**
* Returns number of elements in the the tesselated output.
*/
static native int getElementCount(long inst);/*{
return tessGetElementCount((TESStesselator*) inst);
}*/
/**
* Returns pointer to the first element.
*/
static native boolean getElements(long inst, int[] out, int offset, int length);/*{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
if (!elements)
return 0;
memcpy(out, elements + offset, length * sizeof(TESSindex));
return 1;
}*/
/**
* Returns pointer to the first element.
*/
static native void getElementsS(long inst, short[] out, int offset, int length);/*{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[i] = (short)elements[offset++];
}*/
/**
* Returns list of triangles indices (or to the first element of convex polygons).
*/
static native void getElementsWithInputVertexIds(long inst, short[] out, int dstOffset, int offset, int length);/*{
const TESSindex* elements = tessGetElements((TESStesselator*) inst);
const TESSindex* indices = tessGetVertexIndices((TESStesselator*) inst);
for(int i = 0; i < length; i++)
out[dstOffset++] = (short)(indices[elements[offset++]]);
}*/
}

2
jni/tessellate/Makefile Normal file
View File

@@ -0,0 +1,2 @@
all:
gcc -g -DTEST dict.c mesh.c render.c tess.c geom.c memalloc.c normal.c priorityq.c sweep.c tessmono.c tessellate.c main.c -o tessellate

View File

@@ -0,0 +1,256 @@
#include "tessellate.h"
#include <stdlib.h>
#include <stdint.h>
#include <jni.h>
#ifdef __ANDROID__
#include <android/log.h>
#define printf(...) __android_log_print(ANDROID_LOG_DEBUG, "Tesselate", __VA_ARGS__)
#endif
#define CAST_CTX(x) (TessContext *)(uintptr_t) x
void Java_org_oscim_utils_Tessellator_tessFinish(JNIEnv *env, jclass c, jlong ptr_context) {
TessContext *ctx = CAST_CTX(ptr_context);
while (ctx->latest_v) {
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
while (ctx->latest_t) {
Triangle *prev = ctx->latest_t->prev;
free(ctx->latest_t);
ctx->latest_t = prev;
}
//destroy_tess_context(ctx);
free(ctx);
}
Vertex *reverse(Vertex *root) {
Vertex *start = 0;
while (root) {
Vertex *prev = root->prev;
root->prev = start;
start = root;
root = prev;
}
return start;
}
jint Java_org_oscim_utils_Tessellator_tessGetVerticesWO(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_coords, jint offset, jfloat scale) {
TessContext *ctx = CAST_CTX(ptr_context);
int length = (*env)->GetArrayLength(env, obj_coords);
jshort* coords = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_coords, 0);
if (coords == NULL) {
return 0;
}
if (!ctx->reversed) {
ctx->reversed = 1;
ctx->latest_v = reverse(ctx->latest_v);
}
int pos = offset;
for (; ctx->latest_v && pos < length; pos += 2) {
coords[pos + 0] = (ctx->latest_v->pt[0] * scale) + 0.5f;
coords[pos + 1] = (ctx->latest_v->pt[1] * scale) + 0.5f;
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
(*env)->ReleasePrimitiveArrayCritical(env, obj_coords, coords, JNI_ABORT);
return pos - offset;
}
jint Java_org_oscim_utils_Tessellator_tessGetVertices(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_coords, jfloat scale) {
return Java_org_oscim_utils_Tessellator_tessGetVerticesWO(env, c, ptr_context, obj_coords, 0,
scale);
}
jint Java_org_oscim_utils_Tessellator_tessGetVerticesD(JNIEnv *env, jclass c,
jlong ptr_context, jdoubleArray obj_coords) {
TessContext *ctx = CAST_CTX(ptr_context);
int length = (*env)->GetArrayLength(env, obj_coords);
jdouble* coords = (jdouble*) (*env)->GetPrimitiveArrayCritical(env, obj_coords, 0);
if (coords == NULL) {
return 0;
}
if (!ctx->reversed) {
ctx->reversed = 1;
ctx->latest_v = reverse(ctx->latest_v);
}
int cnt = 0;
for (; ctx->latest_v && cnt < length; cnt += 2) {
coords[cnt + 0] = ctx->latest_v->pt[0];
coords[cnt + 1] = ctx->latest_v->pt[1];
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
(*env)->ReleasePrimitiveArrayCritical(env, obj_coords, coords, JNI_ABORT);
return cnt;
}
jint Java_org_oscim_utils_Tessellator_tessGetIndicesWO(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_indices, int offset) {
TessContext *ctx = CAST_CTX(ptr_context);
int length = (*env)->GetArrayLength(env, obj_indices);
jshort* tris = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_indices, 0);
if (tris == NULL) {
return 0;
}
int n_tris_copy = ctx->n_tris;
int pos = offset;
for (; ctx->latest_t && pos < length; pos += 3) {
tris[pos + 0] = ctx->latest_t->v[0];
tris[pos + 1] = ctx->latest_t->v[1];
tris[pos + 2] = ctx->latest_t->v[2];
Triangle *prev = ctx->latest_t->prev;
free(ctx->latest_t);
ctx->latest_t = prev;
n_tris_copy--;
}
ctx->n_tris = n_tris_copy;
(*env)->ReleasePrimitiveArrayCritical(env, obj_indices, tris, JNI_ABORT);
return pos - offset;
}
jint Java_org_oscim_utils_Tessellator_tessGetIndices(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_indices, int offset){
return Java_org_oscim_utils_Tessellator_tessGetIndicesWO(env, c,
ptr_context, obj_indices, 0);
}
jlong Java_org_oscim_utils_Tessellator_tessellate(JNIEnv *env, jclass c,
jfloatArray obj_points, jint pos,
jshortArray obj_index, jint ipos,
jint num_rings, jintArray obj_out) {
//printf("add %d %d %d\n", pos, ipos, num_rings);
jboolean isCopy;
float* orig_points = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_points, &isCopy);
if (orig_points == NULL)
return 0;
const float *points = orig_points + pos;
jshort* orig_indices = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_index, &isCopy);
if (orig_indices == NULL) {
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
return 0;
}
jshort* indices = orig_indices + ipos;
const float **rings = malloc(sizeof(float*) * (num_rings + 1));
int offset = 0;
for (int i = 0; i < num_rings; i++) {
rings[i] = points + offset;
offset += indices[i];
}
(*env)->ReleasePrimitiveArrayCritical(env, obj_index, orig_indices, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
rings[num_rings] = points + offset;
int nverts, ntris;
TessContext *ctx = tessellate(NULL, &nverts, NULL, &ntris,
rings, rings + (num_rings + 1));
free(rings);
nverts = 1 + ctx->latest_v->index;
ntris = ctx->n_tris;
jint* out = (jint*) (*env)->GetPrimitiveArrayCritical(env, obj_out, &isCopy);
if (out == NULL) {
return 0;
}
out[0] = nverts;
out[1] = ntris;
(*env)->ReleasePrimitiveArrayCritical(env, obj_out, out, JNI_ABORT);
return (long) ctx;
}
jlong Java_org_oscim_renderer_sublayers_MeshLayer_tessellateD(JNIEnv *env, jclass c,
jdoubleArray obj_points, jint pos,
jshortArray obj_index, jint ipos,
jint num_rings) { //, jintArray obj_out) {
jboolean isCopy;
//printf("add %d %d %d\n", pos, ipos, num_rings);
double* orig_points = (double*) (*env)->GetPrimitiveArrayCritical(env, obj_points, &isCopy);
if (orig_points == NULL)
return 0;
const double *points = orig_points + pos;
jshort* orig_indices = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_index, &isCopy);
if (orig_indices == NULL) {
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
return 0;
}
jshort* indices = orig_indices + ipos;
const double **rings = malloc(sizeof(double*) * (num_rings + 1));
int offset = 0;
for (int i = 0; i < num_rings; i++) {
rings[i] = points + offset;
offset += indices[i];
}
rings[num_rings] = points + offset;
int nverts, ntris;
TessContext *ctx = tessellateD(NULL, &nverts, NULL, &ntris,
rings, rings + (num_rings + 1));
free(rings);
(*env)->ReleasePrimitiveArrayCritical(env, obj_index, orig_indices, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
return (long) ctx;
}

View File

@@ -7,22 +7,25 @@ void run_example(const double vertices_array[],
int contours_size)
{
double *coordinates_out;
int *tris_out;
int nverts, ntris, i;
const double *p = vertices_array;
/* const double **contours = contours_array; */
//const double **contours = contours_array;
tessellate(&coordinates_out, &nverts,
tessellateD(&coordinates_out, &nverts,
&tris_out, &ntris,
contours_array, contours_array + contours_size);
for (i=0; i<2 * nverts; ++i) {
fprintf(stdout, "%g ", coordinates_out[i]);
for (i=0; i< nverts; i += 1) {
fprintf(stdout, "%g %g, ", coordinates_out[i*2], coordinates_out[i*2+1]);
}
fprintf(stdout, "\n");
for (i=0; i<3 * ntris; ++i) {
fprintf(stdout, "%d ", tris_out[i]);
for (i=0; i< ntris; i += 1) {
fprintf(stdout, "%d %d %d\n", tris_out[i*3], tris_out[i*3+1], tris_out[i*3+2]);
}
fprintf(stdout, "\n");
free(coordinates_out);
@@ -30,15 +33,23 @@ void run_example(const double vertices_array[],
free(tris_out);
}
int main()
{
double a1[] = { 0, 0, 1, 5, 2, 0, -1, 3, 3, 3 };
const double *c1[] = {a1, a1+10};
int s1 = 2;
int main() {
double a1[] = {
0, 0,
1, 0,
1, 1,
0, 1,
};
const double *c1[] = {a1, a1 + 8};
run_example(a1, c1, 2);
printf("\n");
double a2[] = { 0, 0, 3, 0, 3, 3, 0, 3,
1, 1, 2, 1, 2, 2, 1, 2 };
const double *c2[] = {a2, a2+8, a2+16};
int s2 = 3;
run_example(a2, c2, s2);

276
jni/tessellate/normal.c Normal file
View File

@@ -0,0 +1,276 @@
/*
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
/*
** Author: Eric Veach, July 1994.
**
*/
#include "gluos.h"
#include "mesh.h"
#include "tess.h"
#include "normal.h"
#include <math.h>
#include <assert.h>
#include <stdio.h>
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define Dot(u,v) (u[0]*v[0] + u[1]*v[1] + u[2]*v[2])
#if 0
static void Normalize( GLdouble v[3] )
{
GLdouble len = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
assert( len > 0 );
len = sqrt( len );
v[0] /= len;
v[1] /= len;
v[2] /= len;
}
#endif
#undef ABS
#define ABS(x) ((x) < 0 ? -(x) : (x))
static int LongAxis(GLdouble v[3])
{
int i = 0;
if (ABS(v[1]) > ABS(v[0])) {
i = 1;
}
if (ABS(v[2]) > ABS(v[i])) {
i = 2;
}
return i;
}
static void ComputeNormal(GLUtesselator *tess, GLdouble norm[3])
{
GLUvertex *v, *v1, *v2;
GLdouble c, tLen2, maxLen2;
GLdouble maxVal[3], minVal[3], d1[3], d2[3], tNorm[3];
GLUvertex *maxVert[3], *minVert[3];
GLUvertex *vHead = &tess->mesh->vHead;
int i;
maxVal[0] = maxVal[1] = maxVal[2] = -2 * GLU_TESS_MAX_COORD;
minVal[0] = minVal[1] = minVal[2] = 2 * GLU_TESS_MAX_COORD;
for (v = vHead->next; v != vHead; v = v->next) {
for (i = 0; i < 3; ++i) {
c = v->coords[i];
if (c < minVal[i]) {
minVal[i] = c;
minVert[i] = v;
}
if (c > maxVal[i]) {
maxVal[i] = c;
maxVert[i] = v;
}
}
}
/* Find two vertices separated by at least 1/sqrt(3) of the maximum
* distance between any two vertices
*/
i = 0;
if (maxVal[1] - minVal[1] > maxVal[0] - minVal[0]) {
i = 1;
}
if (maxVal[2] - minVal[2] > maxVal[i] - minVal[i]) {
i = 2;
}
if (minVal[i] >= maxVal[i]) {
/* All vertices are the same -- normal doesn't matter */
norm[0] = 0;
norm[1] = 0;
norm[2] = 1;
return;
}
/* Look for a third vertex which forms the triangle with maximum area
* (Length of normal == twice the triangle area)
*/
maxLen2 = 0;
v1 = minVert[i];
v2 = maxVert[i];
d1[0] = v1->coords[0] - v2->coords[0];
d1[1] = v1->coords[1] - v2->coords[1];
d1[2] = v1->coords[2] - v2->coords[2];
for (v = vHead->next; v != vHead; v = v->next) {
d2[0] = v->coords[0] - v2->coords[0];
d2[1] = v->coords[1] - v2->coords[1];
d2[2] = v->coords[2] - v2->coords[2];
tNorm[0] = d1[1] * d2[2] - d1[2] * d2[1];
tNorm[1] = d1[2] * d2[0] - d1[0] * d2[2];
tNorm[2] = d1[0] * d2[1] - d1[1] * d2[0];
tLen2 = tNorm[0] * tNorm[0] + tNorm[1] * tNorm[1] + tNorm[2] * tNorm[2];
if (tLen2 > maxLen2) {
maxLen2 = tLen2;
norm[0] = tNorm[0];
norm[1] = tNorm[1];
norm[2] = tNorm[2];
}
}
if (maxLen2 <= 0) {
/* All points lie on a single line -- any decent normal will do */
norm[0] = norm[1] = norm[2] = 0;
norm[LongAxis(d1)] = 1;
}
//printf("compute normal %f %f %f\n", norm[0], norm[1], norm[2]);
}
static void CheckOrientation(GLUtesselator *tess)
{
GLdouble area;
GLUface *f, *fHead = &tess->mesh->fHead;
GLUvertex *v, *vHead = &tess->mesh->vHead;
GLUhalfEdge *e;
/* When we compute the normal automatically, we choose the orientation
* so that the sum of the signed areas of all contours is non-negative.
*/
area = 0;
for (f = fHead->next; f != fHead; f = f->next) {
e = f->anEdge;
if (e->winding <= 0)
continue;
do {
area += (e->Org->s - e->Dst->s) * (e->Org->t + e->Dst->t);
e = e->Lnext;
} while (e != f->anEdge);
}
if (area < 0) {
/* Reverse the orientation by flipping all the t-coordinates */
for (v = vHead->next; v != vHead; v = v->next) {
v->t = -v->t;
}
tess->tUnit[0] = -tess->tUnit[0];
tess->tUnit[1] = -tess->tUnit[1];
tess->tUnit[2] = -tess->tUnit[2];
}
}
#ifdef FOR_TRITE_TEST_PROGRAM
#include <stdlib.h>
extern int RandomSweep;
#define S_UNIT_X (RandomSweep ? (2*drand48()-1) : 1.0)
#define S_UNIT_Y (RandomSweep ? (2*drand48()-1) : 0.0)
#else
#if defined(SLANTED_SWEEP)
/* The "feature merging" is not intended to be complete. There are
* special cases where edges are nearly parallel to the sweep line
* which are not implemented. The algorithm should still behave
* robustly (ie. produce a reasonable tesselation) in the presence
* of such edges, however it may miss features which could have been
* merged. We could minimize this effect by choosing the sweep line
* direction to be something unusual (ie. not parallel to one of the
* coordinate axes).
*/
#define S_UNIT_X 0.50941539564955385 /* Pre-normalized */
#define S_UNIT_Y 0.86052074622010633
#else
#define S_UNIT_X 1.0
#define S_UNIT_Y 0.0
#endif
#endif
/* Determine the polygon normal and project vertices onto the plane
* of the polygon.
*/
void __gl_projectPolygon(GLUtesselator *tess)
{
GLUvertex *v, *vHead = &tess->mesh->vHead;
GLdouble norm[3];
GLdouble *sUnit, *tUnit;
int i, computedNormal = FALSE;
norm[0] = tess->normal[0];
norm[1] = tess->normal[1];
norm[2] = tess->normal[2];
if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) {
ComputeNormal(tess, norm);
computedNormal = TRUE;
}
sUnit = tess->sUnit;
tUnit = tess->tUnit;
i = LongAxis(norm);
#if defined(FOR_TRITE_TEST_PROGRAM) || defined(TRUE_PROJECT)
/* Choose the initial sUnit vector to be approximately perpendicular
* to the normal.
*/
Normalize( norm );
sUnit[i] = 0;
sUnit[(i+1)%3] = S_UNIT_X;
sUnit[(i+2)%3] = S_UNIT_Y;
/* Now make it exactly perpendicular */
w = Dot( sUnit, norm );
sUnit[0] -= w * norm[0];
sUnit[1] -= w * norm[1];
sUnit[2] -= w * norm[2];
Normalize( sUnit );
/* Choose tUnit so that (sUnit,tUnit,norm) form a right-handed frame */
tUnit[0] = norm[1]*sUnit[2] - norm[2]*sUnit[1];
tUnit[1] = norm[2]*sUnit[0] - norm[0]*sUnit[2];
tUnit[2] = norm[0]*sUnit[1] - norm[1]*sUnit[0];
Normalize( tUnit );
#else
/* Project perpendicular to a coordinate axis -- better numerically */
sUnit[i] = 0;
sUnit[(i + 1) % 3] = S_UNIT_X;
sUnit[(i + 2) % 3] = S_UNIT_Y;
tUnit[i] = 0;
tUnit[(i + 1) % 3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y;
tUnit[(i + 2) % 3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X;
#endif
/* Project the vertices onto the sweep plane */
for (v = vHead->next; v != vHead; v = v->next) {
v->s = Dot( v->coords, sUnit );
v->t = Dot( v->coords, tUnit );
}
if (computedNormal) {
CheckOrientation(tess);
}
}

529
jni/tessellate/render.c Normal file
View File

@@ -0,0 +1,529 @@
/*
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
/*
** Author: Eric Veach, July 1994.
**
*/
#include "gluos.h"
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include "mesh.h"
#include "tess.h"
#include "render.h"
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
/* This structure remembers the information we need about a primitive
* to be able to render it later, once we have determined which
* primitive is able to use the most triangles.
*/
struct FaceCount {
long size; /* number of triangles used */
GLUhalfEdge *eStart; /* edge where this primitive starts */
void (*render)(GLUtesselator *, GLUhalfEdge *, long);
/* routine to render this primitive */
};
static struct FaceCount MaximumFan(GLUhalfEdge *eOrig);
static struct FaceCount MaximumStrip(GLUhalfEdge *eOrig);
static void RenderFan(GLUtesselator *tess, GLUhalfEdge *eStart, long size);
static void RenderStrip(GLUtesselator *tess, GLUhalfEdge *eStart, long size);
static void RenderTriangle(GLUtesselator *tess, GLUhalfEdge *eStart,
long size);
static void RenderMaximumFaceGroup(GLUtesselator *tess, GLUface *fOrig);
static void RenderLonelyTriangles(GLUtesselator *tess, GLUface *head);
/************************ Strips and Fans decomposition ******************/
/* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle
* fans, strips, and separate triangles. A substantial effort is made
* to use as few rendering primitives as possible (ie. to make the fans
* and strips as large as possible).
*
* The rendering output is provided as callbacks (see the api).
*/
void __gl_renderMesh(GLUtesselator *tess, GLUmesh *mesh)
{
GLUface *f;
/* Make a list of separate triangles so we can render them all at once */
tess->lonelyTriList = NULL;
for (f = mesh->fHead.next; f != &mesh->fHead; f = f->next) {
f->marked = FALSE;
}
for (f = mesh->fHead.next; f != &mesh->fHead; f = f->next) {
/* We examine all faces in an arbitrary order. Whenever we find
* an unprocessed face F, we output a group of faces including F
* whose size is maximum.
*/
if (f->inside && !f->marked) {
RenderMaximumFaceGroup(tess, f);
assert( f->marked);
}
}
if (tess->lonelyTriList != NULL) {
RenderLonelyTriangles(tess, tess->lonelyTriList);
tess->lonelyTriList = NULL;
}
}
static void RenderMaximumFaceGroup(GLUtesselator *tess, GLUface *fOrig)
{
/* We want to find the largest triangle fan or strip of unmarked faces
* which includes the given face fOrig. There are 3 possible fans
* passing through fOrig (one centered at each vertex), and 3 possible
* strips (one for each CCW permutation of the vertices). Our strategy
* is to try all of these, and take the primitive which uses the most
* triangles (a greedy approach).
*/
GLUhalfEdge *e = fOrig->anEdge;
struct FaceCount max, newFace;
max.size = 1;
max.eStart = e;
max.render = &RenderTriangle;
if (!tess->flagBoundary) {
newFace = MaximumFan(e);
if (newFace.size > max.size) {
max = newFace;
}
newFace = MaximumFan(e->Lnext);
if (newFace.size > max.size) {
max = newFace;
}
newFace = MaximumFan(e->Lprev);
if (newFace.size > max.size) {
max = newFace;
}
newFace = MaximumStrip(e);
if (newFace.size > max.size) {
max = newFace;
}
newFace = MaximumStrip(e->Lnext);
if (newFace.size > max.size) {
max = newFace;
}
newFace = MaximumStrip(e->Lprev);
if (newFace.size > max.size) {
max = newFace;
}
}
(*(max.render))(tess, max.eStart, max.size);
}
/* Macros which keep track of faces we have marked temporarily, and allow
* us to backtrack when necessary. With triangle fans, this is not
* really necessary, since the only awkward case is a loop of triangles
* around a single origin vertex. However with strips the situation is
* more complicated, and we need a general tracking method like the
* one here.
*/
#define Marked(f) (! (f)->inside || (f)->marked)
#define AddToTrail(f,t) ((f)->trail = (t), (t) = (f), (f)->marked = TRUE)
#define FreeTrail(t) do { \
while( (t) != NULL ) { \
(t)->marked = FALSE; t = (t)->trail; \
} \
} while(0) /* absorb trailing semicolon */
static struct FaceCount MaximumFan(GLUhalfEdge *eOrig)
{
/* eOrig->Lface is the face we want to render. We want to find the size
* of a maximal fan around eOrig->Org. To do this we just walk around
* the origin vertex as far as possible in both directions.
*/
struct FaceCount newFace = { 0, NULL, &RenderFan };
GLUface *trail = NULL;
GLUhalfEdge *e;
for (e = eOrig; !Marked( e->Lface ); e = e->Onext) {
AddToTrail( e->Lface, trail);
++newFace.size;
}
for (e = eOrig; !Marked( e->Rface ); e = e->Oprev) {
AddToTrail( e->Rface, trail);
++newFace.size;
}
newFace.eStart = e;
/*LINTED*/
FreeTrail( trail);
return newFace;
}
#define IsEven(n) (((n) & 1) == 0)
static struct FaceCount MaximumStrip(GLUhalfEdge *eOrig)
{
/* Here we are looking for a maximal strip that contains the vertices
* eOrig->Org, eOrig->Dst, eOrig->Lnext->Dst (in that order or the
* reverse, such that all triangles are oriented CCW).
*
* Again we walk forward and backward as far as possible. However for
* strips there is a twist: to get CCW orientations, there must be
* an *even* number of triangles in the strip on one side of eOrig.
* We walk the strip starting on a side with an even number of triangles;
* if both side have an odd number, we are forced to shorten one side.
*/
struct FaceCount newFace = { 0, NULL, &RenderStrip };
long headSize = 0, tailSize = 0;
GLUface *trail = NULL;
GLUhalfEdge *e, *eTail, *eHead;
for (e = eOrig; !Marked( e->Lface ); ++tailSize, e = e->Onext) {
AddToTrail( e->Lface, trail);
++tailSize;
e = e->Dprev;
if (Marked( e->Lface ))
break;
AddToTrail( e->Lface, trail);
}
eTail = e;
for (e = eOrig; !Marked( e->Rface ); ++headSize, e = e->Dnext) {
AddToTrail( e->Rface, trail);
++headSize;
e = e->Oprev;
if (Marked( e->Rface ))
break;
AddToTrail( e->Rface, trail);
}
eHead = e;
newFace.size = tailSize + headSize;
if (IsEven( tailSize )) {
newFace.eStart = eTail->Sym;
}
else if (IsEven( headSize )) {
newFace.eStart = eHead;
}
else {
/* Both sides have odd length, we must shorten one of them. In fact,
* we must start from eHead to guarantee inclusion of eOrig->Lface.
*/
--newFace.size;
newFace.eStart = eHead->Onext;
}
/*LINTED*/
FreeTrail( trail);
return newFace;
}
static void RenderTriangle(GLUtesselator *tess, GLUhalfEdge *e, long size)
{
/* Just add the triangle to a triangle list, so we can render all
* the separate triangles at once.
*/
assert( size == 1);
AddToTrail( e->Lface, tess->lonelyTriList);
}
static void RenderLonelyTriangles(GLUtesselator *tess, GLUface *f)
{
/* Now we render all the separate triangles which could not be
* grouped into a triangle fan or strip.
*/
GLUhalfEdge *e;
int newState;
int edgeState = -1; /* force edge state output for first vertex */
CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLES);
for (; f != NULL; f = f->trail) {
/* Loop once for each edge (there will always be 3 edges) */
e = f->anEdge;
do {
if (tess->flagBoundary) {
/* Set the "edge state" to TRUE just before we output the
* first vertex of each edge on the polygon boundary.
*/
newState = !e->Rface->inside;
if (edgeState != newState) {
edgeState = newState;
CALL_EDGE_FLAG_OR_EDGE_FLAG_DATA( edgeState);
}
}
CALL_VERTEX_OR_VERTEX_DATA( e->Org->data);
e = e->Lnext;
} while (e != f->anEdge);
}
CALL_END_OR_END_DATA();
}
static void RenderFan(GLUtesselator *tess, GLUhalfEdge *e, long size)
{
/* Render as many CCW triangles as possible in a fan starting from
* edge "e". The fan *should* contain exactly "size" triangles
* (otherwise we've goofed up somewhere).
*/
CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_FAN);
CALL_VERTEX_OR_VERTEX_DATA( e->Org->data);
CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data);
while (!Marked( e->Lface )) {
e->Lface->marked = TRUE;
--size;
e = e->Onext;
CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data);
}
assert( size == 0);
CALL_END_OR_END_DATA();
}
static void RenderStrip(GLUtesselator *tess, GLUhalfEdge *e, long size)
{
/* Render as many CCW triangles as possible in a strip starting from
* edge "e". The strip *should* contain exactly "size" triangles
* (otherwise we've goofed up somewhere).
*/
CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_STRIP);
CALL_VERTEX_OR_VERTEX_DATA( e->Org->data);
CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data);
while (!Marked( e->Lface )) {
e->Lface->marked = TRUE;
--size;
e = e->Dprev;
CALL_VERTEX_OR_VERTEX_DATA( e->Org->data);
if (Marked( e->Lface ))
break;
e->Lface->marked = TRUE;
--size;
e = e->Onext;
CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data);
}
assert( size == 0);
CALL_END_OR_END_DATA();
}
/************************ Boundary contour decomposition ******************/
/* __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one
* contour for each face marked "inside". The rendering output is
* provided as callbacks (see the api).
*/
void __gl_renderBoundary(GLUtesselator *tess, GLUmesh *mesh)
{
GLUface *f;
GLUhalfEdge *e;
for (f = mesh->fHead.next; f != &mesh->fHead; f = f->next) {
if (f->inside) {
CALL_BEGIN_OR_BEGIN_DATA( GL_LINE_LOOP);
e = f->anEdge;
do {
CALL_VERTEX_OR_VERTEX_DATA( e->Org->data);
e = e->Lnext;
} while (e != f->anEdge);
CALL_END_OR_END_DATA();
}
}
}
/************************ Quick-and-dirty decomposition ******************/
#define SIGN_INCONSISTENT 2
static int ComputeNormal(GLUtesselator *tess, GLdouble norm[3], int check)
/*
* If check==FALSE, we compute the polygon normal and place it in norm[].
* If check==TRUE, we check that each triangle in the fan from v0 has a
* consistent orientation with respect to norm[]. If triangles are
* consistently oriented CCW, return 1; if CW, return -1; if all triangles
* are degenerate return 0; otherwise (no consistent orientation) return
* SIGN_INCONSISTENT.
*/
{
CachedVertex *v0 = tess->cache;
CachedVertex *vn = v0 + tess->cacheCount;
CachedVertex *vc;
GLdouble dot, xc, yc, zc, xp, yp, zp, n[3];
int sign = 0;
/* Find the polygon normal. It is important to get a reasonable
* normal even when the polygon is self-intersecting (eg. a bowtie).
* Otherwise, the computed normal could be very tiny, but perpendicular
* to the true plane of the polygon due to numerical noise. Then all
* the triangles would appear to be degenerate and we would incorrectly
* decompose the polygon as a fan (or simply not render it at all).
*
* We use a sum-of-triangles normal algorithm rather than the more
* efficient sum-of-trapezoids method (used in CheckOrientation()
* in normal.c). This lets us explicitly reverse the signed area
* of some triangles to get a reasonable normal in the self-intersecting
* case.
*/
if (!check) {
norm[0] = norm[1] = norm[2] = 0.0;
}
vc = v0 + 1;
xc = vc->coords[0] - v0->coords[0];
yc = vc->coords[1] - v0->coords[1];
zc = vc->coords[2] - v0->coords[2];
while (++vc < vn) {
xp = xc;
yp = yc;
zp = zc;
xc = vc->coords[0] - v0->coords[0];
yc = vc->coords[1] - v0->coords[1];
zc = vc->coords[2] - v0->coords[2];
/* Compute (vp - v0) cross (vc - v0) */
n[0] = yp * zc - zp * yc;
n[1] = zp * xc - xp * zc;
n[2] = xp * yc - yp * xc;
dot = n[0] * norm[0] + n[1] * norm[1] + n[2] * norm[2];
if (!check) {
/* Reverse the contribution of back-facing triangles to get
* a reasonable normal for self-intersecting polygons (see above)
*/
if (dot >= 0) {
norm[0] += n[0];
norm[1] += n[1];
norm[2] += n[2];
}
else {
norm[0] -= n[0];
norm[1] -= n[1];
norm[2] -= n[2];
}
}
else if (dot != 0) {
/* Check the new orientation for consistency with previous triangles */
if (dot > 0) {
if (sign < 0)
return SIGN_INCONSISTENT;
sign = 1;
}
else {
if (sign > 0)
return SIGN_INCONSISTENT;
sign = -1;
}
}
}
//printf("%f, %f, %f -- %d\n", norm[0], norm[1], norm[2], sign);
return sign;
}
/* __gl_renderCache( tess ) takes a single contour and tries to render it
* as a triangle fan. This handles convex polygons, as well as some
* non-convex polygons if we get lucky.
*
* Returns TRUE if the polygon was successfully rendered. The rendering
* output is provided as callbacks (see the api).
*/
GLboolean __gl_renderCache(GLUtesselator *tess)
{
CachedVertex *v0 = tess->cache;
CachedVertex *vn = v0 + tess->cacheCount;
CachedVertex *vc;
GLdouble norm[3];
int sign;
if (tess->cacheCount < 3) {
/* Degenerate contour -- no output */
return TRUE;
}
norm[0] = tess->normal[0];
norm[1] = tess->normal[1];
norm[2] = tess->normal[2];
if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) {
ComputeNormal(tess, norm, FALSE);
}
sign = ComputeNormal(tess, norm, TRUE);
if (sign == SIGN_INCONSISTENT) {
/* Fan triangles did not have a consistent orientation */
return FALSE;
}
if (sign == 0) {
/* All triangles were degenerate */
return TRUE;
}
/* Make sure we do the right thing for each winding rule */
switch (tess->windingRule) {
case GLU_TESS_WINDING_ODD:
case GLU_TESS_WINDING_NONZERO:
break;
case GLU_TESS_WINDING_POSITIVE:
if (sign < 0)
return TRUE;
break;
case GLU_TESS_WINDING_NEGATIVE:
if (sign > 0)
return TRUE;
break;
case GLU_TESS_WINDING_ABS_GEQ_TWO:
return TRUE;
}
CALL_BEGIN_OR_BEGIN_DATA( tess->boundaryOnly ? GL_LINE_LOOP
: (tess->cacheCount > 3) ? GL_TRIANGLE_FAN
: GL_TRIANGLES);
CALL_VERTEX_OR_VERTEX_DATA( v0->data);
if (sign > 0) {
for (vc = v0 + 1; vc < vn; ++vc) {
CALL_VERTEX_OR_VERTEX_DATA( vc->data);
}
}
else {
for (vc = vn - 1; vc > v0; --vc) {
CALL_VERTEX_OR_VERTEX_DATA( vc->data);
}
}
CALL_END_OR_END_DATA();
return TRUE;
}

650
jni/tessellate/tess.c Normal file
View File

@@ -0,0 +1,650 @@
/*
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
/*
** Author: Eric Veach, July 1994.
**
*/
#include "gluos.h"
#include <stddef.h>
#include <assert.h>
#include <setjmp.h>
#include "memalloc.h"
#include "tess.h"
#include "mesh.h"
#include "normal.h"
#include "sweep.h"
#include "tessmono.h"
#include "render.h"
#define GLU_TESS_DEFAULT_TOLERANCE 0.0
#define GLU_TESS_MESH 100112 /* void (*)(GLUmesh *mesh) */
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
/*ARGSUSED*/static void GLAPIENTRY noBegin(GLenum type) {
}
/*ARGSUSED*/static void GLAPIENTRY noEdgeFlag(GLboolean boundaryEdge) {
}
/*ARGSUSED*/static void GLAPIENTRY noVertex(void *data) {
}
/*ARGSUSED*/static void GLAPIENTRY noEnd(void) {
}
/*ARGSUSED*/static void GLAPIENTRY noError(GLenum errnum) {
}
/*ARGSUSED*/static void GLAPIENTRY noCombine(GLdouble coords[3], void *data[4],
GLfloat weight[4], void **dataOut) {
}
/*ARGSUSED*/static void GLAPIENTRY noMesh(GLUmesh *mesh) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noBeginData(GLenum type,
void *polygonData) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noEdgeFlagData(GLboolean boundaryEdge,
void *polygonData) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noVertexData(void *data,
void *polygonData) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noEndData(void *polygonData) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noErrorData(GLenum errnum,
void *polygonData) {
}
/*ARGSUSED*/void GLAPIENTRY __gl_noCombineData(GLdouble coords[3],
void *data[4],
GLfloat weight[4],
void **outData,
void *polygonData) {
}
/* Half-edges are allocated in pairs (see mesh.c) */
typedef struct {
GLUhalfEdge e, eSym;
} EdgePair;
#undef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \
MAX(sizeof(GLUvertex),sizeof(GLUface))))
GLUtesselator * GLAPIENTRY
gluNewTess(void)
{
GLUtesselator *tess;
/* Only initialize fields which can be changed by the api. Other fields
* are initialized where they are used.
*/
if (memInit(MAX_FAST_ALLOC) == 0) {
return 0; /* out of memory */
}
tess = (GLUtesselator *) memAlloc(sizeof(GLUtesselator));
if (tess == NULL) {
return 0; /* out of memory */
}
tess->state = T_DORMANT;
tess->normal[0] = 0;
tess->normal[1] = 0;
tess->normal[2] = 0;
tess->relTolerance = GLU_TESS_DEFAULT_TOLERANCE;
tess->windingRule = GLU_TESS_WINDING_ODD;
tess->flagBoundary = FALSE;
tess->boundaryOnly = FALSE;
tess->callBegin = &noBegin;
tess->callEdgeFlag = &noEdgeFlag;
tess->callVertex = &noVertex;
tess->callEnd = &noEnd;
tess->callError = &noError;
tess->callCombine = &noCombine;
tess->callMesh = &noMesh;
tess->callBeginData = &__gl_noBeginData;
tess->callEdgeFlagData = &__gl_noEdgeFlagData;
tess->callVertexData = &__gl_noVertexData;
tess->callEndData = &__gl_noEndData;
tess->callErrorData = &__gl_noErrorData;
tess->callCombineData = &__gl_noCombineData;
tess->polygonData = NULL;
return tess;
}
static void MakeDormant(GLUtesselator *tess)
{
/* Return the tessellator to its original dormant state. */
if (tess->mesh != NULL) {
__gl_meshDeleteMesh(tess->mesh);
}
tess->state = T_DORMANT;
tess->lastEdge = NULL;
tess->mesh = NULL;
}
#define RequireState( tess, s ) if( tess->state != s ) GotoState(tess,s)
static void GotoState(GLUtesselator *tess, enum TessState newState)
{
while (tess->state != newState) {
/* We change the current state one level at a time, to get to
* the desired state.
*/
if (tess->state < newState) {
switch (tess->state) {
case T_DORMANT:
CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_POLYGON);
gluTessBeginPolygon(tess, NULL);
break;
case T_IN_POLYGON:
CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_BEGIN_CONTOUR);
gluTessBeginContour(tess);
break;
default:
;
}
}
else {
switch (tess->state) {
case T_IN_CONTOUR:
CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_END_CONTOUR);
gluTessEndContour(tess);
break;
case T_IN_POLYGON:
CALL_ERROR_OR_ERROR_DATA( GLU_TESS_MISSING_END_POLYGON);
/* gluTessEndPolygon( tess ) is too much work! */
MakeDormant(tess);
break;
default:
;
}
}
}
}
void GLAPIENTRY
gluDeleteTess(GLUtesselator *tess)
{
RequireState( tess, T_DORMANT);
memFree(tess);
}
void GLAPIENTRY
gluTessProperty(GLUtesselator *tess, GLenum which, GLdouble value)
{
GLenum windingRule;
switch (which) {
case GLU_TESS_TOLERANCE:
if (value < 0.0 || value > 1.0)
break;
tess->relTolerance = value;
return;
case GLU_TESS_WINDING_RULE:
windingRule = (GLenum) value;
if (windingRule != value)
break; /* not an integer */
switch (windingRule) {
case GLU_TESS_WINDING_ODD:
case GLU_TESS_WINDING_NONZERO:
case GLU_TESS_WINDING_POSITIVE:
case GLU_TESS_WINDING_NEGATIVE:
case GLU_TESS_WINDING_ABS_GEQ_TWO:
tess->windingRule = windingRule;
return;
default:
break;
}
case GLU_TESS_BOUNDARY_ONLY:
tess->boundaryOnly = (value != 0);
return;
default:
CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM);
return;
}
CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_VALUE);
}
/* Returns tessellator property */
void GLAPIENTRY
gluGetTessProperty(GLUtesselator *tess, GLenum which, GLdouble *value)
{
switch (which) {
case GLU_TESS_TOLERANCE:
/* tolerance should be in range [0..1] */
assert(0.0 <= tess->relTolerance && tess->relTolerance <= 1.0);
*value = tess->relTolerance;
break;
case GLU_TESS_WINDING_RULE:
assert(tess->windingRule == GLU_TESS_WINDING_ODD ||
tess->windingRule == GLU_TESS_WINDING_NONZERO ||
tess->windingRule == GLU_TESS_WINDING_POSITIVE ||
tess->windingRule == GLU_TESS_WINDING_NEGATIVE ||
tess->windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO);
*value = tess->windingRule;
break;
case GLU_TESS_BOUNDARY_ONLY:
assert(tess->boundaryOnly == TRUE || tess->boundaryOnly == FALSE);
*value = tess->boundaryOnly;
break;
default:
*value = 0.0;
CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM);
break;
}
} /* gluGetTessProperty() */
void GLAPIENTRY
gluTessNormal(GLUtesselator *tess, GLdouble x, GLdouble y, GLdouble z)
{
tess->normal[0] = x;
tess->normal[1] = y;
tess->normal[2] = z;
}
void GLAPIENTRY
gluTessCallback(GLUtesselator *tess, GLenum which, _GLUfuncptr fn)
{
switch (which) {
case GLU_TESS_BEGIN:
tess->callBegin = (fn == NULL) ? &noBegin : (void (GLAPIENTRY *)(GLenum)) fn;
return;
case GLU_TESS_BEGIN_DATA:
tess->callBeginData = (fn == NULL) ?
&__gl_noBeginData :
(void (GLAPIENTRY *)(GLenum, void *)) fn;
return;
case GLU_TESS_EDGE_FLAG:
tess->callEdgeFlag = (fn == NULL) ? &noEdgeFlag :
(void (GLAPIENTRY *)(GLboolean)) fn;
/* If the client wants boundary edges to be flagged,
* we render everything as separate triangles (no strips or fans).
*/
tess->flagBoundary = (fn != NULL);
return;
case GLU_TESS_EDGE_FLAG_DATA:
tess->callEdgeFlagData = (fn == NULL) ?
&__gl_noEdgeFlagData :
(void (GLAPIENTRY *)(GLboolean, void *)) fn;
/* If the client wants boundary edges to be flagged,
* we render everything as separate triangles (no strips or fans).
*/
tess->flagBoundary = (fn != NULL);
return;
case GLU_TESS_VERTEX:
tess->callVertex = (fn == NULL) ? &noVertex :
(void (GLAPIENTRY *)(void *)) fn;
return;
case GLU_TESS_VERTEX_DATA:
tess->callVertexData = (fn == NULL) ?
&__gl_noVertexData :
(void (GLAPIENTRY *)(void *, void *)) fn;
return;
case GLU_TESS_END:
tess->callEnd = (fn == NULL) ? &noEnd : (void (GLAPIENTRY *)(void)) fn;
return;
case GLU_TESS_END_DATA:
tess->callEndData = (fn == NULL) ? &__gl_noEndData :
(void (GLAPIENTRY *)(void *)) fn;
return;
case GLU_TESS_ERROR:
tess->callError = (fn == NULL) ? &noError : (void (GLAPIENTRY *)(GLenum)) fn;
return;
case GLU_TESS_ERROR_DATA:
tess->callErrorData = (fn == NULL) ?
&__gl_noErrorData :
(void (GLAPIENTRY *)(GLenum, void *)) fn;
return;
case GLU_TESS_COMBINE:
tess->callCombine =
(fn == NULL) ? &noCombine :
(void (GLAPIENTRY *)(GLdouble[3], void *[4], GLfloat[4], void **)) fn;
return;
case GLU_TESS_COMBINE_DATA:
tess->callCombineData = (fn == NULL) ? &__gl_noCombineData :
(void (GLAPIENTRY *)(GLdouble[3],
void *[4],
GLfloat[4],
void **,
void *)) fn;
return;
case GLU_TESS_MESH:
tess->callMesh = (fn == NULL) ? &noMesh : (void (GLAPIENTRY *)(GLUmesh *)) fn;
return;
default:
CALL_ERROR_OR_ERROR_DATA( GLU_INVALID_ENUM);
return;
}
}
static int AddVertex(GLUtesselator *tess, GLdouble coords[3], void *data)
{
GLUhalfEdge *e;
e = tess->lastEdge;
if (e == NULL) {
/* Make a self-loop (one vertex, one edge). */
e = __gl_meshMakeEdge(tess->mesh);
if (e == NULL)
return 0;
if (!__gl_meshSplice(e, e->Sym))
return 0;
}
else {
/* Create a new vertex and edge which immediately follow e
* in the ordering around the left face.
*/
if (__gl_meshSplitEdge(e) == NULL)
return 0;
e = e->Lnext;
}
/* The new vertex is now e->Org. */
e->Org->data = data;
e->Org->coords[0] = coords[0];
e->Org->coords[1] = coords[1];
e->Org->coords[2] = coords[2];
/* The winding of an edge says how the winding number changes as we
* cross from the edge''s right face to its left face. We add the
* vertices in such an order that a CCW contour will add +1 to
* the winding number of the region inside the contour.
*/
e->winding = 1;
e->Sym->winding = -1;
tess->lastEdge = e;
return 1;
}
static void CacheVertex(GLUtesselator *tess, GLdouble coords[3], void *data)
{
CachedVertex *v = &tess->cache[tess->cacheCount];
v->data = data;
v->coords[0] = coords[0];
v->coords[1] = coords[1];
v->coords[2] = coords[2];
++tess->cacheCount;
}
static int EmptyCache(GLUtesselator *tess)
{
CachedVertex *v = tess->cache;
CachedVertex *vLast;
tess->mesh = __gl_meshNewMesh();
if (tess->mesh == NULL)
return 0;
for (vLast = v + tess->cacheCount; v < vLast; ++v) {
if (!AddVertex(tess, v->coords, v->data))
return 0;
}
tess->cacheCount = 0;
tess->emptyCache = FALSE;
return 1;
}
void GLAPIENTRY
gluTessVertex(GLUtesselator *tess, GLdouble coords[3], void *data)
{
int i, tooLarge = FALSE;
GLdouble x, clamped[3];
RequireState( tess, T_IN_CONTOUR);
if (tess->emptyCache) {
if (!EmptyCache(tess)) {
CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY);
return;
}
tess->lastEdge = NULL;
}
for (i = 0; i < 3; ++i) {
x = coords[i];
if (x < -GLU_TESS_MAX_COORD) {
x = -GLU_TESS_MAX_COORD;
tooLarge = TRUE;
}
if (x > GLU_TESS_MAX_COORD) {
x = GLU_TESS_MAX_COORD;
tooLarge = TRUE;
}
clamped[i] = x;
}
if (tooLarge) {
CALL_ERROR_OR_ERROR_DATA( GLU_TESS_COORD_TOO_LARGE);
}
if (tess->mesh == NULL) {
if (tess->cacheCount < TESS_MAX_CACHE) {
CacheVertex(tess, clamped, data);
return;
}
if (!EmptyCache(tess)) {
CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY);
return;
}
}
if (!AddVertex(tess, clamped, data)) {
CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY);
}
}
void GLAPIENTRY
gluTessBeginPolygon(GLUtesselator *tess, void *data)
{
RequireState( tess, T_DORMANT);
tess->state = T_IN_POLYGON;
tess->cacheCount = 0;
tess->emptyCache = FALSE;
tess->mesh = NULL;
tess->polygonData = data;
}
void GLAPIENTRY
gluTessBeginContour(GLUtesselator *tess)
{
RequireState( tess, T_IN_POLYGON);
tess->state = T_IN_CONTOUR;
tess->lastEdge = NULL;
if (tess->cacheCount > 0) {
/* Just set a flag so we don't get confused by empty contours
* -- these can be generated accidentally with the obsolete
* NextContour() interface.
*/
tess->emptyCache = TRUE;
}
}
void GLAPIENTRY
gluTessEndContour(GLUtesselator *tess)
{
RequireState( tess, T_IN_CONTOUR);
tess->state = T_IN_POLYGON;
}
void GLAPIENTRY
gluTessEndPolygon(GLUtesselator *tess)
{
GLUmesh *mesh;
if (setjmp(tess->env) != 0) {
/* come back here if out of memory */
CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY);
return;
}
RequireState( tess, T_IN_POLYGON);
tess->state = T_DORMANT;
if (tess->mesh == NULL) {
if (!tess->flagBoundary && tess->callMesh == &noMesh) {
/* Try some special code to make the easy cases go quickly
* (eg. convex polygons). This code does NOT handle multiple contours,
* intersections, edge flags, and of course it does not generate
* an explicit mesh either.
*/
if (__gl_renderCache(tess)) {
tess->polygonData = NULL;
return;
}
}
if (!EmptyCache(tess))
longjmp(tess->env, 1); /* could've used a label*/
}
/* Determine the polygon normal and project vertices onto the plane
* of the polygon.
*/
__gl_projectPolygon(tess);
/* __gl_computeInterior( tess ) computes the planar arrangement specified
* by the given contours, and further subdivides this arrangement
* into regions. Each region is marked "inside" if it belongs
* to the polygon, according to the rule given by tess->windingRule.
* Each interior region is guaranteed be monotone.
*/
if (!__gl_computeInterior(tess)) {
longjmp(tess->env, 1); /* could've used a label */
}
mesh = tess->mesh;
if (!tess->fatalError) {
int rc = 1;
/* If the user wants only the boundary contours, we throw away all edges
* except those which separate the interior from the exterior.
* Otherwise we tessellate all the regions marked "inside".
*/
if (tess->boundaryOnly) {
rc = __gl_meshSetWindingNumber(mesh, 1, TRUE);
}
else {
rc = __gl_meshTessellateInterior(mesh);
}
if (rc == 0)
longjmp(tess->env, 1); /* could've used a label */
__gl_meshCheckMesh(mesh);
if (tess->callBegin != &noBegin || tess->callEnd != &noEnd
|| tess->callVertex != &noVertex || tess->callEdgeFlag != &noEdgeFlag
|| tess->callBeginData != &__gl_noBeginData
|| tess->callEndData != &__gl_noEndData
|| tess->callVertexData != &__gl_noVertexData
|| tess->callEdgeFlagData != &__gl_noEdgeFlagData)
{
if (tess->boundaryOnly) {
__gl_renderBoundary(tess, mesh); /* output boundary contours */
}
else {
__gl_renderMesh(tess, mesh); /* output strips and fans */
}
}
if (tess->callMesh != &noMesh) {
/* Throw away the exterior faces, so that all faces are interior.
* This way the user doesn't have to check the "inside" flag,
* and we don't need to even reveal its existence. It also leaves
* the freedom for an implementation to not generate the exterior
* faces in the first place.
*/
__gl_meshDiscardExterior(mesh);
(*tess->callMesh)(mesh); /* user wants the mesh itself */
tess->mesh = NULL;
tess->polygonData = NULL;
return;
}
}
__gl_meshDeleteMesh(mesh);
tess->polygonData = NULL;
tess->mesh = NULL;
}
/*XXXblythe unused function*/
#if 0
void GLAPIENTRY
gluDeleteMesh( GLUmesh *mesh )
{
__gl_meshDeleteMesh( mesh );
}
#endif
/*******************************************************/
/* Obsolete calls -- for backward compatibility */
void GLAPIENTRY
gluBeginPolygon(GLUtesselator *tess)
{
gluTessBeginPolygon(tess, NULL);
gluTessBeginContour(tess);
}
/*ARGSUSED*/
void GLAPIENTRY
gluNextContour(GLUtesselator *tess, GLenum type)
{
gluTessEndContour(tess);
gluTessBeginContour(tess);
}
void GLAPIENTRY
gluEndPolygon(GLUtesselator *tess)
{
gluTessEndContour(tess);
gluTessEndPolygon(tess);
}

View File

@@ -1,42 +1,12 @@
#include <jni.h>
#include <string.h>
#include "glu.h"
#include "tess.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef __ANDROID__
#include <android/log.h>
#endif
#include "tessellate.h"
#ifndef uintptr_t
typedef unsigned long uintptr_t;
#endif
/******************************************************************************/
typedef struct Triangle {
int v[3];
struct Triangle *prev;
} Triangle;
typedef struct Vertex {
double pt[3];
int index;
struct Vertex *prev;
} Vertex;
typedef struct TessContext {
Triangle *latest_t;
int n_tris;
Vertex *v_prev;
Vertex *v_prevprev;
Vertex *latest_v;
GLenum current_mode;
int odd_even_strip;
void (*vertex_cb)(Vertex *, struct TessContext *);
} TessContext;
void skip_vertex(Vertex *v, TessContext *ctx);
@@ -54,6 +24,7 @@ TessContext *new_tess_context()
result->v_prev = NULL;
result->vertex_cb = &skip_vertex;
result->odd_even_strip = 0;
result->reversed = 0;
return result;
}
@@ -167,7 +138,7 @@ void begin(GLenum which, void *poly_data)
ctx->vertex_cb = &fan_vertex;
break;
default:
printf(stderr, "ERROR, can't handle %d\n", (int) which);
//printf(stderr, "ERROR, can't handle %d\n", (int) which);
ctx->vertex_cb = &skip_vertex;
break;
}
@@ -210,8 +181,37 @@ void write_output(TessContext *ctx, float **coordinates_out, int **tris_out, int
}
}
void write_outputD(TessContext *ctx, double **coordinates_out, int **tris_out, int *vc, int *tc)
{
int n_verts = 1 + ctx->latest_v->index;
*vc = n_verts;
int n_tris_copy = ctx->n_tris;
*tc = ctx->n_tris;
*coordinates_out = malloc(n_verts * sizeof(double) * 2);
*tris_out = (ctx->n_tris ? malloc(ctx->n_tris * sizeof(int) * 3) : NULL);
while (ctx->latest_v) {
(*coordinates_out)[2 * ctx->latest_v->index] = ctx->latest_v->pt[0];
(*coordinates_out)[2 * ctx->latest_v->index + 1] = ctx->latest_v->pt[1];
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
while (ctx->latest_t) {
(*tris_out)[3 * (n_tris_copy - 1)] = ctx->latest_t->v[0];
(*tris_out)[3 * (n_tris_copy - 1) + 1] = ctx->latest_t->v[1];
(*tris_out)[3 * (n_tris_copy - 1) + 2] = ctx->latest_t->v[2];
Triangle *prev = ctx->latest_t->prev;
free(ctx->latest_t);
ctx->latest_t = prev;
n_tris_copy--;
}
}
TessContext *tessellate(
float **verts,
int *nverts,
int **tris,
int *ntris,
const float **contoursbegin,
const float **contoursend)
@@ -229,6 +229,7 @@ TessContext *tessellate(
gluTessCallback(tess, GLU_TESS_COMBINE_DATA, (GLvoid (*)()) &combine);
gluTessBeginPolygon(tess, ctx);
do {
contourbegin = *contoursbegin++;
contourend = *contoursbegin;
@@ -242,141 +243,66 @@ TessContext *tessellate(
} while (contoursbegin != (contoursend - 1));
gluTessEndPolygon(tess);
//write_output(ctx, verts, tris, nverts, ntris);
//destroy_tess_context(ctx);
#ifdef TEST
write_output(ctx, verts, tris, nverts, ntris);
destroy_tess_context(ctx);
#else
gluDeleteTess(tess);
#endif
return ctx;
}
#ifdef __ANDROID__
#define printf(...) __android_log_print(ANDROID_LOG_DEBUG, "Tesselate", __VA_ARGS__)
TessContext *tessellateD(
double **verts,
int *nverts,
int **tris,
int *ntris,
const double **contoursbegin,
const double **contoursend)
{
const double *contourbegin, *contourend;
Vertex *current_vertex;
GLUtesselator *tess;
TessContext *ctx;
tess = gluNewTess();
ctx = new_tess_context();
//tess->normal[2] = -1;
gluTessCallback(tess, GLU_TESS_VERTEX_DATA, (GLvoid (*)()) &vertex);
gluTessCallback(tess, GLU_TESS_BEGIN_DATA, (GLvoid (*)()) &begin);
gluTessCallback(tess, GLU_TESS_COMBINE_DATA, (GLvoid (*)()) &combine);
gluTessBeginPolygon(tess, ctx);
do {
//printf("begin contour\n");
contourbegin = *contoursbegin++;
contourend = *contoursbegin;
gluTessBeginContour(tess);
while (contourbegin != contourend) {
//printf("add point %f %f \n", contourbegin[0], contourbegin[1]);
current_vertex = new_vertex(ctx, contourbegin[0], contourbegin[1]);
contourbegin += 2;
gluTessVertex(tess, current_vertex->pt, current_vertex);
}
gluTessEndContour(tess);
} while (contoursbegin != (contoursend - 1));
gluTessEndPolygon(tess);
#ifdef TEST
write_outputD(ctx, verts, tris, nverts, ntris);
destroy_tess_context(ctx);
#else
gluDeleteTess(tess);
#endif
#define CAST_CTX(x) (TessContext *)(uintptr_t) x
void Java_org_oscim_renderer_sublayers_MeshLayer_tessFinish(JNIEnv *env, jclass c,
jlong ptr_context) {
TessContext *ctx = CAST_CTX(ptr_context);
while (ctx->latest_v) {
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
while (ctx->latest_t) {
Triangle *prev = ctx->latest_t->prev;
free(ctx->latest_t);
ctx->latest_t = prev;
}
destroy_tess_context(ctx);
return ctx;
}
jint Java_org_oscim_renderer_sublayers_MeshLayer_tessGetCoordinates(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_coords, jfloat scale) {
TessContext *ctx = CAST_CTX(ptr_context);
int length = (*env)->GetArrayLength(env, obj_coords);
jshort* coords = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_coords, 0);
if (coords == NULL) {
return 0;
}
int n_verts = 1 + ctx->latest_v->index;
int n_tris_copy = ctx->n_tris;
int cnt = 0;
for (; ctx->latest_v && cnt < length; cnt += 2) {
coords[cnt + 0] = (ctx->latest_v->pt[0] * scale) + 0.5f;
coords[cnt + 1] = (ctx->latest_v->pt[1] * scale) + 0.5f;
Vertex *prev = ctx->latest_v->prev;
free(ctx->latest_v);
ctx->latest_v = prev;
}
(*env)->ReleasePrimitiveArrayCritical(env, obj_coords, coords, JNI_ABORT);
return cnt;
}
jint Java_org_oscim_renderer_sublayers_MeshLayer_tessGetIndices(JNIEnv *env, jclass c,
jlong ptr_context, jshortArray obj_indices) {
TessContext *ctx = CAST_CTX(ptr_context);
int length = (*env)->GetArrayLength(env, obj_indices);
jshort* tris = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_indices, 0);
if (tris == NULL) {
return 0;
}
int n_tris_copy = ctx->n_tris;
int cnt = 0;
for (; ctx->latest_t && cnt < length; cnt += 3) {
tris[cnt + 0] = ctx->latest_t->v[0];
tris[cnt + 1] = ctx->latest_t->v[1];
tris[cnt + 2] = ctx->latest_t->v[2];
Triangle *prev = ctx->latest_t->prev;
free(ctx->latest_t);
ctx->latest_t = prev;
n_tris_copy--;
}
ctx->n_tris = n_tris_copy;
(*env)->ReleasePrimitiveArrayCritical(env, obj_indices, tris, JNI_ABORT);
return cnt;
}
jlong Java_org_oscim_renderer_sublayers_MeshLayer_tessellate(JNIEnv *env, jclass c,
jfloatArray obj_points, jint pos,
jshortArray obj_index, jint ipos,
jint num_rings) { //, jintArray obj_out) {
jboolean isCopy;
printf("add %d %d %d\n", pos, ipos, num_rings);
float* orig_points = (float*) (*env)->GetPrimitiveArrayCritical(env, obj_points, &isCopy);
if (orig_points == NULL)
return 0;
const float *points = orig_points + pos;
jshort* orig_indices = (jshort*) (*env)->GetPrimitiveArrayCritical(env, obj_index, &isCopy);
if (orig_indices == NULL) {
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
return 0;
}
jshort* indices = orig_indices + ipos;
const float **rings = malloc(sizeof(float*) * (num_rings + 1));
int offset = 0;
for (int i = 0; i < num_rings; i++) {
rings[i] = points + offset;
offset += indices[i];
}
rings[num_rings] = points + offset;
int nverts, ntris;
TessContext *ctx = tessellate(&nverts, &ntris,
rings, rings + (num_rings + 1));
free(rings);
(*env)->ReleasePrimitiveArrayCritical(env, obj_index, orig_indices, JNI_ABORT);
(*env)->ReleasePrimitiveArrayCritical(env, obj_points, orig_points, JNI_ABORT);
return (long) ctx;
}

View File

@@ -0,0 +1,42 @@
#include "glu.h"
typedef struct Triangle {
int v[3];
struct Triangle *prev;
} Triangle;
typedef struct Vertex {
double pt[3];
int index;
struct Vertex *prev;
} Vertex;
typedef struct TessContext {
Triangle *latest_t;
int n_tris;
int reversed;
Vertex *v_prev;
Vertex *v_prevprev;
Vertex *latest_v;
GLenum current_mode;
int odd_even_strip;
void (*vertex_cb)(Vertex *, struct TessContext *);
} TessContext;
TessContext *tessellateD
(double **verts,
int *nverts,
int **tris,
int *ntris,
const double **contoursbegin,
const double **contoursend);
TessContext *tessellate
(float **verts,
int *nverts,
int **tris,
int *ntris,
const float **contoursbegin,
const float **contoursend);

345
resources/rendertheme.xsd Normal file
View File

@@ -0,0 +1,345 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="http://opensciencemap.org/rendertheme"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
<!-- attribute types -->
<xs:simpleType name="cap">
<xs:restriction base="xs:string">
<xs:enumeration value="butt" />
<xs:enumeration value="round" />
<xs:enumeration value="square" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="closed">
<xs:restriction base="xs:string">
<xs:enumeration value="yes" />
<xs:enumeration value="no" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="color">
<xs:restriction base="xs:string">
<xs:pattern value="#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="elementList">
<xs:restriction base="xs:string">
<xs:enumeration value="node" />
<xs:enumeration value="way" />
<xs:enumeration value="any" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="selectorList">
<xs:restriction base="xs:string">
<xs:enumeration value="first" />
<xs:enumeration value="any" />
<xs:enumeration value="when-matched" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fontFamily">
<xs:restriction base="xs:string">
<xs:enumeration value="default" />
<xs:enumeration value="default_bold" />
<xs:enumeration value="monospace" />
<xs:enumeration value="sans_serif" />
<xs:enumeration value="serif" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="fontStyle">
<xs:restriction base="xs:string">
<xs:enumeration value="bold" />
<xs:enumeration value="bold_italic" />
<xs:enumeration value="italic" />
<xs:enumeration value="normal" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nonNegativeFloat">
<xs:restriction base="xs:float">
<xs:minInclusive value="0" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="src">
<xs:restriction base="xs:string">
<xs:pattern value="((file|assets):)?.+" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="strokeDasharray">
<xs:restriction base="xs:string">
<xs:pattern
value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="textKey">
<xs:restriction base="xs:string">
<xs:enumeration value="ele" />
<xs:enumeration value="addr:housenumber" />
<xs:enumeration value="name" />
<xs:enumeration value="ref" />
</xs:restriction>
</xs:simpleType>
<!-- style menu cat element -->
<xs:complexType name="cat">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu name element -->
<xs:complexType name="name">
<xs:attribute name="lang" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu overlay element -->
<xs:complexType name="overlay">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu layer element -->
<xs:complexType name="layer">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="name" maxOccurs="unbounded" minOccurs="0" type="tns:name" />
<xs:element name="cat" maxOccurs="unbounded" minOccurs="0" type="tns:cat" />
<xs:element name="overlay" maxOccurs="unbounded" minOccurs="0" type="tns:overlay" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="parent" type="xs:string" use="optional" />
<xs:attribute name="visible" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="enabled" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<!-- rendering instructions -->
<xs:complexType name="area">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blend" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blend-fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="mesh" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="caption">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="k" type="tns:textKey" use="required" />
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- polygon area expressed as a ratio to tile area, e.g. 0.1 for 10% of tile area -->
<xs:attribute name="area-size" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- priority for label placement, 0 = highest priority -->
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
<!-- symbol src name -->
<xs:attribute name="symbol" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
</xs:complexType>
<xs:complexType name="circle">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="radius" type="tns:nonNegativeFloat" use="required" />
<xs:attribute name="scale-radius" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="fill" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
</xs:complexType>
<xs:complexType name="line">
<xs:attribute name="cat" type="xs:string" use="optional" />
<!-- style: TODO only in style-line-->
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<!-- inherited style -->
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="width" default="0" type="xs:float" use="optional" />
<!-- minimum scaled width to draw outline -->
<xs:attribute name="min" default="0" type="xs:float" use="optional" />
<xs:attribute name="dasharray" type="tns:strokeDasharray" use="optional" />
<xs:attribute name="cap" default="round" type="tns:cap" use="optional" />
<xs:attribute name="outline" default="" type="xs:string" use="optional" />
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
<xs:attribute name="blur" default="-1" type="xs:float" use="optional" />
<xs:attribute name="fix" default="false" type="xs:boolean" use="optional" />
<!-- stipple repeat in 'pixel' -->
<xs:attribute name="stipple" default="0" type="xs:integer" use="optional" />
<!-- stipple color -->
<xs:attribute name="stipple-stroke" default="#000000" type="tns:color" use="optional" />
<!-- stipple width relative to line width, i.e 0.0-1.0 -->
<xs:attribute name="stipple-width" default="0" type="xs:float" use="optional" />
</xs:complexType>
<!--<xs:complexType name="outline">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="name" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
</xs:complexType>-->
<xs:complexType name="lineSymbol">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="required" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
<xs:attribute name="align-center" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="text">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="k" default="name" type="tns:textKey" use="optional" />
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
<xs:attribute name="caption" default="false" type="xs:boolean" use="optional" />
<!-- polygon area expressed as a ratio to tile area, e.g. 0.1 for 10% of tile area -->
<xs:attribute name="area-size" default="0" type="tns:nonNegativeFloat" use="optional" />
<!-- priority for label placement, 0 = highest priority -->
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
</xs:complexType>
<xs:complexType name="symbol">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="required" />
<xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
<xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
</xs:complexType>
<xs:complexType name="extrusion">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="line-color" type="tns:color" use="optional" />
<xs:attribute name="side-color" type="tns:color" use="required" />
<xs:attribute name="top-color" type="tns:color" use="required" />
</xs:complexType>
<!-- match elements -->
<xs:complexType name="m">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<!-- recursion to allow for nested m -->
<xs:element name="m" type="tns:m" />
<xs:element name="area" type="tns:area" />
<xs:element name="caption" type="tns:caption" />
<xs:element name="circle" type="tns:circle" />
<xs:element name="line" type="tns:line" />
<xs:element name="outline" type="tns:line" />
<xs:element name="lineSymbol" type="tns:lineSymbol" />
<xs:element name="text" type="tns:text" />
<xs:element name="extrusion" type="tns:extrusion" />
<xs:element name="symbol" type="tns:symbol" />
<!-- outline is defined within rules to match layering -->
<xs:element name="outline-layer" type="tns:line" />
</xs:choice>
<xs:attribute name="select" default="any" type="tns:selectorList" use="optional" />
<xs:attribute name="e" type="tns:elementList" use="optional" />
<xs:attribute name="k" type="xs:string" use="optional" />
<xs:attribute name="v" type="xs:string" use="optional" />
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="closed" default="any" type="tns:closed" use="optional" />
<xs:attribute name="zoom-min" default="0" type="xs:unsignedByte" use="optional" />
<xs:attribute name="zoom-max" default="127" type="xs:unsignedByte" use="optional" />
</xs:complexType>
<xs:complexType name="atlasRect">
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="pos" type="xs:string" use="required" />
</xs:complexType>
<xs:complexType name="atlas">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="rect" type="tns:atlasRect" />
</xs:choice>
<xs:attribute name="img" type="xs:string" use="required" />
</xs:complexType>
<!-- stylemenu element -->
<xs:complexType name="stylemenu">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="layer" maxOccurs="unbounded" minOccurs="0" type="tns:layer" />
</xs:sequence>
<xs:attribute name="defaultvalue" type="xs:string" use="required" />
<xs:attribute name="defaultlang" type="xs:string" use="required" />
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- rendertheme element -->
<xs:complexType name="rendertheme">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="stylemenu" maxOccurs="1" minOccurs="0" type="tns:stylemenu" />
<!-- style definitions -->
<xs:sequence maxOccurs="256" minOccurs="0">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="style-text" type="tns:text" />
<xs:element name="style-area" type="tns:area" />
<xs:element name="style-line" type="tns:line" />
<!-- <xs:element name="style-outline" type="tns:line" /> -->
</xs:choice>
</xs:sequence>
<xs:choice maxOccurs="1" minOccurs="0">
<xs:element name="atlas" type="tns:atlas" />
</xs:choice>
<!-- matching rules -->
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="m" type="tns:m" />
</xs:sequence>
</xs:sequence>
<xs:attribute name="version" type="xs:positiveInteger" use="required" />
<xs:attribute name="map-background" default="#ffffff" type="tns:color" use="optional" />
<xs:attribute name="base-stroke-width" default="1" type="tns:nonNegativeFloat"
use="optional" />
<xs:attribute name="base-text-scale" default="1" type="tns:nonNegativeFloat"
use="optional" />
</xs:complexType>
<!-- root element -->
<xs:element name="rendertheme" type="tns:rendertheme" />
</xs:schema>

19
settings.gradle Normal file
View File

@@ -0,0 +1,19 @@
rootProject.name = 'vtm-parent'
include ':vtm'
include ':vtm-http'
include ':vtm-jts'
include ':vtm-tests'
include ':vtm-extras'
include ':vtm-android'
include ':vtm-android-example'
include ':vtm-themes'
include ':vtm-gdx'
include ':vtm-desktop'
include ':vtm-android-gdx'
include ':vtm-web'
include ':vtm-web-app'
//include ':vtm-web-js'
include ':vtm-jeo'
include ':vtm-playground'
include ':vtm-ios'
include ':vtm-app'

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="assets"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/vtm-android"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/vtm"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View File

@@ -1,2 +0,0 @@
bin/*
gen/*

View File

@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>vtm-android-example</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>assets</name>
<type>2</type>
<location>/home/src/vtm/OpenScienceMap/vtm/assets</location>
</link>
</linkedResources>
</projectDescription>

View File

@@ -1,16 +0,0 @@
activeContentFilterList=*.makefile,makefile,*.Makefile,Makefile,Makefile.*,*.mk,MANIFEST.MF
addNewLine=true
convertActionOnSaave=AnyEdit.CnvrtTabToSpaces
eclipse.preferences.version=1
ignoreBlankLinesWhenTrimming=false
inActiveContentFilterList=
javaTabWidthForJava=true
org.eclipse.jdt.ui.editor.tab.width=2
projectPropsEnabled=true
removeTrailingSpaces=true
replaceAllSpaces=false
replaceAllTabs=false
saveAndAddLine=false
saveAndConvert=false
saveAndTrim=true
useModulo4Tabs=false

View File

@@ -1,3 +0,0 @@
#Sat Dec 17 10:00:00 CET 2011
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -1,3 +0,0 @@
#Sat Dec 17 10:00:00 CET 2011
eclipse.preferences.version=1
line.separator=\n

View File

@@ -1,376 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=warning
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=false
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=false
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=false
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=false
org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=100
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
org.eclipse.jdt.core.formatter.tabulation.char=tab
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

Some files were not shown because too many files have changed in this diff Show More