By chkuentz
on Thu, 06/06/2013 - 05:09
Hi, I would like to display my 2d texture when the target isn't in the view of the camera. This is in the UserDefinedTargets app. I just want it to display like it would on the very first frame when the program creates a new target and tracks it (perfectly parallel to the screen). The purpose is to let the user get a preview of what the projected texture is so he/she can align it before assigning it to a texture.
I have given some thought about doing this in the main thread, but I have a custon gui where I would be drawing to a view which isn't the same dimensions of the ar view. This would make it extremely difficult to calculate the initial position and size of the target in relation to the view.
Thanks!
Rendering when target not in view (UDT)
Hi, not sure I fully understand what exactly you are trying to achieve, could you explain a bit more in detail ?
Rendering when target not in view (UDT)
Well, imagine an app that utilizes the UDT sample and allows a user to augment a room in a house by placing 'virtual' furniture wherever he or she wants to.
Rendering when target not in view (UDT)
Ok, thanks for the clarifications, now I understand better ;-)
Well, what you could do is to set your modelview matrix to identity when a target is not tracked;
if you look at the C++ code, in the renderFrame() method, you can see some code like this: