4 Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb
,
6 : orb_ (CORBA::ORB::_duplicate (orb
)),
13 Simple_Server_i::set_x_angle (CORBA::Long x
)
15 this->window_
->set_x_angle (x
);
19 Simple_Server_i::set_y_angle (CORBA::Long y
)
21 this->window_
->set_y_angle (y
);
25 Simple_Server_i::shutdown (void)
27 this->orb_
->shutdown (0);
30 // ****************************************************************
32 Simple_Window::Simple_Window (int x
, int y
,
35 : Fl_Gl_Window (x
, y
, w
, h
, l
),
39 boxv0
[0] = -0.5; boxv0
[1] = -0.5; boxv0
[2] = -0.5;
40 boxv1
[0] = 0.5; boxv1
[1] = -0.5; boxv1
[2] = -0.5;
41 boxv2
[0] = 0.5; boxv2
[1] = 0.5; boxv2
[2] = -0.5;
42 boxv3
[0] = -0.5; boxv3
[1] = 0.5; boxv3
[2] = -0.5;
43 boxv4
[0] = -0.5; boxv4
[1] = -0.5; boxv4
[2] = 0.5;
44 boxv5
[0] = 0.5; boxv5
[1] = -0.5; boxv5
[2] = 0.5;
45 boxv6
[0] = 0.5; boxv6
[1] = 0.5; boxv6
[2] = 0.5;
46 boxv7
[0] = -0.5; boxv7
[1] = 0.5; boxv7
[2] = 0.5;
50 Simple_Window::set_x_angle (CORBA::Long x
)
57 Simple_Window::set_y_angle (CORBA::Long y
)
64 Simple_Window::draw (void)
66 // Based on the CubeView example in the FL toolkit.
71 glViewport(0, 0, this->w(), this->h());
72 glOrtho(-2,2,-2,2,-20000,10000);
74 glBlendFunc(GL_SRC_ALPHA
, GL_ONE_MINUS_SRC_ALPHA
);
77 glClear(GL_COLOR_BUFFER_BIT
| GL_DEPTH_BUFFER_BIT
);
81 glRotatef(this->x_angle_
, 0, 1, 0);
82 glRotatef(this->y_angle_
, 1, 0, 0);
90 Simple_Window::draw_cube (void)
92 const float ALPHA
= 0.5;
95 glColor4f(0.0, 0.0, 1.0, ALPHA
);
101 glColor4f(1.0, 1.0, 0.0, ALPHA
);
107 glColor4f(0.0, 1.0, 1.0, ALPHA
);
113 glColor4f(1.0, 0.0, 0.0, ALPHA
);
119 glColor4f(1.0, 0.0, 1.0, ALPHA
);
125 glColor4f(0.0, 1.0, 0.0, ALPHA
);
132 glColor3f(1.0, 1.0, 1.0);