forked from Metalab/The-Flying-Camera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plane.rb
40 lines (37 loc) · 924 Bytes
/
Plane.rb
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
#
# Plane.rb
# CtF
#
# Created by Thomas R. Koll on 10.12.10.
# Copyright (c) 2010 ananasblau. All rights reserved.
#
class Plane
# It's an airplane!
def self.draw
# Body
glBegin(GL_QUADS)
glVertex3f( 0.025, -0.01, 0.0);
glVertex3f( 0.025, 0.01, 0.0);
glVertex3f(-0.09, 0.01, 0.0);
glVertex3f(-0.09, -0.01, 0.0);
glVertex3f( 0.025, -0.01, 0.0);
glEnd
# Tail
glBegin(GL_QUADS)
glVertex3f(-0.07, -0.03, 0.0);
glVertex3f(-0.07, 0.03, 0.0);
glVertex3f(-0.08, 0.03, 0.0);
glVertex3f(-0.08, -0.03, 0.0);
glVertex3f(-0.07, -0.03, 0.0);
glEnd
# Main wing
glColor3f(0.5,0.5,0.5)
glBegin(GL_QUADS)
glVertex3f( 0.01, -0.07, 0.0);
glVertex3f( 0.01, 0.07, 0.0);
glVertex3f(-0.02, 0.07, 0.0);
glVertex3f(-0.02, -0.07, 0.0);
glVertex3f( 0.01, -0.07, 0.0);
glEnd
end
end