mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 16:29:32 +02:00
fpvectoria: More LAS and 3D viewer improvements
git-svn-id: trunk@35059 -
This commit is contained in:
parent
b428a33960
commit
32a0130105
@ -1,11 +1,11 @@
|
|||||||
object formFPV3D: TformFPV3D
|
object formFPV3D: TformFPV3D
|
||||||
Left = 336
|
Left = 336
|
||||||
Height = 240
|
Height = 376
|
||||||
Top = 171
|
Top = 171
|
||||||
Width = 320
|
Width = 495
|
||||||
Caption = 'formFPV3D'
|
Caption = 'formFPV3D'
|
||||||
ClientHeight = 240
|
ClientHeight = 376
|
||||||
ClientWidth = 320
|
ClientWidth = 495
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '0.9.31'
|
||||||
@ -38,9 +38,9 @@ object formFPV3D: TformFPV3D
|
|||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 5
|
Left = 5
|
||||||
Height = 163
|
Height = 299
|
||||||
Top = 72
|
Top = 72
|
||||||
Width = 310
|
Width = 485
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 5
|
BorderSpacing.Left = 5
|
||||||
BorderSpacing.Right = 5
|
BorderSpacing.Right = 5
|
||||||
@ -56,4 +56,31 @@ object formFPV3D: TformFPV3D
|
|||||||
OnClick = Button1Click
|
OnClick = Button1Click
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
|
object buttonZoomIn: TButton
|
||||||
|
Left = 178
|
||||||
|
Height = 25
|
||||||
|
Top = 38
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Zoom In'
|
||||||
|
OnClick = buttonZoomInClick
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object buttonZoomOut: TButton
|
||||||
|
Left = 261
|
||||||
|
Height = 25
|
||||||
|
Top = 38
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Zoom Out'
|
||||||
|
OnClick = buttonZoomOutClick
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object buttonRotZ: TButton
|
||||||
|
Left = 345
|
||||||
|
Height = 25
|
||||||
|
Top = 38
|
||||||
|
Width = 111
|
||||||
|
Caption = 'Rot Around Z'
|
||||||
|
OnClick = buttonRotZClick
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -14,11 +14,17 @@ type
|
|||||||
|
|
||||||
TformFPV3D = class(TForm)
|
TformFPV3D = class(TForm)
|
||||||
Button1: TButton;
|
Button1: TButton;
|
||||||
buttonLoad: TButton;
|
buttonRotZ: TButton;
|
||||||
|
buttonZoomIn: TButton;
|
||||||
|
|
||||||
|
buttonZoomOut: TButton; buttonLoad: TButton;
|
||||||
editFileName: TFileNameEdit;
|
editFileName: TFileNameEdit;
|
||||||
glControl: TOpenGLControl;
|
glControl: TOpenGLControl;
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
procedure buttonLoadClick(Sender: TObject);
|
procedure buttonLoadClick(Sender: TObject);
|
||||||
|
procedure buttonRotZClick(Sender: TObject);
|
||||||
|
procedure buttonZoomInClick(Sender: TObject);
|
||||||
|
procedure buttonZoomOutClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure glControlPaint(Sender: TObject);
|
procedure glControlPaint(Sender: TObject);
|
||||||
@ -27,6 +33,8 @@ type
|
|||||||
public
|
public
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
VecDoc: TvVectorialDocument;
|
VecDoc: TvVectorialDocument;
|
||||||
|
glAltitude: Integer;
|
||||||
|
glRotateAngle, glRotateX, glRotateY, glRotateZ: Double;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -56,8 +64,10 @@ begin
|
|||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
glTranslatef(0.0, 0.0,-6.0);
|
glTranslatef(0.0, 0.0,-glAltitude);
|
||||||
//glRotatef(100, 220, 330, 0.0);
|
|
||||||
|
if glRotateAngle <> 0 then
|
||||||
|
glRotatef(glRotateAngle, glRotateX, glRotateY, glRotateZ);
|
||||||
|
|
||||||
{ glBegin(GL_QUADS);
|
{ glBegin(GL_QUADS);
|
||||||
glColor3f(0.0,1.0,0.0); // Set The Color To Green
|
glColor3f(0.0,1.0,0.0); // Set The Color To Green
|
||||||
@ -143,6 +153,7 @@ end;
|
|||||||
procedure TformFPV3D.FormCreate(Sender: TObject);
|
procedure TformFPV3D.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
VecDoc := TvVectorialDocument.Create;
|
VecDoc := TvVectorialDocument.Create;
|
||||||
|
glAltitude := 3;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TformFPV3D.buttonLoadClick(Sender: TObject);
|
procedure TformFPV3D.buttonLoadClick(Sender: TObject);
|
||||||
@ -151,6 +162,28 @@ begin
|
|||||||
glControl.Invalidate;
|
glControl.Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TformFPV3D.buttonRotZClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
glRotateAngle := glRotateAngle + 10;
|
||||||
|
glRotateX := 0.0;
|
||||||
|
glRotateY := 0.0;
|
||||||
|
glRotateZ := 1.0;
|
||||||
|
glControl.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TformFPV3D.buttonZoomInClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Dec(glAltitude);
|
||||||
|
if glAltitude < 1 then glAltitude := 1;
|
||||||
|
glControl.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TformFPV3D.buttonZoomOutClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Inc(glAltitude);
|
||||||
|
glControl.Invalidate;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TformFPV3D.Button1Click(Sender: TObject);
|
procedure TformFPV3D.Button1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
glControl.Invalidate;
|
glControl.Invalidate;
|
||||||
|
Loading…
Reference in New Issue
Block a user