4 Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb
,
6 : orb_ (CORBA::ORB::_duplicate (orb
)),
12 Simple_Server_i::set_x_angle (CORBA::Long x
)
14 this->window_
->set_x_angle (x
);
18 Simple_Server_i::set_y_angle (CORBA::Long y
)
20 this->window_
->set_y_angle (y
);
24 Simple_Server_i::shutdown ()
26 this->orb_
->shutdown (false);
29 // ****************************************************************
31 Simple_Window::Simple_Window (int x
, int y
,
34 : Fl_Gl_Window (x
, y
, w
, h
, l
),
38 boxv0
[0] = -0.5; boxv0
[1] = -0.5; boxv0
[2] = -0.5;
39 boxv1
[0] = 0.5; boxv1
[1] = -0.5; boxv1
[2] = -0.5;
40 boxv2
[0] = 0.5; boxv2
[1] = 0.5; boxv2
[2] = -0.5;
41 boxv3
[0] = -0.5; boxv3
[1] = 0.5; boxv3
[2] = -0.5;
42 boxv4
[0] = -0.5; boxv4
[1] = -0.5; boxv4
[2] = 0.5;
43 boxv5
[0] = 0.5; boxv5
[1] = -0.5; boxv5
[2] = 0.5;
44 boxv6
[0] = 0.5; boxv6
[1] = 0.5; boxv6
[2] = 0.5;
45 boxv7
[0] = -0.5; boxv7
[1] = 0.5; boxv7
[2] = 0.5;
49 Simple_Window::set_x_angle (CORBA::Long x
)
56 Simple_Window::set_y_angle (CORBA::Long y
)
63 Simple_Window::draw ()
65 // Based on the CubeView example in the FL toolkit.
70 glViewport(0, 0, this->w(), this->h());
71 glOrtho(-2,2,-2,2,-20000,10000);
73 glBlendFunc(GL_SRC_ALPHA
, GL_ONE_MINUS_SRC_ALPHA
);
76 glClear(GL_COLOR_BUFFER_BIT
| GL_DEPTH_BUFFER_BIT
);
80 glRotatef(this->x_angle_
, 0, 1, 0);
81 glRotatef(this->y_angle_
, 1, 0, 0);
89 Simple_Window::draw_cube ()
91 const float ALPHA
= 0.5;
94 glColor4f(0.0, 0.0, 1.0, ALPHA
);
100 glColor4f(1.0, 1.0, 0.0, ALPHA
);
106 glColor4f(0.0, 1.0, 1.0, ALPHA
);
112 glColor4f(1.0, 0.0, 0.0, ALPHA
);
118 glColor4f(1.0, 0.0, 1.0, ALPHA
);
124 glColor4f(0.0, 1.0, 0.0, ALPHA
);
131 glColor3f(1.0, 1.0, 1.0);