Page 696 - 2
P. 696

changing_progress += PERIOD;
                            changing_coordinate.x = changing_coordinate.x + (object_speed.x*PERIOD);
                            changing_coordinate.y = changing_coordinate.y + (object_speed.y*PERIOD);
                            changing_coordinate.z = changing_coordinate.z + (object_speed.z*PERIOD);
                    }
            }
            //----------------------------------------------------------------------                 기능---
            //----------------------------------        전역 기능
            void setA() { A = state; }
            void setB() { B = state; }
            void to_A() {
                    slide(A);
            }
            void to_B() {
                    slide(B);
            }
            void free_move()
            {
                    free_move_Enable = 1;
                    if (free_move_pos_Enable)
                            speed.pos = analog.pos + digital.pos;
                    if (free_move_x_Enable)
                            speed.x = analog.x + digital.x;
                    if (free_move_y_Enable)
                            speed.y = analog.y + digital.y;
            }


            void save_object_at_onetime(float distance, int num)
            {
                    float Z = sin(state.y*PI / 180)*distance;
                    distance = cos(state.y*PI / 180)*distance;
                    float X = state.pos + sin(state.x*PI / 180)*distance;
                    float Y = cos(state.x*PI / 180)*distance;


                    object[num].x = X;
                    object[num].y = Y;
                    object[num].z = Z;
            }


            void save_object(Vector p1, Vector p2, int num)
            {
                    float Y = (p2.pos - p1.pos) / (tan(p1.x*PI / 180) + tan((-p2.x)*PI / 180));
                    float X = p1.pos + tan(p1.x*PI / 180)*Y;
                    float Z = tan(p1.y*PI / 180)*sqrt(pow(X - p1.pos, 2) + pow(Y, 2));
                    object[num].x = X;


                                                         - 696 -
   691   692   693   694   695   696   697   698   699   700   701