Enter your email address:

Delivered by

Uploud File di Ziddu dan dapat uang broo
Uploud File di Deposit Files

Kelompok 1 Transformasi 3D

Label:

GAMBAR TRANFORMASI 3D







































unit Unit1;


interface
....
....
var
Form1: TForm1;
scr : tbitmap;
implementation
uses math,tridi;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
scr:=tbitmap.create;
scr.width:=320;
scr.height:=240;
scr.PixelFormat:=pf32bit;
end;

end.

{$i getresult}
var scene:tscene;
gruplampu:tlightgroup;
lampu:array[0..10] of tbaselight;
tank:tobj3d;
procedure initgame;
begin
tank:=tobj3d.create;
loadmodel(tank,'tank1.obj',0);

textures[0]:=ttexture.createsolid($ffffff);

scene:=tscene.create(320,240);

gruplampu:=tlightgroup.create(scene,255,255,255);
lampu[0]:=tsunlight.create(gruplampu,-50,50,-200,50,0);

end;
procedure gameloop;
begin
scene.reset;
scene.addlights(gruplampu);
camx:=0;
camy:=0;
camz:=-1000;
tank.rotate(1,0,0);
tank.submit;
scene.uploadgeom(@vertexs[0],@faces[0],wnv,wnf);
scene.drawscene(true,1+2);
scene.uploadlight;
scene.modulate;
end;

// kode ditambahkan pada form create
procedure TForm1.FormCreate(Sender: TObject);
begin
scr:=tbitmap.create;
scr.width:=320;
scr.height:=240;
scr.PixelFormat:=pf32bit;
initgame;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
gameloop;
getresult(scr,scene);
canvas.Draw(0,0,scr);
end;



0 komentar:

Posting Komentar


ShoutMix chat widget