public static void Graphical_OverLap_Logic(int choice)
        {
            GraphicalOverlap.GO_interface_item_choice = choice;

            if (GraphicalOverlap.GO_interface_item_choice > GraphicalOverlap.End_Max)
            {
                GraphicalOverlap.GO_interface_item_choice = 0;
            }
            if (GraphicalOverlap.GO_interface_item_choice < 0)
            {
                GraphicalOverlap.GO_interface_item_choice = GraphicalOverlap.End_Max;
            }

            GraphicalOverlap.GO_color = GeneralProgrammingStuff.ColorSwitch(GraphicalOverlap.GO_interface_item_choice - GraphicalOverlap.Start_Shift);

            if (GraphicalOverlap.GO_interface_item_choice == 0)
            {
                StaticSettings.S.GhostCube_Add_in_Data_For_Draw = false;
            }
            else
            {
                StaticSettings.S.GhostCube_Add_in_Data_For_Draw = true;
            }

            GraphicalOverlap.Rebuilding_is_required_cause_of_GO_color_changed_color = true;
        }
Exemple #2
0
        /// TimeSpan timeItTook = (DateTime.Now - start);

        public void Reloader_Main(OpenGL gl)
        {
            if (StaticSettings.S.RequiredReloader && !newThread.IsAlive && !DoWork_IsAlive)
            {
                if (!SS.Main.CopiedLastResult)
                {
                    SS.Main.scene_info.vertexBufferArray.Delete(gl);
                    SS.Main.CopyToReady();
                    SS.Main.scene_info.CreateVerticesForSquare_not_angled();
                    DataForDraw_FreshlyPlacedCubes.TemporalList.Clear();
                    Reloader_TemporalList();
                }

                float scalar = GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.LastPlayerLook, Scene.SS.env.player.coords.NormalizedLook);

                if (SS.env.player.coords.Player_chunk_position.x >= 0 && SS.env.player.coords.Player_chunk_position.x < CubicalMemory.World.Quantity_of_chunks_in_root &&
                    SS.env.player.coords.Player_chunk_position.z >= 0 && SS.env.player.coords.Player_chunk_position.z < CubicalMemory.World.Quantity_of_chunks_in_root)
                {
                    if ((StaticSettings.S.ReloaderCauseOfChunkRare && ((float)Math.Abs(SS.env.player.coords.Player_chunk_position.x - SS.env.player.coords.Player_chunk_position_OLD.x) > ((float)StaticSettings.S.RangeOfView / 2 - 1) ||
                                                                       (float)Math.Abs(SS.env.player.coords.Player_chunk_position.z - SS.env.player.coords.Player_chunk_position_OLD.z) > ((float)StaticSettings.S.RangeOfView / 2 - 1))) ||
                        (StaticSettings.S.ReloaderCauseOfChangingChunk && SS.env.player.coords.Player_chunk_position != SS.env.player.coords.Player_chunk_position_OLD) ||
                        (StaticSettings.S.RealoderCauseOfPointOfView && scalar < StaticSettings.S.PointOfViewCoefOfDifference) ||
                        (StaticSettings.S.RealoderCauseOfSunSided && SS.env.player.coords.Player_cubical_position.y != SS.env.player.coords.Player_cubical_position_OLD.y) ||
                        StaticSettings.S.RealoderCauseOfBuildingBlocks ||
                        StaticSettings.S.RangeOfView_Old != StaticSettings.S.RangeOfView)
                    {
                        StaticSettings.S.RangeOfView_Old = StaticSettings.S.RangeOfView;

                        newThread = new Thread(Scene.DoWork);
                        newThread.Start(42);
                        SS.env.player.coords.Player_chunk_position_OLD.x   = SS.env.player.coords.Player_chunk_position.x;
                        SS.env.player.coords.Player_chunk_position_OLD.z   = SS.env.player.coords.Player_chunk_position.z;
                        SS.env.player.coords.Player_cubical_position_OLD.x = SS.env.player.coords.Player_cubical_position.x;
                        SS.env.player.coords.Player_cubical_position_OLD.y = SS.env.player.coords.Player_cubical_position.y;
                        SS.env.player.coords.Player_cubical_position_OLD.z = SS.env.player.coords.Player_cubical_position.z;
                        Console.WriteLine($"Inting My CoThread #{CounterMyCoThread++}");
                        StaticSettings.S.RealoderCauseOfBuildingBlocks = false;
                    }
                }
            }
            else
            {
            }
        }
        public override void initialization()
        {
            START_initialization();

            int i = 0;
            int j = 0;

            int value = 0;

            if ((value = Scene.SS.env.player.coords.Player_chunk_position.x - StaticSettings.S.RangeOfView) > 0)
            {
                i = value + 1;
            }
            else
            {
                i = 0;
            }

            for (; i < Scene.SS.env.cub_mem.world.World_as_Whole.Count() && i < Scene.SS.env.player.coords.Player_chunk_position.x + StaticSettings.S.RangeOfView; i++)
            {
                if ((value = Scene.SS.env.player.coords.Player_chunk_position.z - StaticSettings.S.RangeOfView) > 0)
                {
                    j = value + 1;
                }
                else
                {
                    j = 0;
                }

                for (; j < Scene.SS.env.cub_mem.world.World_as_Whole[i].Count() && j < Scene.SS.env.player.coords.Player_chunk_position.z + StaticSettings.S.RangeOfView; j++)
                {
                    var XYworld = Scene.SS.env.cub_mem.world.World_as_Whole[i][j];

                    if (Math.Abs(XYworld.xz.x - Scene.SS.env.player.coords.Player_chunk_position.x) < StaticSettings.S.RangeOfView &&
                        Math.Abs(XYworld.xz.z - Scene.SS.env.player.coords.Player_chunk_position.z) < StaticSettings.S.RangeOfView)
                    {
                        foreach (var Xcube in XYworld.cubes)
                        {
                            foreach (var XYcube in Xcube)
                            {
                                foreach (var XYZcube in XYcube)
                                {
                                    if (XYZcube.IsFilled && !XYZcube.IsTakenForExplosion)
                                    {
                                        ShaderedScene.CalculateFromMaptoGraphical(XYZcube, ref x, ref y, ref z);

                                        //POINT OF VIEWER
                                        Scene.SS.env.player.NormalizedToXYWorld.x = Scene.SS.env.player.coords.Player_precise_stepback.x - x;
                                        Scene.SS.env.player.NormalizedToXYWorld.y = Scene.SS.env.player.coords.Player_precise_stepback.y - y;
                                        Scene.SS.env.player.NormalizedToXYWorld.z = Scene.SS.env.player.coords.Player_precise_stepback.z - z;
                                        float range = GeneralProgrammingStuff.vec3_range(Scene.SS.env.player.NormalizedToXYWorld);
                                        GeneralProgrammingStuff.vec3_normalize(ref Scene.SS.env.player.NormalizedToXYWorld, range);
                                        Scene.SS.env.player.coords.LookForCube();
                                        float scalar = GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.NormalizedToXYWorld, Scene.SS.env.player.coords.NormalizedLook);
                                        //POINT OF VIEWER

                                        if (!StaticSettings.S.RealoderCauseOfPointOfView || scalar > 0)
                                        {
                                            //if (!StaticSettings.S.RealoderCauseOfSunSided ||
                                            //    XYworld.xz.x == Scene.SS.env.player.coords.Player_chunk_position.x
                                            //    && XYworld.xz.z == Scene.SS.env.player.coords.Player_chunk_position.z)
                                            //    Draw_Quad_Full_Sunsided(x, y, z, localed_range, XYZcube.color, true); //Вроде обычный куб.
                                            //else
                                            if (!StaticSettings.S.PointOfView_Circled_Visible_Cubes || range < CubicalMemory.Cube.rangeOfTheEdge * CubicalMemory.Chunk.Width * (StaticSettings.S.RangeOfView))
                                            {
                                                Draw_Quad_Full_Sunsided_not_angled(x, y, z, localed_range, XYZcube.color);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            END_initialization();
        }
        public void openGL_Draw_Wrapped()
        {
            if (this.ActiveControl.Focused)
            {
                if ((Control.ModifierKeys & Keys.Shift) != 0)
                {
                    Keyboard.DoSpecificAction('z');
                }

                if ((Control.ModifierKeys & Keys.Control) != 0)
                {
                    Keyboard.Ctrl_is_pressed = true;
                }
                else
                {
                    Keyboard.Ctrl_is_pressed = false;
                }

                if ((Control.ModifierKeys & Keys.Alt) != 0)
                {
                }
                else
                {
                    Keyboard.Alt_is_pressed = false;
                }

                Keyboard.DoAction();

                if (Mouse.MouseIsActive && (StaticAccess.FMOS != null && !StaticAccess.FMOS.table_Menu_main.Visible))
                {
                    Mouse.DoMouse(Control.MousePosition, Control.MouseButtons.ToString());
                    Cursor.Position = Mouse.ReturnToCenter();
                }

                Scene.SS.env.player.coords.Player_recalculate_extra_positions();
            }
            //  Draw the scene.
            scene.Draw(openGLControl.OpenGL);

            //if (StaticSettings.S.GhostCubeBool)
            for (int i = GraphicalOverlap.Start_Shift; i <= GraphicalOverlap.End_Max; i++)
            {
                GraphicalOverlap.draw_GO_square(openGLControl, 20 + i * 30, 20, 20, GeneralProgrammingStuff.ColorSwitch(i - GraphicalOverlap.Start_Shift));
            }

            CF.Ultimate_DrawText(20 + GraphicalOverlap.GO_interface_item_choice * 30, 50, System.Drawing.Color.White, 14, GraphicalOverlap.GO_interface_item_choice.ToString(), 3.0f);

            CF.Ultimate_DrawText(openGLControl.Width / 2 - FontSizeTargetPointer / 4, openGLControl.Height / 2 - FontSizeTargetPointer / 2, System.Drawing.Color.White, FontSizeTargetPointer, "+", 4.0f);

            if (StaticSettings.S.HelpInfoForPlayer)
            {
                int place = 1;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * 1, System.Drawing.Color.Gold, 10, "|F| - Fly Mod: " + StaticSettings.S.FlyMod, 2.0f);
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Gold, 10, "|M| - Music: " + Music.wmp_player.PlayerTime() + " " + Music.wmp_player.PlayerSongName(), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Cyan, 10, "|N| - Next Song: ", 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.LimeGreen, 10, "|P| - Phantom Mod: " + StaticSettings.S.PhantomMod, 2.0f);  place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Yellow, 10, "|Y| - Sun Disabled: " + StaticSettings.S.SunStatus.x, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.WhiteSmoke, 10, "|T| - Time Speed: " + Time.time.Time_Speed, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.SandyBrown, 10, "|F| - Falling Cube: " + StaticSettings.S.FallingCube, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Red, 10, "|E| - Exploding Mod: " + StaticSettings.S.ExplosionMod, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Purple, 10, "|J| - Rotational Mod: " + Projectile.jp.RotatingStartingVelocity, 2.0f); place++;

                if (StaticSettings.S.ShowPlayerPosition)
                {
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "PrecisePosition:" + Scene.SS.env.player.coords.Player_precise_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "ChunkPosition:" + Scene.SS.env.player.coords.Player_chunk_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "CubicalPosition:" + Scene.SS.env.player.coords.Player_cubical_position.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "PreciseLook:" + Scene.SS.env.player.coords.Player_precise_lookforcube.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "ChunkLook:" + Scene.SS.env.player.coords.Player_chunk_lookforcube.ToString(), 2.0f); place++;
                    CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "CubicalLook:" + Scene.SS.env.player.coords.Player_cubical_lookforcube.ToString(), 2.0f); place++;
                }

                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Blue, 10, "Range of View: " + StaticSettings.S.RangeOfView, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time: " + Time.time.GetDayTime(), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Starting Velocity: " + vec3things.ToString(Projectile.jp.sd.Get_Starting_velocity()), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Velocity: " + Projectile.jp.sd.StartingVelocity.ToString("G2"), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "LPFM: " + vec3things.ToString(Projectile.jp.LastPositionForMeasurements), 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Range: " + Projectile.jp.TotalRangeZXForMeasurements, 2.0f); place++;
                CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Total Arc Range: " + Projectile.jp.TotalFlyingDistanceInAnArcWay, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "X: " + StaticCompass.C.Xangle.ToString("G2"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + StaticCompass.C.Zangle.ToString("G2"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + (StaticCompass.C.Xangle / Math.PI * 180.0f).ToString("G3"), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Crimson, 10, "Z: " + (StaticCompass.C.Zangle / Math.PI * 180.0f).ToString("G3"), 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Ctrl: " + Keyboard.Ctrl_is_pressed, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Alt: " + Keyboard.Alt_is_pressed, 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "-------------------", 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Position Old: " + vec3things.ToString(Projectile.jp.Coordinates()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Position New: " + vec3things.ToString(Projectile.jp.Coordinates(true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Velocity Old: " + vec3things.ToString(Projectile.jp.Velocity()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Velocity New: " + vec3things.ToString(Projectile.jp.Velocity(true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.AbsoluteLocationAtTime(1.0f)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.AbsoluteLocationAtTime(1.0f,true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.CoordinatesAtTimeAtHighPart(1.0f)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.CoordinatesAtTimeAtHighPart(1.0f, true)), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 Old: " + vec3things.ToString(Projectile.jp.AbsoluteEstimatedLocation()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Predicted After 1 New: " + vec3things.ToString(Projectile.jp.AbsoluteEstimatedLocation(true)), 2.0f); place++;


                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time.time.GetGameTotalSeconds: " + Time.time.GetGameTotalSeconds(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "starting velocity: " + Projectile.jp.GetStringedVec3(Projectile.jp.sd.starting_velocity), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Projectile.jp.Coordinates() " + Projectile.jp.GetStringedVec3(Projectile.jp.Coordinates()), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Projectile.jp.Coordinates() " + Projectile.jp.GetStringedVec3(Projectile.jp.center), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Bomb Location " + Explosion.exp.Bomb_precise_position.ToString(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Rocket Angle: " + Projectile.jp.AngleBetweenStartingAndCurrentVelocity(), 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Average Rebuilding Main Time: " + Time.time.AverageRebuildingTime, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "TimeWhenSecondZero: " + Projectile.jp.TimeWhenSecondZero(), 2.0f); place++;

                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Explosion.exp.StartingTime: " + Explosion.exp.StartingTime, 2.0f); place++;
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Explosion.exp.StartingShift: " + Explosion.exp.StartingShiftForLoeading, 2.0f); place++;
                //
                //CF.Ultimate_DrawText(20, openGLControl.Height - 20 * place, System.Drawing.Color.Orange, 10, "Time: " + Time.time.GetTotalSeconds(), 2.0f); place++;
            }
        }
Exemple #5
0
            public void Exploding_Rewriter()
            {
                if (ExplosionCenter != null)
                {
                    Point2Int Bomb_chunk_position   = new Point2Int(0, 0);
                    Point3Int Bomb_cubical_position = new Point3Int(0, 0, 0);
                    Scene.SS.env.player.coords.Reverse_presice_to_map_coords(Bomb_precise_position, ref Bomb_chunk_position, ref Bomb_cubical_position);

                    int Range_of_chunk_explosion = (int)Projectile.settings.Explosion_radius;
                    //DataForDraw_ExplodingList.TemporalList.Clear();

                    int i = 0;
                    int j = 0;

                    int value = 0;
                    if ((value = Bomb_chunk_position.x - Range_of_chunk_explosion) > 0)
                    {
                        i = value;
                    }
                    else
                    {
                        i = 0;
                    }

                    for (; i < Scene.SS.env.cub_mem.world.World_as_Whole.Count() && i < Bomb_chunk_position.x + Range_of_chunk_explosion; i++)
                    {
                        if ((value = Bomb_chunk_position.z - Range_of_chunk_explosion) > 0)
                        {
                            j = value;
                        }
                        else
                        {
                            j = 0;
                        }

                        for (; j < Scene.SS.env.cub_mem.world.World_as_Whole[i].Count() && j < Bomb_chunk_position.z + Range_of_chunk_explosion; j++)
                        {
                            var XYworld = Scene.SS.env.cub_mem.world.World_as_Whole[i][j];

                            if (Math.Abs(XYworld.xz.x - Bomb_chunk_position.x) < Range_of_chunk_explosion &&
                                Math.Abs(XYworld.xz.z - Bomb_chunk_position.z) < Range_of_chunk_explosion)
                            {
                                foreach (var Xcube in XYworld.cubes)
                                {
                                    foreach (var XYcube in Xcube)
                                    {
                                        foreach (var XYZcube in XYcube)
                                        {
                                            if (XYZcube.IsFilled && !XYZcube.IsTakenForExplosion)
                                            {
                                                ShaderedScene.CalculateFromMaptoGraphical(XYZcube, ref x, ref y, ref z);

                                                //POINT OF VIEWER
                                                vec3 range_to_cube = new vec3(0, 0, 0);
                                                range_to_cube.x = Bomb_precise_position.x - x;
                                                range_to_cube.y = Bomb_precise_position.y - y;
                                                range_to_cube.z = Bomb_precise_position.z - z;
                                                float range = GeneralProgrammingStuff.vec3_range(range_to_cube);

                                                if (range < CubicalMemory.Cube.rangeOfTheEdge * Projectile.settings.Explosion_radius)
                                                {
                                                    XYZcube.FallingStartingTime = Explosion.exp.StartingTime;
                                                    DataForDraw_ExplodingList.TemporalList.Add(XYZcube);
                                                    //Draw_Quad_Full_Sunsided_not_angled(x, y, z, localed_range, XYZcube.color);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    ExplosionCenter.IsTakenForExplosion = true;
                }
            }
Exemple #6
0
        public virtual void Draw_Quad_Full_Sunsided(
            float x, float y, float z, float localed_range, System.Drawing.Color _colour, bool SunSided_DRAWFULL = false)
        {
            //Front
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(0, 0, -1)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSz
                (
                    x,                 //Start_x
                    y,                 //Start_z
                    x + localed_range, //End_x
                    y + localed_range, //End_z
                    z,                 //Height
                    _colour);
            }


            //Back
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(0, 0, 1)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSz
                (
                    x,                 //Start_x
                    y,                 //Start_z
                    x + localed_range, //End_x
                    y + localed_range, //End_z
                    z + localed_range, //Height
                    _colour            //Height
                );
            }

            //Left
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(-1, 0, 0)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSx
                (
                    y,                 //Start_x
                    z,                 //Start_z
                    y + localed_range, //End_x
                    z + localed_range, //End_z
                    x,                 //Height
                    _colour            //Height
                );
            }

            //Right
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(1, 0, 0)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSx
                (
                    y,                 //Start_x
                    z,                 //Start_z
                    y + localed_range, //End_x
                    z + localed_range, //End_z
                    x + localed_range, //Height
                    _colour            //Height
                );
            }

            //Top
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(0, 1, 0)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSy
                (
                    x,                 //Start_x
                    z,                 //Start_z
                    x + localed_range, //End_x
                    z + localed_range, //End_z
                    y + localed_range, //Height
                    _colour            //Height
                );
            }

            //Bottom
            if (SunSided_DRAWFULL || -GeneralProgrammingStuff.vec3_scalar(Scene.SS.env.player.coords.NormalizedLook,
                                                                          new vec3(0, -1, 0)) < StaticSettings.S.SunSidedCoef)
            {
                Draw_Quad_Perpendecular_to_OSy
                (
                    x,                 //Start_x
                    z,                 //Start_z
                    x + localed_range, //End_x
                    z + localed_range, //End_z
                    y,                 //Height
                    _colour            //Height
                );
            }
        }