-
Notifications
You must be signed in to change notification settings - Fork 0
/
screen.s3d
69 lines (63 loc) · 1.07 KB
/
screen.s3d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
class screen
{
var x_dim;
var y_dim;
var angle;
var obj_screen;
var x_axes;
var y_axes;
var status;
move();
full();
init();
direction();
direction_ud();
direction_lr();
close();
};
function screen::init()
{
x_axes = 0;
y_axes = 0;
angle = 0;
status = TRUE;
obj_screen = CVmWebBrowser();
full();
var dim_s = obj_screen.GetSize();
x_dim = dim_s[0];
y_dim = dim_s[1];
}
function screen::full()
{
if(status)
obj_screen.FullScreen(TRUE);
else
obj_screen.FullScreen(FALSE);
status = !status;
}
function screen::move()
{
var x = 0;
var y = 0;
x =-(Mouse.X-x_dim/2)*0.15;
y = -(Mouse.Y-y_dim/2)*0.002;
x_axes += x;
y_axes += y;
angle += x;
}
function screen::direction()
{
return [sin(x_axes*GRAD_TO_RAD),0,cos(x_axes*GRAD_TO_RAD)];
}
function screen::direction_ud()
{
return [sin(x_axes*GRAD_TO_RAD),y_axes,cos(x_axes*GRAD_TO_RAD)];
}
function screen::direction_lr()
{
return [-sin((90-angle)*GRAD_TO_RAD),0,cos((90-angle)*GRAD_TO_RAD)];
}
function screen::close()
{
obj_screen.Quit();
}