public WaveSpectrumConditionKey(int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) { this.Size = size; this.NumGrids = numGrids; this.WindDir = windDir; this.SpectrumType = spectrumType; }
private WaveSpectrumConditionKey NewSpectrumConditionKey(int fourierSize, float windSpeed, float windDir, float waveAge) { WaveSpectrumConditionKey result; switch (this.spectrumType) { case SPECTRUM_TYPE.UNIFIED: result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.PHILLIPS: result = new PhillipsSpectrumConditionKey(windSpeed, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.UNIFIED_PHILLIPS: result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.CUSTOM: if (base.CustomWaveSpectrum == null) { Ocean.LogWarning("Custom spectrum type selected but no custom spectrum interface has been added to the wave spectrum. Defaulting to Unified Spectrum"); this.spectrumType = SPECTRUM_TYPE.UNIFIED; result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); } else { result = base.CustomWaveSpectrum.CreateKey(fourierSize, windDir, this.spectrumType, this.numberOfGrids); } break; default: throw new InvalidOperationException("Invalid spectrum type = " + this.spectrumType); } return(result); }
public CustomSpectrumConditionKey(float windSpeed, int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) : base(size, windDir, spectrumType, numGrids) { this.WindSpeed = windSpeed; }
public WaveSpectrumConditionKey CreateKey(int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) { return(new CustomWaveSpectrumExample.CustomSpectrumConditionKey(this.windSpeed, size, windDir, spectrumType, numGrids)); }
public UnifiedSpectrumConditionKey(float windSpeed, float waveAge, int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) : base(size, windDir, spectrumType, numGrids) { this.WindSpeed = windSpeed; this.WaveAge = waveAge; }
/// <summary> /// Create a new wave condition key depending on the spectrum type used. /// </summary> WaveSpectrumConditionKey NewSpectrumConditionKey(int fourierSize, float windSpeed, float windDir, float waveAge) { WaveSpectrumConditionKey key = null; switch (spectrumType) { case SPECTRUM_TYPE.UNIFIED: key = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, spectrumType, numberOfGrids); break; case SPECTRUM_TYPE.UNIFIED_PHILLIPS: key = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, spectrumType, numberOfGrids); break; case SPECTRUM_TYPE.PHILLIPS:; key = new PhillipsSpectrumConditionKey(windSpeed, fourierSize, windDir, spectrumType, numberOfGrids); break; case SPECTRUM_TYPE.CUSTOM: { if (CustomWaveSpectrum == null) { Ocean.LogWarning("Custom spectrum type selected but no custom spectrum interface has been added to the wave spectrum. Defaulting to Unified Spectrum"); spectrumType = SPECTRUM_TYPE.UNIFIED; key = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, spectrumType, numberOfGrids); } else { key = CustomWaveSpectrum.CreateKey(fourierSize, windDir, spectrumType, numberOfGrids); } } break; default: throw new InvalidOperationException("Invalid spectrum type = " + spectrumType); } return key; }
public PhillipsSpectrumConditionKey(float windSpeed, int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) : base(size, windDir, spectrumType, numGrids) { WindSpeed = windSpeed; }
public WaveSpectrumConditionKey CreateKey(int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) { return new CustomWaveSpectrumExample.CustomSpectrumConditionKey(this.windSpeed, size, windDir, spectrumType, numGrids); }
public UnifiedSpectrumConditionKey(float windSpeed, float waveAge, int size, float windDir, SPECTRUM_TYPE spectrumType, int numGrids) : base(size, windDir, spectrumType, numGrids) { WindSpeed = windSpeed; WaveAge = waveAge; }
private WaveSpectrumConditionKey NewSpectrumConditionKey(int fourierSize, float windSpeed, float windDir, float waveAge) { WaveSpectrumConditionKey result; switch (this.spectrumType) { case SPECTRUM_TYPE.UNIFIED: result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.PHILLIPS: result = new PhillipsSpectrumConditionKey(windSpeed, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.UNIFIED_PHILLIPS: result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); break; case SPECTRUM_TYPE.CUSTOM: if (base.CustomWaveSpectrum == null) { Ocean.LogWarning("Custom spectrum type selected but no custom spectrum interface has been added to the wave spectrum. Defaulting to Unified Spectrum"); this.spectrumType = SPECTRUM_TYPE.UNIFIED; result = new UnifiedSpectrumConditionKey(windSpeed, waveAge, fourierSize, windDir, this.spectrumType, this.numberOfGrids); } else { result = base.CustomWaveSpectrum.CreateKey(fourierSize, windDir, this.spectrumType, this.numberOfGrids); } break; default: throw new InvalidOperationException("Invalid spectrum type = " + this.spectrumType); } return result; }