Курсовая работа: Управление элементами поверхности
z:=j*zoom;
glPointSize (1);
glBindTexture (GL_TEXTURE_2D, MyTextureTex);
glBegin (GL_QUADS);
glTexCoord2f (0.0, 0.0); glVertex3f (x, height [i, j], z);
glTexCoord2f (1.0, 0.0); glVertex3f (x, height [i, j+1], z+zoom);
glTexCoord2f (1.0, 1.0); glVertex3f (x+Zoom, height [i+1, j+1], z+zoom);
glTexCoord2f (0.0, 1.0); glVertex3f (x+Zoom, height [i+1, j], z);
glEnd;
end;
end;
procedure TForm1. FormKeyDown (Sender: TObject; var Key: Word;
Shift: TShiftState);
const
SPEED=0.2;
begin
case key of
27: Form1. Close;
65: begin
Human. Position.z:=Human. Position.z+
sin (DegToRad(Human. Rotation.y))*SPEED;
Human. Position.x:=Human. Position.x+
cos (DegToRad(Human. Rotation.y))*SPEED;
end;
87: begin
Human. Position.z:=Human. Position.z+
cos (DegToRad(Human. Rotation.y))*SPEED;
Human. Position.x:=Human. Position.x-
sin (DegToRad(Human. Rotation.y))*SPEED;