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 06-29-2012, 06:12 PM   #1
tomhab
Junior Member
 
Join Date: Jun 2012
Posts: 4
tomhab is on a distinguished road
Question can't get setNearClipDistance to work right

Hi!

I have a big problem concerning a project in WWJ I'm doing at my university.

I drew Polygons onto a RenderableLayer. These are triangles with a transparent interior, symbolizing small airborne objects (see picture).

The problem is, when zooming from exactly above and if the eye position is too near these shapes dissapear although they're being well underneath the eye position. (Example: Shape at altitude 1800m dissapears when eye position falls below 2900m).

However, following the hints in this forum, I derived from BasicFlyView and got access to the protected method setNearClipDistance(Double d).

Calling setNearClipDistance(2.0) only once didn't work, so in my desperation I purposely call it in a Thread continously. To my suprise, this malpractice works not too bad: zooming the Shape to the maximum possible extent is now possible. But as expected, sychronization problems cause the Shape to flicker once in a while.

My questions:
-In which class of WWJ should I modify to keep the internal value of the near clipping distance at 2.0, without having the need of re-setting it everytime?

-Could I avoid flickering doing so? (If not, how?)


I know, I could use the underlying JOGL functions to draw these shapes, but I would rather use the functionality of WWJ (class Polygon)

Looking forward to any advice,
Kind regards,
Tom from Austria
Attached Images
File Type: jpg EyeAltitude_3233m.jpg (61.9 KB, 43 views)
tomhab is offline   Reply With Quote
Old 07-26-2012, 02:32 PM   #2
tomhab
Junior Member
 
Join Date: Jun 2012
Posts: 4
tomhab is on a distinguished road
Default

solved it.

overriding computeNearClipDistance() in a subclass of BasicFlyView does it right:


@Override
protected double computeNearClipDistance()
{
return 40;
}


Flickering is avoided by a Timer-Thread, which is redrawing the WorldWindow only every 50ms (on my Win7-PC, QuadCore 3GHZ, 8GM RAM)
tomhab is offline   Reply With Quote
Reply

Tags
clipping, layer, renderable


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
Looking for Dev for 3 month Project (can work remotely) cryan Community Chat 0 02-09-2009 10:23 PM
Microsoft .net frame work error shabeer Developers' Corner 1 03-25-2008 06:52 PM
My script does't work! gdsqz2 Add-on & Script Development 2 05-22-2007 06:13 PM
Zoom Level 1 doesn't work (ger,too) Guest_Brian_* Technical Support 2 07-31-2005 02:19 PM
WW refuses to work correctly ups Technical Support 19 10-22-2004 04:57 AM


All times are GMT +1. The time now is 01:49 AM.


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