33 static double range_max_limit = 300e3;
49 : mode(MODE_COCKPIT), requested_mode(MODE_NONE), old_mode(MODE_NONE),
50 sim(0), ship(0), region(0), external_ship(0), external_body(0),
51 virt_az(0), virt_el(0), virt_x(0), virt_y(0), virt_z(0),
52 azimuth(
PI/4), elevation(
PI/4), az_rate(0), el_rate(0), range_rate(0),
53 range(0), range_min(100), range_max(range_max_limit),
54 base_range(0), transition(0), hud(0)
195 static const char* get_camera_mode_name(
int m)
219 return get_camera_mode_name(m);
240 return get_camera_mode_name(m);
271 return range_max_limit;
313 if (c_ship && !current) {
317 else if (current && c_ship == current) {
519 const double alimit = 3*
PI/4;
520 const double e_lo =
PI/8;
521 const double e_hi =
PI/3;
522 const double escale = e_hi;
557 const double alimit = 3*
PI/4;
573 const double e_lo =
PI/8;
574 const double e_hi =
PI/3;
594 else if (azimuth < -
PI)
603 const double limit = (0.43 *
PI);
638 if (range < external_body->Radius() * 2)
688 return "CameraDirector";
886 double bleed = fvaz * 2;
934 velocity * chase.
y * step +
1002 if (seconds < 0) seconds = 0;
1003 else if (seconds > 0.2) seconds = 0.2;
1016 Point neg(1e9, 1e9, 1e9);
1017 Point pos(-1e9, -1e9, -1e9);
1023 if (loc.
x < neg.
x) neg.
x = loc.
x;
1024 if (loc.
x > pos.
x) pos.
x = loc.
x;
1025 if (loc.
y < neg.
y) neg.
y = loc.
y;
1026 if (loc.
y > pos.
y) pos.
y = loc.
y;
1027 if (loc.
z < neg.
z) neg.
z = loc.
z;
1028 if (loc.
z > pos.
z) pos.
z = loc.
z;
1031 double dx = pos.
x - neg.
x;
1032 double dy = pos.
y - neg.
y;
1033 double dz = pos.
z - neg.
z;
1045 cpos = neg +
Point(dx/2, dy/2, dz/2);
1081 if (fabs(az-az0) >
PI) az0 -= 2*
PI;
1120 double dx = er * sin(az) * cos(el);
1121 double dy = er * cos(az) * cos(el);
1122 double dz = er * sin(el);
1129 double cam_agl = cloc.
y - terrain->
Height(cloc.
x, cloc.
z);
1132 cloc.
y = terrain->
Height(cloc.
x, cloc.
z) + 100;