/// <summary> /// Initializes a new instance of the <see cref="ShadedRelief"/> class based on some more common /// elevation to geographic coordinate system scenarios. /// </summary> /// <param name="scenario">Scenario to use.</param> public ShadedRelief(ElevationScenario scenario) { // These scenarios just give a quick approximate calc for the elevation factor switch (scenario) { case ElevationScenario.ElevationCentimetersProjectionDegrees: _elevationFactor = 1F / (160934.4F * 69F); break; case ElevationScenario.ElevationCentimetersProjectionFeet: _elevationFactor = 0.0328084F; break; case ElevationScenario.ElevationCentimetersProjectionMeters: _elevationFactor = 1F / 100F; break; case ElevationScenario.ElevationFeetProjectionDegrees: _elevationFactor = 1F / (5280F * 69F); break; case ElevationScenario.ElevationFeetProjectionFeet: _elevationFactor = 1F; break; case ElevationScenario.ElevationFeetProjectionMeters: _elevationFactor = 1F / 3.28F; break; case ElevationScenario.ElevationMetersProjectionDegrees: _elevationFactor = 1F / (1609F * 69F); break; case ElevationScenario.ElevationMetersProjectionFeet: _elevationFactor = 1F * 3.28F; break; case ElevationScenario.ElevationMetersProjectionMeters: _elevationFactor = 1F; break; } // Light direction is SouthEast at about 45 degrees up _zenithAngle = 45; _lightDirection = 45; _lightIntensity = .7F; _ambientIntensity = .8F; _extrusion = 5; // _elevationFactor = 0.0000027F; _isUsed = false; _hasChanged = false; }
/// <summary> /// Creates a new instance of ShadedRelief based on some more common /// elevation to goegraphic coordinate sysetem scenarios /// </summary> public ShadedRelief(ElevationScenario scenario) { // These scenarios just give a quick approximate calc for the elevation factor switch (scenario) { case ElevationScenario.ElevationCentiMeters_ProjectionDegrees: _elevationFactor = 1F / (160934.4F * 69F); break; case ElevationScenario.ElevationCentiMeters_ProjectionFeet: _elevationFactor = 0.0328084F; break; case ElevationScenario.ElevationCentiMeters_ProjectionMeters: _elevationFactor = 1F / 100F; break; case ElevationScenario.ElevationFeet_ProjectionDegrees: _elevationFactor = 1F / (5280F * 69F); break; case ElevationScenario.ElevationFeet_ProjectionFeet: _elevationFactor = 1F; break; case ElevationScenario.ElevationFeet_ProjectionMeters: _elevationFactor = 1F / 3.28F; break; case ElevationScenario.ElevationMeters_ProjectionDegrees: _elevationFactor = 1F / (1609F * 69F); break; case ElevationScenario.ElevationMeters_ProjectionFeet: _elevationFactor = 1F * 3.28F; break; case ElevationScenario.ElevationMeters_ProjectionMeters: _elevationFactor = 1F; break; } // Light direction is SouthEast at about 45 degrees up _zenithAngle = 45; _lightDirection = 45; _lightIntensity = .7F; _ambientIntensity = .8F; _extrusion = 5; //_elevationFactor = 0.0000027F; _isUsed = false; _hasChanged = false; }