Exemple #1
0
 private void CreateMissingDataSetTrackableBehaviours(DataSet dataSet)
 {
     foreach (Trackable current in dataSet.GetTrackables())
     {
         if (!this.mTrackableBehaviours.ContainsKey(current.ID))
         {
             if (current is ImageTarget)
             {
                 ImageTargetAbstractBehaviour imageTargetAbstractBehaviour = this.CreateImageTargetBehaviour((ImageTarget)current);
                 imageTargetAbstractBehaviour.CreateMissingVirtualButtonBehaviours();
                 this.mTrackableBehaviours[current.ID] = imageTargetAbstractBehaviour;
                 this.mAutomaticallyCreatedBehaviours.Add(current.ID);
             }
             else if (current is MultiTarget)
             {
                 MultiTargetAbstractBehaviour value = this.CreateMultiTargetBehaviour((MultiTarget)current);
                 this.mTrackableBehaviours[current.ID] = value;
                 this.mAutomaticallyCreatedBehaviours.Add(current.ID);
             }
             else if (current is CylinderTarget)
             {
                 CylinderTargetAbstractBehaviour value2 = this.CreateCylinderTargetBehaviour((CylinderTarget)current);
                 this.mTrackableBehaviours[current.ID] = value2;
                 this.mAutomaticallyCreatedBehaviours.Add(current.ID);
             }
             else if (current is VuMarkTemplate)
             {
                 if (!this.mVuMarkManager.ContainsVuMarkTemplate(current.ID))
                 {
                     VuMarkAbstractBehaviour behaviour = this.CreateVuMarkBehaviour((VuMarkTemplate)current);
                     this.mVuMarkManager.AddTemplateBehaviour(behaviour);
                 }
             }
             else if (current is ObjectTarget)
             {
                 DataSetTrackableBehaviour value3 = this.CreateObjectTargetBehaviour((ObjectTarget)current);
                 this.mTrackableBehaviours[current.ID] = value3;
                 this.mAutomaticallyCreatedBehaviours.Add(current.ID);
             }
         }
     }
 }
Exemple #2
0
        private CylinderTargetAbstractBehaviour CreateCylinderTargetBehaviour(CylinderTarget cylinderTarget)
        {
            GameObject gameObject = new GameObject();
            CylinderTargetAbstractBehaviour cylinderTargetAbstractBehaviour = BehaviourComponentFactory.Instance.AddCylinderTargetBehaviour(gameObject);

            Debug.Log(string.Concat(new object[]
            {
                "Creating Cylinder Target with values: \n ID:           ",
                cylinderTarget.ID,
                "\n Name:         ",
                cylinderTarget.Name,
                "\n Path:         ",
                ((CylinderTargetImpl)cylinderTarget).DataSet.Path,
                "\n Side Length:  ",
                cylinderTarget.GetSideLength(),
                "\n Top Diameter: ",
                cylinderTarget.GetTopDiameter(),
                "\n Bottom Diam.: ",
                cylinderTarget.GetBottomDiameter()
            }));
            cylinderTargetAbstractBehaviour.InitializeTarget(cylinderTarget, true);
            return(cylinderTargetAbstractBehaviour);
        }