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:08 PM   #1
Unregistered
Guest
 
Posts: n/a
Default [Solved] Draw a Sector on the WorldWindowGLJPanel

Hi all,

I would like to know how it is possible to draw borders of a Sector (gov.nasa.worldwind.geom.Sector) on a WorldWindowGLJPanel?

I have created a Sector like that:
Sector sector = new Sector(minlat, maxlat, minlon, maxlon);
with minlat, maxlat, minlon, maxlon --> Angle.

Then I tried to create a SurfaceSector (gov.nasa.worldwind.render.SurfaceSector ) like that:
SurfaceSector ssector = new SurfaceSector(sdta.get_sector(), Color.red, Color.blue);

but I didn't find any methods to draw my sector (especially borders) on my WorldWindowGLJPanel.

Have you got any idea?
Thanks a lot!

Last edited by patmurris; 12-16-2008 at 06:45 AM. Reason: Solved
  Reply With Quote
Old 12-15-2008, 11:00 PM   #2
remleduff
Senior Member
 
Join Date: Jun 2007
Posts: 218
remleduff is on a distinguished road
Default

Take a look at RenderableLayer. SurfaceSector implements the Renderable interface, it's the main class you should start playing with.
Code:
WorldWindow worldWindow = yourWorldWindowGLJpanel;
Renderable renderable = yourSurfaceSector;

RenderableLayer layer = new RenderableLayer();
layer.addRenderable(renderable);
worldWindow.getModel().getLayerList().add(layer);
Also, take a look at the examples in gov.nasa.worldwind.examples.

Last edited by remleduff; 12-16-2008 at 03:06 PM.
remleduff is offline   Reply With Quote
Reply

Tags
draw, paint, sector, surfacesector, worldwindowgljpanel


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
Using WorldWindowGLJPanel (lightweight) wherisat Development Help 0 07-14-2008 07:41 PM
Draw Points eenglund Development Help 2 07-03-2008 12:38 AM
how can I draw contour in WW? findsnow Development Help 5 06-05-2008 10:58 PM
WorldWindowGLJPanel and GlobeAnnotation shawngano Development Help 2 12-15-2007 07:42 PM
About WorldWindowGLJPanel asantiago Development Help 6 11-06-2007 06:55 PM


All times are GMT +1. The time now is 07:14 PM.


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