Class TForm1 (unit TLTest) |
Inherits from
TForm
Code by Massimo Bardetti - bigben@dircon.co.uk (12 March 1997) // Problems : WindowMoves are not detected by the component Window resizes are but once the screen is resized the animation is slower This is because every resize I should re-create the front and Back surface instead of only updating the rect information. Use arrow keys to translate the camera Use Shift+arrow keys to rotate the camera Use F2 to add more objects to the scene Use Esc or F1 to stop
procedure AddObject(EBRoot : TExecuteBuffer; xoff, yoff, zoff : single; rspeed : single);
This function add two execute buffers to the EB passed in the parameters You can offset the object and set the speed of rotation The final EB tree structure will look like : // // EB (First EB executed only once) | EB (Second EB set view trans and material) | --------------------- | | | | EB EB EB EB (Third level of EBs add world transf and first obj) | | | | EB EB EB EB (Fourth level of EBs add second object) // // The execution will start from the root and will always follow the leftmost branch EB
procedure AppKeyDown(var Msg: TMsg; var Handled: Boolean);
Process key pressed , same as the other demo
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
(tmpTriangle);
procedure SpeedButton1Click(Sender: TObject);
CheckScreen : TCheckBox;
Direct3DIM1 : TDirect3DIM;
Edit1 : TEdit;
GroupBox1 : TGroupBox;
GroupBox2 : TGroupBox;
Label1 : TLabel;
Panel1 : TPanel;
SpeedButton1 : TSpeedButton;
procedure AddObject(EBRoot : TExecuteBuffer; xoff, yoff, zoff : single; rspeed : single);
This function add two execute buffers to the EB passed in the parameters You can offset the object and set the speed of rotation The final EB tree structure will look like : // // EB (First EB executed only once) | EB (Second EB set view trans and material) | --------------------- | | | | EB EB EB EB (Third level of EBs add world transf and first obj) | | | | EB EB EB EB (Fourth level of EBs add second object) // // The execution will start from the root and will always follow the leftmost branch EB
procedure AppKeyDown(var Msg: TMsg; var Handled: Boolean);
Process key pressed , same as the other demo
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
(tmpTriangle);
procedure SpeedButton1Click(Sender: TObject);
CheckScreen : TCheckBox;
Direct3DIM1 : TDirect3DIM;
Edit1 : TEdit;
GroupBox1 : TGroupBox;
GroupBox2 : TGroupBox;
Label1 : TLabel;
Panel1 : TPanel;
SpeedButton1 : TSpeedButton;