const Player::SpriteState Player::getSpriteState() const { return SpriteState( getMotionType(), horizontal_facing_, vertical_facing(), walking_animation_.stride() ); }
linearMotion::linearMotion(std::string canonL, machineStatus prevStatus): canonMotion(canonL,prevStatus) { status.setMotionType(getMotionType()); status.setEndPose(getPoseFromCmd()); //Point start, end; start = status.getStartPose().loc + status.getOrigin().loc; end = status.getEndPose().loc + status.getOrigin().loc; #ifdef MULTI_AXIS //Point startDir, endDir; // startDir = (status.getStartPose().dir + status.getOrigin().dir) * (SIGN * PI/180.0); startDir.x = (status.getStartPose().dir.x + status.getOrigin().dir.x) * (SIGN_A * PI/180.0); startDir.y = (status.getStartPose().dir.y + status.getOrigin().dir.y) * (SIGN_B * PI/180.0); startDir.z = (status.getStartPose().dir.z + status.getOrigin().dir.z) * (SIGN_C * PI/180.0); // endDir = (status.getEndPose().dir + status.getOrigin().dir) * (SIGN * PI/180.0); endDir.x = (status.getEndPose().dir.x + status.getOrigin().dir.x) * (SIGN_A * PI/180.0); endDir.y = (status.getEndPose().dir.y + status.getOrigin().dir.y) * (SIGN_B * PI/180.0); endDir.z = (status.getEndPose().dir.z + status.getOrigin().dir.z) * (SIGN_C * PI/180.0); #endif }
bool Player::is_gun_up() const { return (getMotionType() == MotionType::WALKING) && (walking_animation_.stride() != StrideType::MIDDLE); }