/* * Blocky humanoid robot (better known as "Lanjobot") * * Copyright (C) 2006-2008 Alejandro Valenzuela Roca & Hugo Mendieta Pacheco * * lanjoe9@mexinetica.com, scherezar_crusade@hotmail.com * * * 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 LANJOBOT_H #define LANJOBOT_H /* Bibliotecas empleadas */ #include "support.h" #include "objects.h" enum ljbot_action{LJBOT_INACTIVE, LJBOT_WALK, LJBOT_RUN, LJBOT_JMP_FALL, LJBOT_PUNCH}; /*Estructuras que guardan los ángulos*/ typedef struct { float neck_x; float neck_z; float neck_rot; } head_angles; typedef struct { float arm_x; float arm_z; float arm_rot; float elbow_x; float elbow_rot; float munieca_x; } arm_angles; typedef struct { float flex_x; float flex_z; float rot; } torax_angles; typedef struct { float thigh_x; float thigh_z; float thigh_rot; float knee; float foot_z; float foot_rot; } leg_angles; typedef struct { head_angles head; arm_angles b_left; arm_angles b_right; torax_angles torax; leg_angles left_l; leg_angles right_l; float anim_angle; } ljbot_angles; /*Declaración de funciones*/ void lanjobot(ljbot_angles & parameters, vector3 * color1, vector3 * color2); void ljbot_set_angles(ljbot_angles * parameters, float c_x, float c_z, float c_r, float bi_x, float bi_z, float bi_r, float ci_x, float ci_r, float mi_x, float bd_x, float bd_z, float bd_r, float cd_x, float cd_r, float md_x, float tf_x, float tf_z, float t_r, float pim_x, float pim_z, float pim_r, float ri, float pip_x, float pip_r, float pdm_x, float pdm_z, float pdm_r, float rd, float pdp_x, float pdp_r); void ljbot_base_pose(ljbot_angles * parameters); void ljbot_leg( leg_angles & params_p, int izq, vector3 * color1, vector3 * color2); void ljbot_arm( arm_angles & params_b, int isRightArm, vector3 * color1, vector3 * color2); void ljbot_anim(ljbot_angles * parameters, float t_elapsed, ljbot_action accion); #endif