st/prober: Add tracking factory variable tracking

This commit is contained in:
Jakob Borncrantz 2019-10-15 20:48:35 +02:00
parent d245fc33c9
commit 7239282aab

View file

@ -16,6 +16,7 @@
#include "tracking/t_tracking.h"
#endif
#include "util/u_var.h"
#include "util/u_misc.h"
#include "util/u_sink.h"
#include "p_prober.h"
@ -227,6 +228,11 @@ p_tracking_init(struct prober *p)
fact->origin.offset.position.y = 1.0f;
fact->p = p;
u_var_add_root(fact, "Tracking Factory", false);
u_var_add_vec3_f32(fact, &fact->origin.offset.position, "offset.pos");
// u_var_add_vec4_f32(fact, &fact->origin.offset.orientation,
// "offset.rot");
// Finally set us as the tracking factory.
p->base.tracking = &fact->base;
@ -242,6 +248,9 @@ p_tracking_teardown(struct prober *p)
struct p_factory *fact = p_factory(p->base.tracking);
// Remove root
u_var_remove_root(fact);
// Drop any references to objects in the node graph.
fact->xfs = NULL;
#ifdef XRT_HAVE_OPENCV