当前位置: 首页>>代码示例>>C++>>正文


C++ Kinect::getDeviceOptions方法代码示例

本文整理汇总了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;
}
开发者ID:NickHolder,项目名称:OpenFlKinect,代码行数:48,代码来源:ExternalInterface.cpp

示例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);
}
开发者ID:NickHolder,项目名称:OpenFlKinect,代码行数:21,代码来源:ExternalInterface.cpp


注:本文中的Kinect::getDeviceOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。