PDA

View Full Version : Callback if object has been seen


mbustamante
06-04-2013, 11:16 AM
Hi,

I want to be able to fire some actions when the viewpoint "sees" an object. I mean, i make an object and when enters into the viewpoint, i display a text.

I've only seen ways to do it when the viewpoint collides with an object, or the user picks it.

is it possible to do it ? Could you lead me to some reference i could work on. I read "Viewpoints & Windows" with no help

thanks

Frank Verberne
06-05-2013, 07:02 AM
The only way I can think of, is to create thin walls at the edges of the viewpoint (and just out of view, or invisible), update these walls with the mainview, and check for collisions with these walls.

JvdBosch
06-07-2013, 07:06 AM
Try viz.MainWindow.isCulled(node) to check if it is in the visible range or not. It will however not check if if is occluded or not.