本文整理汇总了C++中Kinect::getDeviceOptions方法的典型用法代码示例。如果您正苦于以下问题:C++ Kinect::getDeviceOptions方法的具体用法?C++ Kinect::getDeviceOptions怎么用?C++ Kinect::getDeviceOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kinect
的用法示例。
在下文中一共展示了Kinect::getDeviceOptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: openflkinect_init
static value openflkinect_init(value in)
{
value v;
v = alloc_abstract(k_Kinect, new Kinect());
Kinect* k = static_cast<Kinect*>(val_data(v));
DeviceOptions& opts = k->getDeviceOptions();
opts.deviceId = val_string(val_field(in, val_id("deviceId")));
opts.deviceIndex = val_int(val_field(in, val_id("deviceIndex;")));
opts.depthEnabled = val_bool(val_field(in, val_id("depthEnabled")));
opts.colorEnabled = val_bool(val_field(in, val_id("colorEnabled")));
opts.irEnabled = val_bool(val_field(in, val_id("irEnabled")));
opts.skeletonTrackingEnabled =
val_bool(val_field(in, val_id("skeletonTrackingEnabled")));
opts.interactionEnabled = val_bool(val_field(in, val_id("interactionEnabled")));
cout << opts.interactionEnabled << endl;
opts.depthResolution =
opts.getResolution(val_string(val_field(in, val_id("depthResolution"))));
opts.depthSize = opts.Vec2fromHaxePoint(in, "depthSize");
opts.colorResolution =
opts.getResolution(val_string(
val_field(in, val_id("colorResolution"))));
opts.colorSize = opts.Vec2fromHaxePoint(in, "colorSize");
opts.irResolution =
opts.getResolution(val_string(
val_field(in, val_id("irResolution"))));
opts.irSize = opts.Vec2fromHaxePoint(in, "irSize");
opts.nearModeEnabled = val_bool(val_field(in, val_id("nearModeEnabled")));
opts.seatedModeEnabled = val_bool(val_field(in, val_id("seatedModeEnabled")));
opts.userTrackingEnabled = val_bool(val_field(in, val_id("userTrackingEnabled")));
opts.extendedModeEnabled = val_bool(val_field(in, val_id("extendedModeEnabled")));
opts.mapColorToDepth = val_bool(val_field(in, val_id("mapColorToDepth")));
opts.binaryMode = val_bool(val_field(in, val_id("binaryMode")));
opts.userColor = val_bool(val_field(in, val_id("userColor")));
opts.removeBackground = val_bool(val_field(in, val_id("removeBackground")));
opts.inverted = val_bool(val_field(in, val_id("inverted")));
opts.flipped = val_bool(val_field(in, val_id("flipped")));
opts.transform = opts.getTransform(val_string(val_field(in,
val_id("transform"))));
return v;
}
示例2: openflkinect_update_depth_pixels
static value openflkinect_update_depth_pixels(value ref, value depthArray)
{
val_check_kind(ref, k_Kinect);
Kinect* k = static_cast<Kinect*>(val_data(ref));
int* ints = val_array_int(depthArray);
if ( ! ints )
{
return alloc_bool(false);
}
if ( k->isCapturing() == false )
{
return alloc_bool(false);
}
int* depth = k->depthPixels();
int dims = k->getDeviceOptions().numDepthPixels();
memcpy(ints, depth, dims*sizeof(int));
return alloc_bool(true);
}