Sherman,

 

I don't know the answer to the 2nd question, but as to 'what should trigger
the fade-in, fade-out?': in addition to altitude, you may want to consider
using the 'is the camera close-enough to being right overhead?' criteria.
You can answer this question by doing a dot product of the camera and city
position vectors w.r.t. center of Earth.  Normalize the position vectors to
get unit vectors, then x = v1.dot(v2), then if x == 1, camera is right over,
if x == 0, camera is 'perpendicular' (i.e. right on the horizon for observer
on a city roof if far enough away (like a star)).  So maybe x = 0.9 is a
reasonable threshold.

 

-Yegor

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sherman wilcox
Sent: Saturday, January 27, 2007 4:27 PM
To: osg users
Subject: [osg-users] text on an ellipsoid model

 

I have an OSG app that can display city names @ a given lat/lon on an
ellipsoid model of the earth created with osgdem. I want to extend this a
bit in two ways. First, I want to control when a given city pops up into
view. Second I want to fade the text in when that threshold has been
reached. 

First question: How do I trigger text to show or hide? I've considered using
the camera altitude above the earth as the reference point and fade a given
city name in when the camera reaches this altitude. Sound reasonable? 
Second question: How do I fade the text in? Do I use a node callback?

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to