unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, GLScene, GLMisc, GLVectorFileObjects, GLWin32Viewer, GLFileSTL,
Menus, ComCtrls, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
GLScene1: TGLScene;
GLSceneViewer1: TGLSceneViewer;
GLFreeForm1: TGLFreeForm;
GLLightSource1: TGLLightSource;
GLCamera1: TGLCamera;
MainMenu1: TMainMenu;
N1: TMenuItem;
Laden1: TMenuItem;
Beenden1: TMenuItem;
TrackBar1: TTrackBar;
TrackBar2: TTrackBar;
TrackBar3: TTrackBar;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
OpenDialog1: TOpenDialog;
procedure Beenden1Click(Sender: TObject);
procedure Laden1Click(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure TrackBar2Change(Sender: TObject);
procedure TrackBar3Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure GLSceneViewer1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure GLSceneViewer1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
procedure GLSceneViewer1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
Massstab: Integer;
Roll: Integer;
Turn: Integer;
sx,sy,ex,ey: Integer;
Markieren:boolean;
public
{ Public declarations }
end;
Var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Massstab:=TrackBar1.Position;
Roll:=TrackBar2.Position;
Turn:=TrackBar3.Position;
end;
procedure TForm1.Beenden1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Laden1Click(Sender: TObject);
begin
Form1.OpenDialog1.Title:='Waehlen Sie bitte eine STL-Datei';
Form1.OpenDialog1.InitialDir:='C:\';
Form1.OpenDialog1.Filter:='STL Files in
ASCII Format(*.stl)|*.stl';
Form1.OpenDialog1.Execute;
GLFreeForm1.LoadFromFile(OpenDialog1.FileName);
GLFreeForm1.Scale.Scale(0.5) ;
GLFreeForm1.Roll(0);
GLFreeForm1.Turn(0);
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
Massstab:=TrackBar1.Position;
GLFreeForm1.Scale.Normalize;
GLFreeForm1.Scale.Scale(Massstab/10);
end;
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
Roll:=TrackBar2.Position;
GLFreeForm1.Rotation.Normalize;
GLFreeForm1.Roll(Roll);
GLFreeForm1.Turn(Turn);
end;
procedure TForm1.TrackBar3Change(Sender: TObject);
begin
Turn:=TrackBar3.Position;
GLFreeForm1.Rotation.Normalize;
GLFreeForm1.Roll(Roll);
GLFreeForm1.Turn(Turn);
end;
procedure TForm1.GLSceneViewer1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
//bitte euren Text hier einfügen!!!
end;
procedure TForm1.GLSceneViewer1MouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
begin
//bitte euren Text hier einfügen!!!
end;
procedure TForm1.GLSceneViewer1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
//bitte euren Text hier einfügen!!!
end;
end.