Example #1
0
 // Use this for initialization
 void Start()
 {
     HandPool = GetComponent <HandPool>();
     disableAllGroups();
     CurrentGroup = 7;                    // 连接 Local 手模型
     HandPool.ToggleGroup(GroupNames[6]); // 连接 Remote 手模型
     HandPool.ToggleGroup(GroupNames[8]); // 连接 物理 手模型
 }
Example #2
0
 public HandProxy(HandPool parent, Hand hand, Chirality repChirality, ModelType repType) :
   base(hand.Id, hand, repChirality, repType)
 {
   this.parent = parent;
   this.RepChirality = repChirality;
   this.RepType = repType;
   this.MostRecentHand = hand;
 }
    public HandProxy(HandPool parent, IHandModel handModel, Hand hand) :
      base(hand.Id)
    {
      this.parent = parent;
      this.handModel = handModel;

      // Check to see if the hand model has been initialized yet
      if (handModel.GetLeapHand() == null) {
        handModel.SetLeapHand(hand);
        handModel.InitHand();
      } else {
        handModel.SetLeapHand(hand);
      }
      handModel.BeginHand();
    }
        private void checkWithinHandPoolParent()
        {
            bool plural = targets.Length > 1;
            bool anyWithinHandPool;

            HandPool handPool = FindObjectOfType <HandPool>();

            if (handPool == null)
            {
                return;
            }

            anyWithinHandPool = targets.Query()
                                .Any(c => c.transform.parent == handPool.modelsParent &&
                                     handPool.modelsParent != null);

            if (anyWithinHandPool)
            {
                string message = "";
                if (plural)
                {
                    message += "One or more of the currently selected controllers ";
                }
                else
                {
                    message += "The currently selected controller ";
                }

                message += "is a within the HandPool model parent. Interaction controllers, such "
                           + "as InteractionHands, are not HandModels and are not spawned by the "
                           + "HandPool. InteractionHands and all Interaction controllers should "
                           + "be childed to the Interaction Manager.";

                EditorGUILayout.HelpBox(message, MessageType.Error);
            }
        }
 // Use this for initialization
 void Start()
 {
     HandPool = GetComponent <HandPool>();
     disableAllGroups();
     CurrentGroup = 0;
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     HandPool = GetComponent <HandPool>();
     //HandPool.SetGroup("PhyHand");
     //disableAllGroups();
 }
Example #7
0
 // Use this for initialization
 void Start()
 {
     //_handspool1Renderer = HandController1.GetComponent<Renderer>();
     _handpool1 = HandController1.GetComponent <HandPool>();
     _handpool2 = HandController2.GetComponent <HandPool>();
 }