I'm using the C++ wrappers, so I have some class like
class Kinect360_Impl : public Freenect::FreenectDevice {
public:
Kinect360_Impl(freenect_context *_ctx, int _index)
: Freenect::FreenectDevice(_ctx, _index)
, mCtx(_ctx)
, mIndex(_index) {
setDepthFormat(FREENECT_DEPTH_MM, FREENECT_RESOLUTION_MEDIUM);
}
and could ideally emulate the loop here
|
for(item = attrlist ; item != NULL; item = item->next , index++) { |
|
if (strlen(item->camera_serial) == strlen(camera_serial) && strcmp(item->camera_serial, camera_serial) == 0) { |
|
freenect_free_device_attributes(attrlist); |
|
return freenect_open_device(ctx, dev, index); |
|
} |
|
} |
since I've stored both the index and the context, and instead of comparing strings, I'm actually just checking what index I'm at. But this is a hidden function
|
int count = fnusb_list_device_attributes(ctx, &attrlist); |
so now I would need to start re-doing that code. Is there any way to do this differently, or is this the only option?
I'm using the C++ wrappers, so I have some class like
and could ideally emulate the loop here
libfreenect/src/core.c
Lines 194 to 199 in 83e57e1
since I've stored both the index and the context, and instead of comparing strings, I'm actually just checking what index I'm at. But this is a hidden function
libfreenect/src/core.c
Line 188 in 83e57e1
so now I would need to start re-doing that code. Is there any way to do this differently, or is this the only option?