WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   view in view (https://forum.worldviz.com/showthread.php?t=6035)

mms 07-04-2017 03:18 AM

view in view
 
Hi all,
I would like to program an augmented reality HUD. I added an object, e.g. an arrow, to my world, but I want it to be only visible, if it is in a specific area of my view. My idea is to add this "ar" objects to an other scene and show this scene in a specific area in my view. I tried this with a subwindow, but i couldn't set the view of the subwindow to show the exact same view like the area that is covered by the subwindow. Is there perhaps an other way to solve this issue?

Thanks in advance.

Jeff 07-05-2017 02:13 AM

Can you explain further what you mean by a 'specific area of the view'?

mms 07-05-2017 07:11 AM

I think about a rectangle with normalized size [0.2,0.2] and its centre in the middle of the view. The “ar” object should be visible if it is inside this rectangle, otherwise it should be invisible.

Jeff 07-05-2017 10:39 PM

Use the window.pickRect command to determine which objects are within a rectangular area of the window. Then turn the object's visibility on or off.

mms 07-06-2017 01:47 AM

Thank you for your help. Unfortunately, I forgot to note that I want to use this augmented reality HUD in a “Cave Manual Configuration”. Could I use world coordinates to set the position of this rectangle? I want this rectangle to move if the “headtracker” detects movement. So, if I turn my head it should be able to move in the world and thereby be always in the middle of my view (via glasses). I did this already with objects and texquads.

Jeff 07-09-2017 04:17 AM

You could try calculating the intersection point on the screen where the user is looking based on their position and orientation and the screen placement. Normalize the coordinates of the intersection point that is in meters using the screen dimensions. Then calculate the rectangle bounds from the normalized results and pass that to the pickRect command.

mms 07-19-2017 02:37 AM

The window.pickRect command will return all nodes that either fully or partially appear within the area, but I only want the nodes that are fully within this area. Is there a command for this issue?


All times are GMT -7. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC