Ejemplo n.º 1
0
 /// <summary>
 /// Calculates the virtual-world location based on an offset from the users location.
 /// </summary>
 /// <param name="settings">
 /// The settings used to perform the calculation.
 /// </param>
 /// <param name="item">
 /// The item to calculate and update.
 /// </param>
 static public void WorldFromRelativeLocation(ItemCalculationSettings settings, ARItem item)
 {
     // For now just update WorldLocation to be
     // the same as RelativeLocation. When 3D is
     // added we'll need to take into account the
     // users current location in 3D space.
     item.WorldLocation = item.RelativeLocation;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Calculates the virtual-world location based on the distance between the user and the geo location.
        /// </summary>
        /// <param name="settings">
        /// The settings used to perform the calculation.
        /// </param>
        /// <param name="item">
        /// The item to calculate and update.
        /// </param>
        static public void WorldFromGeoLocation(ItemCalculationSettings settings, ARItem item)
        {
            // NOTE: Right now we don't support 3D rendering in XNA and right now
            // ARDisplay assumes that the user is always standing at location 0,0,0.
            // When we add 3D rendering we will need to allow our position in 3D space
            // to change, which will cause the calculations below to change as well.

            item.WorldLocation = ARHelper.DistanceTo3D(settings.View.Location, item.GeoLocation);
        }