Ejemplo n.º 1
0
        public clsViewInfo(clsMap map, MapViewControl mapViewControl)
        {
            Map = map;
            MapViewControl = mapViewControl;

            ViewPos = new XYZInt(0, 3072, 0);
            FOV_Multiplier_Set(SettingsManager.Settings.FOVDefault);
            ViewAngleSetToDefault();
            LookAtPos(new XYInt((int)(map.Terrain.TileSize.X * Constants.TerrainGridSpacing / 2.0D),
                (int)(map.Terrain.TileSize.Y * Constants.TerrainGridSpacing / 2.0D)));
        }
Ejemplo n.º 2
0
        public clsViewInfo(clsMap Map, MapViewControl MapViewControl)
        {
            this.Map = Map;
            this.MapViewControl = MapViewControl;

            ViewPos = new sXYZ_int(0, 3072, 0);
            FOV_Multiplier_Set(SettingsManager.Settings.FOVDefault);
            ViewAngleSetToDefault();
            LookAtPos(new sXY_int((int)(Map.Terrain.TileSize.X * App.TerrainGridSpacing / 2.0D),
                (int)(Map.Terrain.TileSize.Y * App.TerrainGridSpacing / 2.0D)));
        }
Ejemplo n.º 3
0
        public void FOV_Set(double radians, MapViewControl mapViewControl)
        {
            FOVMultiplier = Math.Tan(radians / 2.0D) / mapViewControl.GLSize.Y * 2.0D;
            FOVMultiplierExponent = Math.Log(FOVMultiplier) / Math.Log(2.0D);

            FOV_Calc();
        }