public Prop CreateProp(PropOptions positionerOptions)
        {
            var createParamsInterop = new PropCreateParamsInterop
            {
                Name             = positionerOptions.GetName(),
                GeometryId       = positionerOptions.GetGeometryId(),
                ElevationMode    = positionerOptions.GetElevationMode(),
                HeadingDegrees   = positionerOptions.GetHeadingDegrees(),
                LatitudeDegrees  = positionerOptions.GetLatitudeDegrees(),
                LongitudeDegrees = positionerOptions.GetLongitudeDegrees(),
                Elevation        = positionerOptions.GetElevation(),
                IndoorMapId      = positionerOptions.GetIndoorMapId(),
                IndoorMapFloorId = positionerOptions.GetIndoorMapFloorId()
            };

            var propId = NativePropsApi_CreateProp(NativePluginRunner.API, ref createParamsInterop);

            var positioner = new Prop(
                this,
                propId,
                positionerOptions);

            m_propIdToObject.Add(propId, positioner);

            return(positioner);
        }
示例#2
0
        // Use Api.Instance.PropApi.CreateProp for public construction
        internal Prop(
            PropsApiInternal propsApiInternal,
            int id,
            PropOptions options)
        {
            if (propsApiInternal == null)
            {
                throw new ArgumentNullException("propsApiInternal");
            }

            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            if (id == InvalidId)
            {
                throw new ArgumentException("invalid id");
            }

            m_propsApiInternal = propsApiInternal;
            Id = id;
            m_elevationMode = options.GetElevationMode();
            m_position.SetLatitude(options.GetLatitudeDegrees());
            m_position.SetLongitude(options.GetLongitudeDegrees());
            m_elevation        = options.GetElevation();
            m_indoorMapId      = options.GetIndoorMapId();
            m_indoorMapFloorId = options.GetIndoorMapFloorId();
            m_name             = options.GetName();
            m_geometryId       = options.GetGeometryId();
            m_headingDegrees   = options.GetHeadingDegrees();
        }
示例#3
0
 /// <summary>
 /// Creates an instance of a Prop.
 /// </summary>
 /// <param name="propOptions">The PropOptions object which defines creation parameters for this Prop.</param>
 public Prop CreateProp(PropOptions propOptions)
 {
     return(m_apiInternal.CreateProp(propOptions));
 }