public void OnRotate(RotationGestureDetector detector)
        {
            // 回転処理
            var angle = detector.Angle;

            ImageTrackable.World.Children.FirstOrDefault()?.RotateByDegrees(angle, 0.0f, 0.0f, 1.0f);
        }
Example #2
0
        public void OnRotate(RotationGestureDetector detector)
        {
            // ノード画像が固定されている状態(トラッキング中)のみ回転を許可
            var arbiTrack = ARArbiTrack.Instance;

            if (arbiTrack.IsTracking)
            {
                var angle = detector.Angle;
                arbiTrack.World.Children.FirstOrDefault()?.RotateByDegrees(angle, 0.0f, 0.0f, 1.0f);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here

            // Activityテーマを設定
            base.SetTheme(Resource.Style.ARActivityTheme);

            // 説明文を表示
            SetContentView(Resource.Layout.OverlayView);
            var textView = FindViewById <TextView>(Resource.Id.textView1);
            var label    = GetString(Resource.String.marker_description);

            textView.SetText(label, TextView.BufferType.Normal);

            // フェードアウト処理
            Animation.FadeOut(textView);

            GestureDetect         = new GestureDetectorCompat(this, this);
            ScaleGestureDetect    = new ScaleGestureDetector(this, this);
            RotationGestureDetect = new RotationGestureDetector(this);
        }
 public void OnRotateEnd(RotationGestureDetector detector)
 {
 }
 public bool OnRotateBegin(RotationGestureDetector detector)
 {
     return(true);
 }