示例#1
0
        // +---------------------------------------------------------------------------+
        //  Animation Utilities
        // +---------------------------------------------------------------------------+

        private static void AnimateScale(Node node, long duration, Vector targetScale,
                                         AnimationTimingFunction fcn, Thread thread)
        {
            AnimationTransaction.Begin();
            AnimationTransaction.SetAnimationDuration(duration);
            AnimationTransaction.SetTimingFunction(fcn);
            node.SetScale(targetScale);
            if (thread != null)
            {
                AnimationTransaction.SetListener(new AnimationTransactionListener(thread));
            }

            AnimationTransaction.Commit();
        }
示例#2
0
        public void OnAnchorFound(ARAnchor p0, ARNode p1)
        {
            var anchorId = p0.AnchorId;

            if (!mTargetedNodesMap.ContainsKey(anchorId))
            {
                return;
            }

            var imageTargetNode = mTargetedNodesMap[anchorId].Value;
            var rot             = new Vector(0, p0.Rotation.Y, 0);

            imageTargetNode.SetPosition(p0.Position);
            imageTargetNode.SetRotation(rot);
            imageTargetNode.Visible = true;
            AnimateCarVisible(mCarModelNode);

            // Stop the node from moving in place once found
            var imgTarget = mTargetedNodesMap[anchorId].Key;

            mScene.RemoveARImageTarget(imgTarget);
            mTargetedNodesMap.Remove(anchorId);
        }
示例#3
0
 private CarModel(string carSrc, Vector pickerColorSrc)
 {
     DiffuseSource       = carSrc;
     UiPickerColorSource = pickerColorSrc;
 }
示例#4
0
 public void OnAmbientLightUpdate(float p0, Vector p1)
 {
 }