Changing line stippling dynamically in feature node...

classic Classic list List threaded Threaded
4 messages Options
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Changing line stippling dynamically in feature node...

Is there any way to change line stippling or enable/disable it during runtime on a feature node that's using lines?

For example, after a feature is created, I'd like to toggle between solid lines and stippled lines for the feature during rendering.

I've tried several things without success like changing the stroke style settings for stippling, calling dirty() on the feature, etc.

Any ideas on how I can implement this behavior? Is this even possible in osgEarth?

Shayne



carbus carbus
Reply | Threaded
Open this post in threaded view
|

Re: Changing line stippling dynamically in feature node...

something to try...

call AnnotationNode::setDynamic( true );

call getStyle, set your stipple in there, call setStyle which forces a build ...
2LR 2LR
Reply | Threaded
Open this post in threaded view
|

Re: Changing line stippling dynamically in feature node...

Carbus,

I'm already using "setDynamic(true)" and "getStyle(...)" but what I was missing was the call to "setStyle(..)" to force the build.

The latter did the trick. Thank you for the help!

-S
carbus carbus
Reply | Threaded
Open this post in threaded view
|

Re: Changing line stippling dynamically in feature node...

no problem