By eggie5
on Wed, 06/20/2012 - 17:04
I am doing a simple exercise w/ the AR SDK. Similar how the buttons are outlined w/ a square draw on the screen in the VirtualButtons example, I would like to outline a target w/ opengl.
For example: A target is found - then around it's border draw a line.
What would be the process to do this. Right now I have the target pose:
const QCAR::Trackable* trackable = state.getActiveTrackable(tIdx);
QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose());
What do I do from here? I've just tried drawing w/ that matrix but it just draws weird lines:
glVertexAttribPointer(gvPositionHandle, 3, GL_FLOAT, GL_FALSE, 0, (const GLvoid*) &modelViewMatrix.data[0]);
glDrawArrays(GL_LINES, 0, 12);
How can I outline the target area w/ a line?
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
Re: Outline target area w/ line
My question is in the scope
My question is in the scope of the Unity extension. I'm on Unity 5.4.
How can I get the array of points in the camera frame coordinates that bounds the tracked image target? With that, I could draw the outline of the target on the video background texture.