Beispiel #1
0
        /// <summary>
        /// Create a trackable based on a <see cref="QCAR_Trackable"/>.
        /// </summary>
        /// <param name="trackable">The Vuforia trackable</param>
        /// <returns>Returns a <see cref="Trackable"/>.</returns>
        internal static Trackable CreateTarget(QCAR_Trackable trackable)
        {
            Trackable result;

            switch (trackable.TargetType)
            {
            case TargetTypes.ImageTarget:
                result = new ImageTarget(trackable);
                break;

            case TargetTypes.VuMark:
                result = new VuMarkTarget(trackable);
                break;

            default:
                throw new NotImplementedException("Invalid target type");
            }

            return(result);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VuMarkTargetResult" /> class.
 /// </summary>
 /// <param name="trackableResult">The trackable result.</param>
 /// <param name="vuMarkTarget">The VuMark target.</param>
 internal VuMarkTargetResult(QCAR_TrackableResult trackableResult, VuMarkTarget vuMarkTarget)
     : base(trackableResult, vuMarkTarget)
 {
     this.Trackable = vuMarkTarget;
     this.Refresh(trackableResult);
 }