|06-29-2012, 06:12 PM||#1|
Join Date: Jun 2012
can't get setNearClipDistance to work right
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.
-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,
Tom from Austria
|07-26-2012, 02:32 PM||#2|
Join Date: Jun 2012
overriding computeNearClipDistance() in a subclass of BasicFlyView does it right:
protected double computeNearClipDistance()
Flickering is avoided by a Timer-Thread, which is redrawing the WorldWindow only every 50ms (on my Win7-PC, QuadCore 3GHZ, 8GM RAM)
|clipping, layer, renderable|
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|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|