// 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(); }
internal void SetElevationMode(Prop prop, ElevationMode elevationMode) { if (!m_propIdToObject.ContainsKey(prop.Id)) { return; } NativePropsApi_SetElevationMode(NativePluginRunner.API, prop.Id, (int)elevationMode); }
public void SetPositionerElevationMode(Positioner positioner, ElevationMode elevationMode) { if (!m_positionerIdToObject.ContainsKey(positioner.Id)) { return; } NativePositionerApi_SetElevationMode(NativePluginRunner.API, positioner.Id, elevationMode); }
// Use Api.Instance.PositionerApi.CreatePositioner for public construction internal Positioner( PositionerApiInternal positionerApiInternal, int id, ElevationMode elevationMode) { if (positionerApiInternal == null) { throw new ArgumentNullException("positionerApiInternal"); } if (id == InvalidId) { throw new ArgumentException("invalid id"); } m_positionerApiInternal = positionerApiInternal; Id = id; m_elevationMode = elevationMode; }
/// <summary> /// Set the ElevationMode of this Positioner. See the ElevationMode documentation for more details. /// </summary> /// <param name="elevationMode">The desired ElevationMode of this positioner.</param> public void SetElevationMode(ElevationMode elevationMode) { m_positionerApiInternal.SetPositionerElevationMode(this, elevationMode); m_elevationMode = elevationMode; }
/// <summary> /// Set the desired ElevationMode of this transform. See the ElevationMode documentation for details. /// </summary> /// <param name="elevationMode">The desired ElevationMode of the transform.</param> public void SetElevationMode(ElevationMode elevationMode) { m_positioner.SetElevationMode(elevationMode); }
/// <summary> /// Sets the elevation for the Prop, relative to sea-level. /// </summary> /// <param name="elevation">The elevation, in meters.</param> /// <returns>This PropOptions instance, with the elevation set.</returns> public PropOptions ElevationAboveSeaLevel(double elevation) { m_elevation = elevation; m_elevationMode = ElevationMode.HeightAboveSeaLevel; return(this); }
/// <summary> /// Sets the elevation for the Prop, relative to the altitude of the terrain at the Prop's LatLong coordinate. /// </summary> /// <param name="elevation">The elevation, in meters.</param> /// <returns>This PropOptions instance, with the elevation set.</returns> public PropOptions ElevationAboveGround(double elevation) { m_elevation = elevation; m_elevationMode = ElevationMode.HeightAboveGround; return(this); }
private static extern bool NativePositionerApi_SetElevationMode(IntPtr ptr, int positionerId, ElevationMode elevationMode);
/// <summary> /// Set the ElevationMode of this Prop. See the ElevationMode documentation for more details. /// </summary> /// <param name="elevationMode">The ElevationMode of this prop.</param> public void SetElevationMode(ElevationMode elevationMode) { m_propsApiInternal.SetElevationMode(this, elevationMode); m_elevationMode = elevationMode; }