本文整理汇总了C#中Controller.SetPolicyFlags方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.SetPolicyFlags方法的具体用法?C# Controller.SetPolicyFlags怎么用?C# Controller.SetPolicyFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller.SetPolicyFlags方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
void Start() {
leap_controller_ = new Controller();
leap_controller_.SetPolicyFlags(Controller.PolicyFlag.POLICY_IMAGES);
SetMainTextureDimensions(DEFAULT_TEXTURE_WIDTH, DEFAULT_TEXTURE_HEIGHT);
SetDistortionDimensions(DEFAULT_DISTORTION_WIDTH, DEFAULT_DISTORTION_HEIGHT);
}
示例2: Awake
void Awake() {
leap_controller_ = new Controller();
// Optimize for top-down tracking if on head mounted display.
Controller.PolicyFlag policy_flags = leap_controller_.PolicyFlags;
if (isHeadMounted)
policy_flags |= Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
else
policy_flags &= ~Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
leap_controller_.SetPolicyFlags(policy_flags);
}
示例3: Start
void Start() {
leap_controller_ = new Controller();
Controller.PolicyFlag policy_flags = leap_controller_.PolicyFlags;
if (isHeadMounted)
policy_flags |= Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
else
policy_flags &= ~Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
leap_controller_.SetPolicyFlags(policy_flags);
hand_graphics_ = new Dictionary<int, HandModel>();
hand_physics_ = new Dictionary<int, HandModel>();
tools_ = new Dictionary<int, ToolModel>();
if (leap_controller_ == null) {
Debug.LogWarning(
"Cannot connect to controller. Make sure you have Leap Motion v2.0+ installed");
}
if (enableRecordPlayback && recordingAsset != null)
recorder_.Load(recordingAsset);
}
示例4: Awake
void Awake()
{
//leapContrlPos = GameObject.Find("ControllerSandBox").transform.position;
leap_controller_ = new Controller();
// Optimize for top-down tracking if on head mounted display.
Controller.PolicyFlag policy_flags = leap_controller_.PolicyFlags;
if (isHeadMounted)
policy_flags |= Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
else
policy_flags &= ~Controller.PolicyFlag.POLICY_OPTIMIZE_HMD;
leap_controller_.SetPolicyFlags(policy_flags);
}