Public Member Functions | |
CameraConfig () | |
void | load (const std::string &filename) |
Public Attributes | |
int | xmode |
int | ymode |
float | kirby_rectsize_x |
float | kirby_rectsize_y |
float | target_x |
float | target_y |
float | max_speed_x |
float | max_speed_y |
float | dynamic_max_speed_x |
float | dirchange_time |
float | edge_x |
float | sensitive_x |
float | clamp_x |
float | clamp_y |
float | dynamic_speed_sm |
Definition at line 37 of file camera.cpp.
CameraConfig::CameraConfig | ( | ) | [inline] |
Definition at line 69 of file camera.cpp.
00069 : 00070 xmode(4), 00071 ymode(3), 00072 kirby_rectsize_x(0.2f), 00073 kirby_rectsize_y(0.34f), 00074 target_x(.5f), 00075 target_y(.5f), 00076 max_speed_x(100), 00077 max_speed_y(100), 00078 dynamic_max_speed_x(1.0), 00079 dirchange_time(0.2f), 00080 edge_x(0.4f), 00081 sensitive_x(-1), 00082 clamp_x(0.1666f), 00083 clamp_y(0.3f), 00084 dynamic_speed_sm(0.8f) 00085 { 00086 }
void CameraConfig::load | ( | const std::string & | filename | ) | [inline] |
Definition at line 88 of file camera.cpp.
References clamp_x, clamp_y, dirchange_time, dynamic_max_speed_x, dynamic_speed_sm, edge_x, lisp::Lisp::get(), lisp::Lisp::get_lisp(), kirby_rectsize_x, kirby_rectsize_y, max_speed_x, max_speed_y, lisp::Parser::parse(), sensitive_x, target_x, target_y, xmode, and ymode.
Referenced by Camera::reload_config().
00089 { 00090 lisp::Parser parser; 00091 const lisp::Lisp* root = parser.parse(filename); 00092 const lisp::Lisp* camconfig = root->get_lisp("camera-config"); 00093 if(camconfig == NULL) 00094 throw std::runtime_error("file is not a camera config file."); 00095 00096 camconfig->get("xmode", xmode); 00097 camconfig->get("ymode", ymode); 00098 camconfig->get("target-x", target_x); 00099 camconfig->get("target-y", target_y); 00100 camconfig->get("max-speed-x", max_speed_x); 00101 camconfig->get("max-speed-y", max_speed_y); 00102 camconfig->get("dynamic-max-speed-x", dynamic_max_speed_x); 00103 camconfig->get("dirchange-time", dirchange_time); 00104 camconfig->get("clamp-x", clamp_x); 00105 camconfig->get("clamp-y", clamp_y); 00106 camconfig->get("kirby-rectsize-x", kirby_rectsize_x); 00107 camconfig->get("kirby-rectsize-y", kirby_rectsize_y); 00108 camconfig->get("edge-x", edge_x); 00109 camconfig->get("sensitive-x", sensitive_x); 00110 camconfig->get("dynamic-speed-sm", dynamic_speed_sm); 00111 }
float CameraConfig::target_x |
float CameraConfig::target_y |
float CameraConfig::edge_x |
float CameraConfig::clamp_x |
float CameraConfig::clamp_y |