24 #include "wx/msw/wrapwin.h"
47 if (e.ButtonIsDown(wxMOUSE_BTN_ANY))
55 if (e.ButtonIsDown(wxMOUSE_BTN_MIDDLE))
60 if (ey >=
M_PI / 2.0) { ey =
M_PI / 2.0 - 0.0001; }
61 if (ey <= -
M_PI / 2.0) { ey = -
M_PI / 2.0 + 0.0001; }
68 if (ey >=
M_PI / 2.0) { ey =
M_PI / 2.0 - 0.0001; }
69 if (ey <= -
M_PI / 2.0) { ey = -
M_PI / 2.0 + 0.0001; }
78 if (ey >=
M_PI / 2.0) { ey =
M_PI / 2.0 - 0.0001; }
79 if (ey <= -
M_PI / 2.0) { ey = -
M_PI / 2.0 + 0.0001; }
123 state->
setR((state->
getR() - radius) / scale + radius);
130 state->
setR((state->
getR() - radius) * scale + radius);
158 if (e.GetWheelRotation() != 0)
176 if (modifiers == wxMOD_CMD) {
177 if (keycode == WXK_ADD) {
179 }
else if (keycode == WXK_SUBTRACT) {
199 double d = state->
getR();
201 int tcanv_w, tcanv_h;
202 state->
GetViewer()->GetClientSize(&tcanv_w,&tcanv_h);
204 double canv_w, canv_h;
208 double fov = state->
getFOV();
211 if (canv_w > canv_h) {
213 fovx = 2 * atan( tan(fovy / 2.0) * canv_w / canv_h);
216 fovy = 2 * atan( tan(fovx / 2.0) * canv_h / canv_w);
220 vis_w = 2.0 * tan ( fovx / 2.0 ) * d;
221 vis_h = 2.0 * tan ( fovy / 2.0 ) * d;
224 double prim_x, prim_y;
225 prim_x = (double) x / canv_w * vis_w - vis_w / 2.0 +
start_pos_x;
226 prim_y = ((double) y / canv_h * vis_h - vis_h / 2.0 -
start_pos_y);
242 if (((e.CmdDown() || e.AltDown()) && e.LeftDown()) || e.MiddleDown()) {
249 if (e.LeftUp() || e.MiddleUp()) {
270 if (e.GetWheelRotation() != 0) {
277 if (modifiers == wxMOD_CMD) {
278 if (keycode == WXK_ADD) {
280 }
else if (keycode == WXK_SUBTRACT) {
void setFOV(double newFOV)
void setAngX(double angx_in)
void ForceRequireRedraw()
void setAngY(double angy_in)