Курсовая работа: Управление элементами поверхности
68: 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;
83: 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;
end;
end;
end;
procedure SetDCPixelFormat;
var
pfd:TPixelFormatDescriptor;
nPixelFormat: Integer;
begin
FillChar (pfd, SizeOf(pfd), 0);
pfd.dwFlags:=PFD_DRAW_TO_WINDOW or
PFD_DOUBLEBUFFER or
PFD_SUPPORT_OPENGL;
nPixelFormat:=ChoosePixelFormat (DC,@pfd);
SetPixelFormat (DC, nPixelFormat,@pfd);
end;
procedure TForm1. Button1Click (Sender: TObject);
begin
Human. Rotation.y:=Human. Rotation.y-4;