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="ImageTarget"/> class.
 /// </summary>
 /// <param name="trackable">The trackable.</param>
 internal ImageTarget(QCAR_Trackable trackable)
     : base(trackable)
 {
     this.ImageTargetType = ImageTargetType.PREDEFINED;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Trackable"/> class.
 /// </summary>
 /// <param name="trackable">The trackable.</param>
 internal Trackable(QCAR_Trackable trackable)
 {
     this.Id   = trackable.Id;
     this.Name = trackable.TrackName;
 }
        /*
         * /// <summary>
         * /// Returns the size-scaled origin of the VuMark
         * /// </summary>
         * Vector2 Origin
         * {
         *  get;
         * }
         *
         * /// <summary>
         * /// Sets or gets whether the VuMark has a changing background per instance, signaling
         * /// to SDK how to track it.
         * /// </summary>
         * /// Setting TrackingFromRuntimeAppearance to true indicates that the SDK
         * /// should track this type of VuMark based on what is seen by the camera and
         * /// not assume the template background image is useful for tracking because
         * /// the background can change per instance.
         * /// Setting TrackingFromRuntimeAppearance to false indicates that the SDK
         * /// should track this type of VuMark based on VuMark Template used to create
         * /// the dataset. This is the default behavior.
         * bool TrackingFromRuntimeAppearance
         * {
         *  get;
         *  set;
         * }
         *
         * /// <summary>
         * /// Gets the user data associated with this template that comes from
         * /// the dataset.  If there is no VuMark use data associated with this
         * /// template, an empty string is returned.
         * /// </summary>
         * string VuMarkUserData
         * {
         *  get;
         * }
         */

        /// <summary>
        /// Initializes a new instance of the <see cref="VuMarkTarget"/> class.
        /// </summary>
        /// <param name="trackable">The trackable</param>
        internal VuMarkTarget(QCAR_Trackable trackable)
            : base(trackable)
        {
        }