public static decimal GetSuggestedCredits(MineralType mineralType) { //TODO: Get these from some environment settings //NOTE: The commented values are what I got from websites ($15,000 per carat for diamond seems a bit steep though) //I was screwing around, and this gave a pretty nice curve: // =10 * ((5 + log10(value))^2) // // But I ended up rounding the numbers off to give a smoother curve switch (mineralType) { case MineralType.Ice: //return .0003m; return(25m); case MineralType.Iron: //return .0017m; return(50m); case MineralType.Graphite: //return .08m; return(150m); case MineralType.Gold: //return 49420m; return(400m); case MineralType.Platinum: //return 59840m; return(700m); case MineralType.Emerald: //return 1250000m; return(1000m); case MineralType.Saphire: //return 5000000m; return(1200m); case MineralType.Ruby: //return 12500000m; return(1500m); case MineralType.Diamond: //return 75000000m; return(2000m); case MineralType.Rixium: //return 300000000m; return(5000m); default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
public Icon3D(MineralType mineralType) { InitializeComponent(); this.ItemName = mineralType.ToString(); this.MineralType = mineralType; lblName.Text = this.ItemName; lblName.Visibility = _showName ? Visibility.Visible : Visibility.Collapsed; InitializeTrackball(); RenderMineral(); InitializeLight(); }
public Icon3D(MineralType mineralType) { InitializeComponent(); this.ItemName = mineralType.ToString(); this.MineralType = mineralType; lblName.Text = this.ItemName; lblName.Visibility = _showName ? Visibility.Visible : Visibility.Collapsed; InitializeTrackball(); RenderMineral(); InitializeLight(); }
public static decimal GetCredits_Mineral(MineralType mineralType) { //const decimal BASE = 3m; const decimal BASE = 10m; //roughly x^2.7 switch (mineralType) { case MineralType.Ice: //return BASE * 1m; return(BASE * 3m); case MineralType.Graphite: return(BASE * 6.5m); case MineralType.Diamond: return(BASE * 20m); case MineralType.Ruby: return(BASE * 42m); case MineralType.Saphire: return(BASE * 77m); case MineralType.Emerald: return(BASE * 125m); case MineralType.Iron: return(BASE * 190m); case MineralType.Gold: return(BASE * 275m); case MineralType.Platinum: return(BASE * 380m); case MineralType.Rixium: return(BASE * 500m); default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
/// <summary> /// This returns the price of a mineral with a volume of 1 /// </summary> private static decimal GetCredits_Mineral_ORIG(MineralType mineralType) { const decimal BASE = 3m; switch (mineralType) { case MineralType.Ice: return(BASE * 1m); case MineralType.Graphite: return(BASE * 2m); case MineralType.Diamond: return(BASE * 3m); case MineralType.Emerald: case MineralType.Saphire: case MineralType.Ruby: return(BASE * 3.5m); case MineralType.Iron: return(BASE * 7m); case MineralType.Gold: return(BASE * 10m); case MineralType.Platinum: return(BASE * 15m); case MineralType.Rixium: return(BASE * 50m); default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
/// <summary> /// This returns the price of a mineral with a volume of 1 /// </summary> private static decimal GetCredits_Mineral_ORIG(MineralType mineralType) { const decimal BASE = 3m; switch (mineralType) { case MineralType.Ice: return BASE * 1m; case MineralType.Graphite: return BASE * 2m; case MineralType.Diamond: return BASE * 3m; case MineralType.Emerald: case MineralType.Saphire: case MineralType.Ruby: return BASE * 3.5m; case MineralType.Iron: return BASE * 7m; case MineralType.Gold: return BASE * 10m; case MineralType.Platinum: return BASE * 15m; case MineralType.Rixium: return BASE * 50m; default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
public virtual long this[MineralType key] => this[key.ToString()];
public static MineralStats GetSettingsForMineralType(MineralType mineralType) { //NOTE: The geometry is defined in SharedVisuals.GetMineralMesh() switch (mineralType) { case MineralType.Ice: #region Ice // Going for an ice cube :) return(new MineralStats( Color.FromArgb(192, 201, 233, 242), // slightly bluish white Color.FromArgb(255, 203, 212, 214), 66d, Colors.Transparent, 934)); #endregion case MineralType.Iron: #region Iron // This will be an iron bar (with rust) return(new MineralStats( Color.FromArgb(255, 92, 78, 72), Color.FromArgb(255, 117, 63, 40), 50d, Colors.Transparent, 7900)); #endregion case MineralType.Graphite: #region Graphite // A shiny lump of coal (but coal won't form in space, so I call it graphite) return(new MineralStats( Color.FromArgb(255, 32, 32, 32), Color.FromArgb(255, 209, 209, 209), 75d, Colors.Transparent, 2267)); #endregion case MineralType.Gold: #region Gold // A reflective gold bar return(new MineralStats( Color.FromArgb(255, 255, 191, 0), Color.FromArgb(255, 212, 138, 0), 75d, Colors.Transparent, 19300)); #endregion case MineralType.Platinum: #region Platinum // A reflective platinum bar/plate //TODO: Make this a flat plate return(new MineralStats( Color.FromArgb(255, 166, 166, 166), Color.FromArgb(255, 125, 57, 45), 95d, Color.FromArgb(20, 214, 214, 214), 21450)); #endregion case MineralType.Emerald: #region Emerald // A semi transparent double trapazoid return(new MineralStats( UtilityWPF.ColorFromHex("D948A340"), //Color.FromArgb(192, 69, 128, 64); UtilityWPF.ColorFromHex("24731C"), //Color.FromArgb(255, 26, 82, 20); 100d, UtilityWPF.ColorFromHex("40499100"), //Color.FromArgb(64, 64, 128, 0); 2760)); #endregion case MineralType.Saphire: #region Saphire // A jeweled oval return(new MineralStats( Color.FromArgb(160, 39, 53, 102), Color.FromArgb(255, 123, 141, 201), 100d, Color.FromArgb(64, 17, 57, 189), 4000)); #endregion case MineralType.Ruby: #region Ruby // A jeweled oval return(new MineralStats( Color.FromArgb(180, 176, 0, 0), Color.FromArgb(255, 255, 133, 133), 100d, Color.FromArgb(32, 156, 53, 53), 4000)); #endregion case MineralType.Diamond: #region Diamond // A jewel return(new MineralStats( Color.FromArgb(128, 230, 230, 230), Color.FromArgb(255, 196, 196, 196), 100d, Color.FromArgb(32, 255, 255, 255), 3515)); #endregion case MineralType.Rixium: #region Rixium // A petagon rod // There are also some toruses around it, but they are just visuals. This rod is the collision mesh return(new MineralStats( Color.FromArgb(192, 92, 59, 112), //_specularColor = Color.FromArgb(255, 145, 63, 196); Color.FromArgb(255, 77, 127, 138), 100d, Color.FromArgb(64, 112, 94, 122), 66666)); #endregion default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
public static decimal GetSuggestedValue(MineralType mineralType) { //TODO: Get these from some environment settings //NOTE: The commented values are what I got from websites ($15,000 per carat for diamond seems a bit steep though) //I was screwing around, and this gave a pretty nice curve: // =10 * ((5 + log10(value))^2) // // But I ended up rounding the numbers off to give a smoother curve switch (mineralType) { case MineralType.Ice: //return .0003m; return 25m; case MineralType.Iron: //return .0017m; return 50m; case MineralType.Graphite: //return .08m; return 150m; case MineralType.Gold: //return 49420m; return 400m; case MineralType.Platinum: //return 59840m; return 700m; case MineralType.Emerald: //return 1250000m; return 1000m; case MineralType.Saphire: //return 5000000m; return 1200m; case MineralType.Ruby: //return 12500000m; return 1500m; case MineralType.Diamond: //return 75000000m; return 2000m; case MineralType.Rixium: //return 300000000m; return 5000m; default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
public Geometry3D GetMineralMesh(MineralType mineralType) { if (!_mineralMeshes.ContainsKey(mineralType)) { #region Cache Geometry int numSides; List <TubeRingDefinition_ORIG> rings = new List <TubeRingDefinition_ORIG>(); double sqrt2 = Math.Sqrt(2d); switch (mineralType) { case MineralType.Ice: #region Ice // Going for an ice cube :) numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, 1d, true, false)); #endregion break; case MineralType.Iron: #region Iron // This will be an iron bar (with rust) numSides = 4; rings.Add(new TubeRingDefinition_ORIG(.8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(1d, 1d, .2d, true, false)); rings.Add(new TubeRingDefinition_ORIG(1d, 1d, 1.1d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.8d, .8d, .2d, true, false)); #endregion break; case MineralType.Graphite: #region Graphite // A shiny lump of coal numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, .5d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, .5d, true, false)); #endregion break; case MineralType.Gold: #region Gold // A reflective gold bar //TODO: Expand the tube ring definition to support making a trapazoid bar numSides = 6; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, 1, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, .3d, true, false)); #endregion break; case MineralType.Platinum: #region Platinum // A reflective platinum bar/plate numSides = 8; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, 1, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, .3d, true, false)); #endregion break; case MineralType.Emerald: #region Emerald // A semi transparent double trapazoid numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, .25d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, .25d, true, false)); #endregion break; case MineralType.Saphire: #region Saphire // A jeweled oval numSides = 10; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .075d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2 * .75, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, .075d, true, false)); #endregion break; case MineralType.Ruby: #region Ruby // A jeweled oval numSides = 10; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .075d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2 * .75, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, .075d, true, false)); #endregion break; case MineralType.Diamond: #region Diamond // A jewel numSides = 8; rings.Add(new TubeRingDefinition_ORIG(.001, .001, 0, true, false)); //NOTE: If the object is going to be semitransparent, then don't use the pyramid overload. I think it's because the normal points down, and lighting isn't the way you'd expect rings.Add(new TubeRingDefinition_ORIG(1.125d, 1.125d, .6d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.56d, .56d, .19d, true, false)); #endregion break; case MineralType.Rixium: #region Rixium // A petagon rod // There are also some toruses around it, but they are just visuals. This rod is the collision mesh numSides = 5; rings.Add(new TubeRingDefinition_ORIG(.001, .001, 0, true, false)); //NOTE: If the object is going to be semitransparent, then don't use the pyramid overload. I think it's because the normal points down, and lighting isn't the way you'd expect rings.Add(new TubeRingDefinition_ORIG(.8, .8, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.8, .8, 1d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.001, .001, .3d, true, false)); #endregion break; default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } // Create and store the mesh _mineralMeshes.Add(mineralType, UtilityWPF.GetMultiRingedTube_ORIG(numSides, rings, false, true)); #endregion } return(_mineralMeshes[mineralType]); }
private void StoreSettingsForMineralType(double volumeInCubicMeters) { if (_mineralType == MineralType.Custom) { return; } // These have no meaning unless it's custom _numSides = 0; _rings.Clear(); //NOTE: The geometry is defined in SharedVisuals.GetMineralMesh() switch (_mineralType) { case MineralType.Ice: #region Ice // Going for an ice cube :) _diffuseColor = Color.FromArgb(192, 201, 233, 242); // slightly bluish white _specularColor = Color.FromArgb(255, 203, 212, 214); _specularPower = 66d; _emissiveColor = Colors.Transparent; _mass = 934 * volumeInCubicMeters; #endregion break; case MineralType.Iron: #region Iron // This will be an iron bar (with rust) _diffuseColor = Color.FromArgb(255, 92, 78, 72); _specularColor = Color.FromArgb(255, 117, 63, 40); _specularPower = 50d; _emissiveColor = Colors.Transparent; _mass = 7900 * volumeInCubicMeters; #endregion break; case MineralType.Graphite: #region Graphite // A shiny lump of coal //_diffuseColor = Color.FromArgb(255, 64, 64, 64); _diffuseColor = Color.FromArgb(255, 32, 32, 32); _specularColor = Color.FromArgb(255, 209, 209, 209); _specularPower = 75d; _emissiveColor = Colors.Transparent; _mass = 2267 * volumeInCubicMeters; #endregion break; case MineralType.Gold: #region Gold // A reflective gold bar _diffuseColor = Color.FromArgb(255, 255, 191, 0); _specularColor = Color.FromArgb(255, 212, 138, 0); _specularPower = 75d; _emissiveColor = Colors.Transparent; _mass = 19300 * volumeInCubicMeters; #endregion break; case MineralType.Platinum: #region Platinum // A reflective platinum bar/plate //TODO: Make this a flat plate _diffuseColor = Color.FromArgb(255, 166, 166, 166); _specularColor = Color.FromArgb(255, 125, 57, 45); _specularPower = 95d; _emissiveColor = Color.FromArgb(20, 214, 214, 214); _mass = 21450 * volumeInCubicMeters; #endregion break; case MineralType.Emerald: #region Emerald // A semi transparent double trapazoid _diffuseColor = Color.FromArgb(192, 69, 128, 64); _specularColor = Color.FromArgb(255, 26, 82, 20); _specularPower = 100d; _emissiveColor = Color.FromArgb(32, 64, 128, 0); _mass = 2760 * volumeInCubicMeters; #endregion break; case MineralType.Saphire: #region Saphire // A jeweled oval _diffuseColor = Color.FromArgb(160, 39, 53, 102); _specularColor = Color.FromArgb(255, 123, 141, 201); _specularPower = 100d; _emissiveColor = Color.FromArgb(64, 17, 57, 189); _mass = 4000 * volumeInCubicMeters; #endregion break; case MineralType.Ruby: #region Ruby // A jeweled oval _diffuseColor = Color.FromArgb(180, 176, 0, 0); _specularColor = Color.FromArgb(255, 255, 133, 133); _specularPower = 100d; _emissiveColor = Color.FromArgb(32, 156, 53, 53); _mass = 4000 * volumeInCubicMeters; #endregion break; case MineralType.Diamond: #region Diamond // A jewel _diffuseColor = Color.FromArgb(128, 230, 230, 230); _specularColor = Color.FromArgb(255, 196, 196, 196); _specularPower = 100d; _emissiveColor = Color.FromArgb(32, 255, 255, 255); _mass = 3515 * volumeInCubicMeters; #endregion break; case MineralType.Rixium: #region Rixium // A petagon rod // There are also some toruses around it, but they are just visuals. This rod is the collision mesh _diffuseColor = Color.FromArgb(192, 92, 59, 112); //_specularColor = Color.FromArgb(255, 145, 63, 196); _specularColor = Color.FromArgb(255, 77, 127, 138); _specularPower = 100d; _emissiveColor = Color.FromArgb(64, 112, 94, 122); _mass = 66666 * volumeInCubicMeters; #endregion break; default: throw new ApplicationException("Unknown MineralType: " + _mineralType.ToString()); } }
public static MineralStats GetSettingsForMineralType(MineralType mineralType) { //NOTE: The geometry is defined in SharedVisuals.GetMineralMesh() switch (mineralType) { case MineralType.Ice: #region Ice // Going for an ice cube :) return new MineralStats( Color.FromArgb(192, 201, 233, 242), // slightly bluish white Color.FromArgb(255, 203, 212, 214), 66d, Colors.Transparent, 934); #endregion case MineralType.Iron: #region Iron // This will be an iron bar (with rust) return new MineralStats( Color.FromArgb(255, 92, 78, 72), Color.FromArgb(255, 117, 63, 40), 50d, Colors.Transparent, 7900); #endregion case MineralType.Graphite: #region Graphite // A shiny lump of coal (but coal won't form in space, so I call it graphite) return new MineralStats( Color.FromArgb(255, 32, 32, 32), Color.FromArgb(255, 209, 209, 209), 75d, Colors.Transparent, 2267); #endregion case MineralType.Gold: #region Gold // A reflective gold bar return new MineralStats( Color.FromArgb(255, 255, 191, 0), Color.FromArgb(255, 212, 138, 0), 75d, Colors.Transparent, 19300); #endregion case MineralType.Platinum: #region Platinum // A reflective platinum bar/plate //TODO: Make this a flat plate return new MineralStats( Color.FromArgb(255, 166, 166, 166), Color.FromArgb(255, 125, 57, 45), 95d, Color.FromArgb(20, 214, 214, 214), 21450); #endregion case MineralType.Emerald: #region Emerald // A semi transparent double trapazoid return new MineralStats( UtilityWPF.ColorFromHex("D948A340"), //Color.FromArgb(192, 69, 128, 64); UtilityWPF.ColorFromHex("24731C"), //Color.FromArgb(255, 26, 82, 20); 100d, UtilityWPF.ColorFromHex("40499100"), //Color.FromArgb(64, 64, 128, 0); 2760); #endregion case MineralType.Saphire: #region Saphire // A jeweled oval return new MineralStats( Color.FromArgb(160, 39, 53, 102), Color.FromArgb(255, 123, 141, 201), 100d, Color.FromArgb(64, 17, 57, 189), 4000); #endregion case MineralType.Ruby: #region Ruby // A jeweled oval return new MineralStats( Color.FromArgb(180, 176, 0, 0), Color.FromArgb(255, 255, 133, 133), 100d, Color.FromArgb(32, 156, 53, 53), 4000); #endregion case MineralType.Diamond: #region Diamond // A jewel return new MineralStats( Color.FromArgb(128, 230, 230, 230), Color.FromArgb(255, 196, 196, 196), 100d, Color.FromArgb(32, 255, 255, 255), 3515); #endregion case MineralType.Rixium: #region Rixium // A petagon rod // There are also some toruses around it, but they are just visuals. This rod is the collision mesh return new MineralStats( Color.FromArgb(192, 92, 59, 112), //_specularColor = Color.FromArgb(255, 145, 63, 196); Color.FromArgb(255, 77, 127, 138), 100d, Color.FromArgb(64, 112, 94, 122), 66666); #endregion default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }
public Geometry3D GetMineralMesh(MineralType mineralType) { if (!_mineralMeshes.ContainsKey(mineralType)) { #region Cache Geometry int numSides; List<TubeRingDefinition_ORIG> rings = new List<TubeRingDefinition_ORIG>(); double sqrt2 = Math.Sqrt(2d); switch (mineralType) { case MineralType.Ice: #region Ice // Going for an ice cube :) numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, 1d, true, false)); #endregion break; case MineralType.Iron: #region Iron // This will be an iron bar (with rust) numSides = 4; rings.Add(new TubeRingDefinition_ORIG(.8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(1d, 1d, .2d, true, false)); rings.Add(new TubeRingDefinition_ORIG(1d, 1d, 1.1d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.8d, .8d, .2d, true, false)); #endregion break; case MineralType.Graphite: #region Graphite // A shiny lump of coal numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, .5d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, .5d, true, false)); #endregion break; case MineralType.Gold: #region Gold // A reflective gold bar //TODO: Expand the tube ring definition to support making a trapazoid bar numSides = 6; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, 1, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, .3d, true, false)); #endregion break; case MineralType.Platinum: #region Platinum // A reflective platinum bar/plate numSides = 8; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, 1, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .8d, .8d, .3d, true, false)); #endregion break; case MineralType.Emerald: #region Emerald // A semi transparent double trapazoid numSides = 4; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2, .25d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .75d, sqrt2 * .75d, .25d, true, false)); #endregion break; case MineralType.Saphire: #region Saphire // A jeweled oval numSides = 10; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .075d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2 * .75, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, .075d, true, false)); #endregion break; case MineralType.Ruby: #region Ruby // A jeweled oval numSides = 10; rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, 0d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .075d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2, sqrt2 * .75, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .85, sqrt2 * .66, .05d, true, false)); rings.Add(new TubeRingDefinition_ORIG(sqrt2 * .66, sqrt2 * .35, .075d, true, false)); #endregion break; case MineralType.Diamond: #region Diamond // A jewel numSides = 8; rings.Add(new TubeRingDefinition_ORIG(.001, .001, 0, true, false)); //NOTE: If the object is going to be semitransparent, then don't use the pyramid overload. I think it's because the normal points down, and lighting isn't the way you'd expect rings.Add(new TubeRingDefinition_ORIG(1.125d, 1.125d, .6d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.56d, .56d, .19d, true, false)); #endregion break; case MineralType.Rixium: #region Rixium // A petagon rod // There are also some toruses around it, but they are just visuals. This rod is the collision mesh numSides = 5; rings.Add(new TubeRingDefinition_ORIG(.001, .001, 0, true, false)); //NOTE: If the object is going to be semitransparent, then don't use the pyramid overload. I think it's because the normal points down, and lighting isn't the way you'd expect rings.Add(new TubeRingDefinition_ORIG(.8, .8, .3d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.8, .8, 1d, true, false)); rings.Add(new TubeRingDefinition_ORIG(.001, .001, .3d, true, false)); #endregion break; default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } // Create and store the mesh _mineralMeshes.Add(mineralType, UtilityWPF.GetMultiRingedTube_ORIG(numSides, rings, false, true)); #endregion } return _mineralMeshes[mineralType]; }
public double this[MineralType key] { get { return(this[key.ToString()]); } set { this[key.ToString()] = value; } }
public static decimal GetCredits_Mineral(MineralType mineralType) { //const decimal BASE = 3m; const decimal BASE = 10m; //roughly x^2.7 switch (mineralType) { case MineralType.Ice: //return BASE * 1m; return BASE * 3m; case MineralType.Graphite: return BASE * 6.5m; case MineralType.Diamond: return BASE * 20m; case MineralType.Ruby: return BASE * 42m; case MineralType.Saphire: return BASE * 77m; case MineralType.Emerald: return BASE * 125m; case MineralType.Iron: return BASE * 190m; case MineralType.Gold: return BASE * 275m; case MineralType.Platinum: return BASE * 380m; case MineralType.Rixium: return BASE * 500m; default: throw new ApplicationException("Unknown MineralType: " + mineralType.ToString()); } }