nukem
06-12-2002, 02:59 PM
I wrote a 3d character file and when I load it with the code to draw a solid form the simpal shapes (triangle, square both 2d) draw fine but the more advanced shapes (a gun 3d) dosnt seem to work. Is there a way to make my code draw the more advanced shapes with being so screwed up or is there a diffrent way of making the file(changing the coords in the file) that I should do.
Wire gun
http://zonkbonk.virtualave.net/wiregun.jpg
Solid gun
http://zonkbonk.virtualave.net/gun.jpg
Here is the coords file it goes
Point_ID
X
Y
Z
25
0
0
0
24
0
0
-0.2
23
0.4
0
-0.2
22
0.4
0
0
21
0.4
0
-0.2
20
0.4
0.6
-0.2
19
0.4
0.6
0
18
0.4
0.6
-0.2
17
1.1
0.6
-0.2
16
1.1
0.6
0
15
1.1
0.6
-0.2
14
1.1
.8
-0.2
13
1.1
.8
0
12
1.1
0.8
-0.2
11
0
0.8
-0.2
10
0
0.8
0
9
0
0.8
-0.2
8
0
0
-0.2
7
0
0
0
6
0.4
0
0
5
0.4
0.6
0
4
1.1
0.6
0
3
1.1
0.8
0
2
0
0.8
0
1
0
0
0
0
Here is the code to draw it
void Draw()
{
AXIS axy;
int a = 0;
glBegin(GL_QUADS);
//glBegin(GL_TRIANGLES);
while(Print(ngc, a, &axy))
{
glVertex3f(axy.x, axy.y, axy.z);
a++;
}
glEnd();
}
thx
nuke
Wire gun
http://zonkbonk.virtualave.net/wiregun.jpg
Solid gun
http://zonkbonk.virtualave.net/gun.jpg
Here is the coords file it goes
Point_ID
X
Y
Z
25
0
0
0
24
0
0
-0.2
23
0.4
0
-0.2
22
0.4
0
0
21
0.4
0
-0.2
20
0.4
0.6
-0.2
19
0.4
0.6
0
18
0.4
0.6
-0.2
17
1.1
0.6
-0.2
16
1.1
0.6
0
15
1.1
0.6
-0.2
14
1.1
.8
-0.2
13
1.1
.8
0
12
1.1
0.8
-0.2
11
0
0.8
-0.2
10
0
0.8
0
9
0
0.8
-0.2
8
0
0
-0.2
7
0
0
0
6
0.4
0
0
5
0.4
0.6
0
4
1.1
0.6
0
3
1.1
0.8
0
2
0
0.8
0
1
0
0
0
0
Here is the code to draw it
void Draw()
{
AXIS axy;
int a = 0;
glBegin(GL_QUADS);
//glBegin(GL_TRIANGLES);
while(Print(ngc, a, &axy))
{
glVertex3f(axy.x, axy.y, axy.z);
a++;
}
glEnd();
}
thx
nuke