- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
glpushmatrix;
if ((commandflat=2)and((commandaxis=2) or(commandaxis=3)))or((commandflat=1)and(commandaxis=1)) then
glrotatef(faza,rotation[0],rotation[1],rotation[2]);
glcolor3f(kubcol[Y[2,1,1]].R,kubcol[Y[2,1,1]].G,kubcol[Y[2,1,1]].B);
glbegin(gl_quads);
glvertex3f(-1.5,1.5,1.5);
glvertex3f(-1.5,1.5,0.5);
glvertex3f(-0.5,1.5,0.5);
glvertex3f(-0.5,1.5,1.5);
glend;
glcolor3f(kubcol[X[1,1,1]].R,kubcol[X[1,1,1]].G,kubcol[X[1,1,1]].B);
glbegin(gl_quads);
glvertex3f(-1.5,1.5,1.5);
glvertex3f(-1.5,1.5,0.5);
glvertex3f(-1.5,0.5,0.5);
glvertex3f(-1.5,0.5,1.5);
glend;
glcolor3f(kubcol[Z[2,1,1]].R,kubcol[Z[2,1,1]].G,kubcol[Z[2,1,1]].B);
glbegin(gl_quads);
glvertex3f(-1.5,1.5,1.5);
glvertex3f(-0.5,1.5,1.5);
glvertex3f(-0.5,0.5,1.5);
glvertex3f(-1.5,0.5,1.5);
glend;
glcolor3f(0.5,0.5,0.5);
glbegin(gl_quads);
glvertex3f(-1.5,0.5,1.5);
glvertex3f(-1.5,0.5,0.5);
glvertex3f(-0.5,0.5,0.5);
glvertex3f(-0.5,0.5,1.5);
glend;
glcolor3f(0.5,0.5,0.5);
glbegin(gl_quads);
glvertex3f(-0.5,1.5,1.5);
glvertex3f(-0.5,1.5,0.5);
glvertex3f(-0.5,0.5,0.5);
glvertex3f(-0.5,0.5,1.5);
glend;
glcolor3f(0.5,0.5,0.5);
glbegin(gl_quads);
glvertex3f(-1.5,1.5,0.5);
glvertex3f(-0.5,1.5,0.5);
glvertex3f(-0.5,0.5,0.5);
glvertex3f(-1.5,0.5,0.5);
glend;
glpopmatrix;
///////112
Захотел как то кубик рубика накодить, это фрагмент модуля из 1214 строк который выводит 26 кубиков. Цвет лицевых граней берется из массива, остальные - серые.
StriderMan 14.02.2011 10:30 # +1
bildja 14.02.2011 12:05 # −1
Lure Of Chaos 14.02.2011 12:46 # −1
StriderMan 14.02.2011 14:20 # 0
bildja 14.02.2011 15:41 # 0
StriderMan 14.02.2011 15:45 # +2
stormarch 14.02.2011 14:17 # 0
CHayT 15.02.2011 17:20 # 0
bugmenot 14.02.2011 14:47 # 0
Lure Of Chaos 14.02.2011 15:00 # 0
Bo3MyIIIeHHbIu_nemyx 25.08.2021 17:54 # 0