home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Homebrewer's Handbook
/
vr.iso
/
vroom
/
clock.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-03-19
|
1KB
|
36 lines
unit clock;
interface
uses vroom;
type clock_3d=object
face, hand1, hand2 : file_object3d;
h1r, h2r : real;
procedure Init(x1, y1, z1, h1rottime, h2rottime : real);
end;
implementation
procedure clock_3d.Init(x1, y1, z1, h1rottime, h2rottime : real);
begin
face.Init('clkface.3d');
face.Set_Reference_Point(0,0,0);
face.RotateZ(-90);
hand1.Init('clkhand.3d');
hand1.Set_Reference_Point(0,0,0);
hand1.Translate(0.5,0,0);
hand1.RotateX((round(graphics_time^) mod round (h1rottime))*(-360/h1rottime));
hand2.Init('clkhand.3d');
hand2.Set_Reference_Point(0,0,0);
hand2.Scale(1,1,0.8);
hand2.Translate(0.5,0,0);
hand2.RotateX((round(graphics_time^) mod round (h2rottime))*(-360/h2rottime));
face.AddChild(@hand1);
face.AddChild(@hand2);
face.MoveTo(x1,y1,z1);
hand1.Timed_RotateX_At(-360/h1rottime,now,infinity);
hand2.Timed_RotateX_At(-360/h2rottime,now,infinity);
end;
end.