World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 04-18-2012, 03:26 PM   #1
vhoriks
Member
 
Join Date: Feb 2012
Posts: 43
vhoriks is on a distinguished road
Default Simulating a lot of moving symbols?

Hello everyone

I would like to do a test on how well WorldWind handles a lot of moving symbols. I would appreciate general pointers on how to write a piece of code to do that, or even if anyone feels tempted to write some code by themselves.
vhoriks is offline   Reply With Quote
Old 04-18-2012, 07:13 PM   #2
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,621
nlneilson is on a distinguished road
Default

Well it's not the code but the concept that may help you the most.

I recorded a GPS track in my car.
Then with a python script 50 tracks offsetting the original as to position and altitude.

http://www.nlneilson.com/wwposts/50_tracks.jpg
This is being updated every second.

I just use points but you can try symbols to see how fast CPU goes up.
I use C++ for sorting and heavy lifting and use a socket to communicate with the Java WWJ for display.

The code is proprietary.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Old 04-19-2012, 05:33 PM   #3
tag
WWJ Technical Manager
 
Join Date: May 2007
Location: Seattle
Posts: 1,031
tag is on a distinguished road
Default

Modify one of the programs in the performance package to continually update the shapes. Or easier yet, just run one of those programs, bring up the WW dashboard (Ctl+Alt+Shift+left-click) check the box labelled "Run Continuously" and look at the statistics in the Performance panel.
tag is offline   Reply With Quote
Old 05-04-2012, 02:16 PM   #4
vhoriks
Member
 
Join Date: Feb 2012
Posts: 43
vhoriks is on a distinguished road
Default

Here's some follow up.

I took the 'PointPlacemarksEverywhere' example from the package 'performance' and modified it a bit. The resulting code is available here: http://pastebin.com/47qt1Vdz

It's really enough to just insert placemarks to test worldwind's performance, but if the boss wants moving symbols he's gonna get moving symbols.

Some input regarding this code would be much appreciated. Is there anything that can be done better? One thing I've thought about is the actual graphic (the pushpin) used, maybe it could be replaced with a more basic symbol, like just a dot or a cross?
vhoriks is offline   Reply With Quote
Old 05-04-2012, 02:47 PM   #5
heidtmare
Senior Member
 
heidtmare's Avatar
 
Join Date: Feb 2008
Location: Melbourne, FL, USA
Posts: 675
heidtmare is on a distinguished road
Default

u could use setUsePointAsDefaultImage(true)

http://builds.worldwind.arc.nasa.gov...Image(boolean)
heidtmare is offline   Reply With Quote
Old 05-07-2012, 07:15 AM   #6
vhoriks
Member
 
Join Date: Feb 2012
Posts: 43
vhoriks is on a distinguished road
Default

Quote:
u could use setUsePointAsDefaultImage(true)

http://builds.worldwind.arc.nasa.gov...Image(boolean)
Thanks for your advice heidtmare, you were correct, changing the rendered graphic indeed caused a change in performance. Rendering 50000 pushpin graphics resulted in an fps of 3, 50000 plain white dots gave an fps of 5.

Hm, as a sidenote I observed something that's seemingly in conflict with the documentation. The documentation says this regarding the attribute usePointAsDefaultImage in PointPlacemarkAttributes.
Quote:
setUsePointAsDefaultImage
public void setUsePointAsDefaultImage(boolean usePointAsDefaultImage)Specifies whether to draw a point when the current source image is null. When drawing the point, the scale of the currently active attributes specifies the diameter of the point in pixels. The point is drawn in the line color of the currently active attributes.

Parameters:
usePointAsDefaultImage - true to draw a point when the current source image is null, otherwise false.
I changed the default value of this boolean in the code for the class, from false to true. Regardless of the value of DEFAULT_IMAGE_PATH the rendered graphics became a dot, even though default image path wasn't null. Perhaps I misunderstand the meaning of "current source image" but my assumption was that it's the same as DEFAULT_IMAGE_PATH in this situation.
vhoriks is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Fonts as symbols in one Renderable Object nbellsp Development Help 3 10-18-2011 08:14 PM
VPF Reader - How to get lines, areas symbols ? Ben35 Development Help 0 07-05-2011 04:47 PM
Hanging the system while moving the annotations satish Developers' Corner 3 05-11-2009 01:36 PM
Signalling when the globe stops moving globe.trotter Development Help 4 03-07-2008 06:52 PM


All times are GMT +1. The time now is 04:00 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.