Exemplo n.º 1
0
void Correspondence::draw(Viewer &viewer, double radius)
{
	// draw the edge plane
	viewer.drawEdgePlaneDetails(p,Vec3d(0,0,0),Quaternion(),radius,2,6); // color by camera ID

	// draw the 3D line
	if (l == NULL)
		return;

	viewer.drawLine(l->_a->getPosition(),l->_b->getPosition(),PINK,6); // color by camera ID

	// for debug info, draw the projection line in yellow
	double lambda;
	Vec3d m = intersectRayPlane(l->_a->getPosition(),p._normal,p._s,p._normal,lambda);
	viewer.drawLine(l->_a->getPosition(),m,YELLOW,3);
	m = intersectRayPlane(l->_b->getPosition(),p._normal,p._s,p._normal,lambda);
	viewer.drawLine(l->_b->getPosition(),m,YELLOW,3);
	double distance = p.distance(l);
}