public clsViewInfo(clsMap Map, ctrlMapView MapView) { this.Map = Map; this.MapView = MapView; this.ViewPos = new modMath.sXYZ_int(0, 0xc00, 0); this.FOV_Multiplier_Set(modSettings.Settings.FOVDefault); this.ViewAngleSetToDefault(); modMath.sXY_int horizontal = new modMath.sXY_int((int) Math.Round((double) (((double) (Map.Terrain.TileSize.X * 0x80)) / 2.0)), (int) Math.Round((double) (((double) (Map.Terrain.TileSize.Y * 0x80)) / 2.0))); this.LookAtPos(horizontal); }
public void FOV_Set(double Radians, ctrlMapView MapView) { this.FOVMultiplier = (Math.Tan(Radians / 2.0) / ((double) MapView.GLSize.Y)) * 2.0; this.FOVMultiplierExponent = Math.Log(this.FOVMultiplier) / Math.Log(2.0); this.FOV_Calc(); }