fb:porticula NoPaste
HighSpeed 3D-Rendering - test
Uploader: | AndT |
Datum/Zeit: | 04.12.2007 17:00:04 |
'Highspeed 3D-Rendering - test
'Programmed by AndT
Type XYObj
X as double
Y as double
end type
Type XYZObj
X as double
Y as double
Z as double
end type
Type IntObj
X as Integer
Y AS INTEGER
end type
SUB Viereck(BYVAL ax AS DOUBLE,BYVAL ay AS DOUBLE,BYVAL az AS DOUBLE,BYVAL col AS INTEGER)
LINE (ax,ay)-(ax+az,ay+az),col,bf
END SUB
Dim as XYZObj Cam1
DIM AS IntObj Mouse
Dim as XYObj ScrRes = (1024,768) ' Auflösung
Dim as XYObj ScrResHalf = (ScrRes.X/2,ScrRes.Y/2)
DIm as XYZObj Obj1 = (ScrResHalf.X,ScrResHalf.Y,100) 'XY for Obj1
DIM AS XYObj tst
Screenres ScrRes.X,ScrRes.Y
setmouse ,,0
DO
setmouse ScrResHalf.X,ScrResHalf.Y
sleep 1 'Needed!
Viereck(obj1.x+cam1.x,obj1.y+cam1.y,obj1.Z,0)
Viereck(obj1.x+cam1.x/2,obj1.y+cam1.y/2,obj1.Z,0)
Line (obj1.x+cam1.x,obj1.y+cam1.y)-(obj1.x+cam1.x/2,obj1.y+cam1.y/2),0
getmouse Mouse.X,Mouse.Y
tst.X=Mouse.X-ScrResHalF.X
tst.Y=Mouse.Y-ScrResHalF.Y
cam1.X+=tst.X/2
cam1.Y+=tst.Y/2
Viereck(obj1.x+cam1.x/2,obj1.y+cam1.y/2,obj1.Z/2,11)
Line (obj1.x+cam1.x,obj1.y+cam1.y)-(obj1.x+cam1.x/2,obj1.y+cam1.y/2),15
Viereck(obj1.x+cam1.x,obj1.y+cam1.y,obj1.Z,12)
LOOP until multikey(&h01)