fpvectoria: More LAS and 3D viewer improvements

git-svn-id: trunk@35059 -
This commit is contained in:
sekelsenmat 2012-01-31 14:11:53 +00:00
parent b428a33960
commit 32a0130105
2 changed files with 69 additions and 9 deletions

View File

@ -1,11 +1,11 @@
object formFPV3D: TformFPV3D
Left = 336
Height = 240
Height = 376
Top = 171
Width = 320
Width = 495
Caption = 'formFPV3D'
ClientHeight = 240
ClientWidth = 320
ClientHeight = 376
ClientWidth = 495
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '0.9.31'
@ -38,9 +38,9 @@ object formFPV3D: TformFPV3D
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 5
Height = 163
Height = 299
Top = 72
Width = 310
Width = 485
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 5
BorderSpacing.Right = 5
@ -56,4 +56,31 @@ object formFPV3D: TformFPV3D
OnClick = Button1Click
TabOrder = 3
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

View File

@ -14,11 +14,17 @@ type
TformFPV3D = class(TForm)
Button1: TButton;
buttonLoad: TButton;
buttonRotZ: TButton;
buttonZoomIn: TButton;
buttonZoomOut: TButton; buttonLoad: TButton;
editFileName: TFileNameEdit;
glControl: TOpenGLControl;
procedure Button1Click(Sender: TObject);
procedure buttonLoadClick(Sender: TObject);
procedure buttonRotZClick(Sender: TObject);
procedure buttonZoomInClick(Sender: TObject);
procedure buttonZoomOutClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure glControlPaint(Sender: TObject);
@ -27,6 +33,8 @@ type
public
{ public declarations }
VecDoc: TvVectorialDocument;
glAltitude: Integer;
glRotateAngle, glRotateX, glRotateY, glRotateZ: Double;
end;
var
@ -56,8 +64,10 @@ begin
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0, 0.0,-6.0);
//glRotatef(100, 220, 330, 0.0);
glTranslatef(0.0, 0.0,-glAltitude);
if glRotateAngle <> 0 then
glRotatef(glRotateAngle, glRotateX, glRotateY, glRotateZ);
{ glBegin(GL_QUADS);
glColor3f(0.0,1.0,0.0); // Set The Color To Green
@ -143,6 +153,7 @@ end;
procedure TformFPV3D.FormCreate(Sender: TObject);
begin
VecDoc := TvVectorialDocument.Create;
glAltitude := 3;
end;
procedure TformFPV3D.buttonLoadClick(Sender: TObject);
@ -151,6 +162,28 @@ begin
glControl.Invalidate;
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);
begin
glControl.Invalidate;