/* * Camera control subroutines * * Copyright (C) 2006-2007 Alejandro Valenzuela Roca, * * http://mexinetica.com/~lanjoe9 * * This file is part of MotorJ, a free framework for videogame development. * * * * MotorJ is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MotorJ is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with MotorJ. If not, see . */ #ifndef CAM_CTL_H #define CAM_CTL_H #include "support.h" enum cam_mod{ DESCENTERA=0, FREE_FOLLOW, SCRIPT_FOLLOW, FIXED_FOLLOW, PIGGYBACK}; enum fllow_mod{ GRADUAL=0, IMMEDIATE}; typedef struct { float factor_mov; float factor_movHZ; float factor_movVR; float factor_spinVR; float factor_spinHZ; float factor_spinCWCCW; char fwd; char backwd; char strf_left; char strf_right; char ascent; char descent; char spin_nosedown; char spin_noseup; char spin_left; char spin_right; char spin_CCW; char spin_CW; } ship_ctl; typedef struct { vector3 * piggyback; vector3 piggyback_despl; } pggy_ctl; typedef struct { bool orientGRVTY; bool viewSUP; } cam_restr; typedef struct { fllow_mod follow_model; float displ_factor; float spin_factor; float dist_max_objHZ; float dist_max_objVR; float dist_min_objHZ; float dist_min_objVR; } fllow_ctl; typedef struct { cam_mod mode; vector3 pos; vector3 dir; vector3 dirv; vector3 dirhz; vector3 * objective; vector3 * grvty; fllow_ctl follow_ctl; pggy_ctl piggy_ctl; ship_ctl dsc_ctl; cam_restr restr; } cam_ctl; void init_cam_ctl_def(cam_ctl * cam); void update_cam_auto(cam_ctl * cam); //void actualizar_cam_giros(cam_ctl * cam, nave_ctl &giros); #endif