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 12-15-2008, 10:26 AM   #1
zidia
Junior Member
 
Join Date: Nov 2008
Posts: 8
zidia is on a distinguished road
Default How to calculate the visibility of a SurfaceImage

I'm showing a SurfaceImage on the ground of WW that is changing continuosly. I want to calculate in some way how much this image is visible or how much i'm close to the image. Precisly, but I think it's so difficoult to calculate, the percentuage of the visible ground that this image occupies.
I want to stop changing the image if it is not more visible or partialy visible.

I'm working at the Layer level, so I can manage the DrawingContext.

Thanks
zidia is offline   Reply With Quote
Old 12-16-2008, 03:47 AM   #2
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

What you can try is to compute the bounding cylinder extent of your image (globe.computeBoundingCylindert(sector)) . Then, before rendering, you can test for the extent.intersect(dc.getView().getFrustum InModelCoordinates()).
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 12-22-2008, 08:28 AM   #3
zidia
Junior Member
 
Join Date: Nov 2008
Posts: 8
zidia is on a distinguished road
Default

Thank you for the replay. The solution tha you gave me is only for one problem that I had.

The second one is that I want to increase the quality of the image if i'm closer to it. The DrawContext.getVisibleSertor() gives me an approximated sector so I cannot be precise calculating the ratio between the size of the visible and image sectors.
Is there a way to calculate how much of visible terrain an image occupies?


Thanks
zidia is offline   Reply With Quote
Old 12-22-2008, 11:21 AM   #4
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Tiled image layers do handle the eye proximity to image tiles so as to split them when getting close enough and increase their resolution. Have a look at layers.TiledImageLayer.needToSplit(DrawC ontext, Sector).
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Reply

Tags
percentuage, surfaceimage, visibility


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
Elevated SurfaceImage with Sector.FULL_SPHERE (Global Clouds) lembas Development Help 13 02-07-2012 09:07 AM
Large SurfaceImage eenglund Development Help 11 07-04-2008 12:03 AM
SurfaceImage reloaded... asantiago Development Help 0 11-26-2007 11:24 PM
Movable SurfaceImage asantiago Development Help 0 11-21-2007 08:38 PM
Updated SurfaceImage asantiago Development Help 3 11-20-2007 10:33 PM


All times are GMT +1. The time now is 10:11 PM.


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