From 3e7659201ea5b11fe2d4876df236f13877528c81 Mon Sep 17 00:00:00 2001 From: Dmitry Morozov Date: Sat, 12 Sep 2020 12:21:06 +0200 Subject: [PATCH] Interface definition updated for console application. #17 --- .../BoundingBoxConsole/BoundingBoxConsole.lps | 79 +++++++--- .../bounding_box_console.pas | 47 ++++-- .../bounding_box_server_demo.lpi | 2 +- .../bounding_box_server_demo.lps | 141 +++++++++--------- .../bounding_box_server_demo.res | Bin 53856 -> 53856 bytes 5 files changed, 165 insertions(+), 104 deletions(-) diff --git a/examples/BoundingBoxConsole/BoundingBoxConsole.lps b/examples/BoundingBoxConsole/BoundingBoxConsole.lps index 018d4b7..91b35ad 100644 --- a/examples/BoundingBoxConsole/BoundingBoxConsole.lps +++ b/examples/BoundingBoxConsole/BoundingBoxConsole.lps @@ -15,8 +15,7 @@ - - + @@ -25,11 +24,11 @@ - - - - + + + + @@ -50,36 +49,38 @@ + + + + + + + + + + - - + + - - + + - - - - - - - - - + @@ -100,6 +101,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/BoundingBoxConsole/bounding_box_console.pas b/examples/BoundingBoxConsole/bounding_box_console.pas index 3e55e4b..41a3f6f 100644 --- a/examples/BoundingBoxConsole/bounding_box_console.pas +++ b/examples/BoundingBoxConsole/bounding_box_console.pas @@ -4,9 +4,7 @@ interface uses {$IFDEF UNIX} {$IFDEF UseCThreads} cthreads, {$ENDIF} {$ENDIF} - Classes, - SysUtils, - CustApp, int_user_interaction; + Classes, SysUtils, CustApp, SimpMath, int_user_interaction; type @@ -21,26 +19,29 @@ TBoundingBoxConsole = class(TCustomApplication, IUserInteraction) procedure WriteHelp; virtual; { IUserInteraction } - - function GetEditExitDerivate: double; + function GetInitialAngleStep: Double; + function GetModelFileName: string; + function GetFinalTolerance: Double; + function GetEditExitDerivate: Double; { Prints final results among a few runs. } procedure DisplayPointCloud(PointCloud: TList); { Displays computation results and removes container. Should be member of form because works with form controls. Removes handler from FHandlers list. } - procedure DisplayGlobalMinVolume(Handler: TBoundingBoxServer; + procedure DisplayGlobalMinVolume(Handler: TObject; BoxSizes: TDoubleVector3); { Displays computation results of single run. Should be member of form because works with form controls. Removes handler from FHandlers list. } - procedure DisplayCurrentMinVolume(Handler: TBoundingBoxServer); + procedure DisplayCurrentMinVolume(Handler: TObject); { Displays computation results of single run of brute force search. } - procedure DisplayBruteForceResult(Handler: TBoundingBoxServer; + procedure DisplayBruteForceResult(Handler: TObject; DeltaVolume: single; BoxSizes: TDoubleVector3); procedure DisplayInitialAngles(Alpha, Beta, Gamma: single; ShowDetails: boolean); procedure DisplayListOfModels(ListOfFiles: TStringList); - procedure DisplayComputationTime(ComputationTime: TComputationTime); + procedure DisplayComputationTime(ComputationTime: TObject); procedure DisplayInitialBoxVolume(InitialBoxVolume: double); + procedure DisplayDetails(Line: string); end; implementation @@ -89,6 +90,21 @@ procedure TBoundingBoxConsole.WriteHelp; writeln('Usage: ', ExeName, ' -h'); end; +function TBoundingBoxConsole.GetInitialAngleStep: Double; +begin + +end; + +function TBoundingBoxConsole.GetModelFileName: string; +begin + +end; + +function TBoundingBoxConsole.GetFinalTolerance: Double; +begin + +end; + function TBoundingBoxConsole.GetEditExitDerivate: double; begin @@ -99,18 +115,18 @@ procedure TBoundingBoxConsole.DisplayPointCloud(PointCloud: TList); end; -procedure TBoundingBoxConsole.DisplayGlobalMinVolume(Handler: TBoundingBoxServer; +procedure TBoundingBoxConsole.DisplayGlobalMinVolume(Handler: TObject; BoxSizes: TDoubleVector3); begin end; -procedure TBoundingBoxConsole.DisplayCurrentMinVolume(Handler: TBoundingBoxServer); +procedure TBoundingBoxConsole.DisplayCurrentMinVolume(Handler: TObject); begin end; -procedure TBoundingBoxConsole.DisplayBruteForceResult(Handler: TBoundingBoxServer; +procedure TBoundingBoxConsole.DisplayBruteForceResult(Handler: TObject; DeltaVolume: single; BoxSizes: TDoubleVector3); begin @@ -128,7 +144,7 @@ procedure TBoundingBoxConsole.DisplayListOfModels(ListOfFiles: TStringList); end; procedure TBoundingBoxConsole.DisplayComputationTime( - ComputationTime: TComputationTime); + ComputationTime: TObject); begin end; @@ -138,5 +154,10 @@ procedure TBoundingBoxConsole.DisplayInitialBoxVolume(InitialBoxVolume: double); end; +procedure TBoundingBoxConsole.DisplayDetails(Line: string); +begin + +end; + end. diff --git a/examples/BoundingBoxServerForm/bounding_box_server_demo.lpi b/examples/BoundingBoxServerForm/bounding_box_server_demo.lpi index 4c1477f..606f2be 100644 --- a/examples/BoundingBoxServerForm/bounding_box_server_demo.lpi +++ b/examples/BoundingBoxServerForm/bounding_box_server_demo.lpi @@ -23,7 +23,7 @@ - + diff --git a/examples/BoundingBoxServerForm/bounding_box_server_demo.lps b/examples/BoundingBoxServerForm/bounding_box_server_demo.lps index 15a9415..e080918 100644 --- a/examples/BoundingBoxServerForm/bounding_box_server_demo.lps +++ b/examples/BoundingBoxServerForm/bounding_box_server_demo.lps @@ -31,19 +31,19 @@ - - - + + + + - - - + + @@ -54,17 +54,16 @@ - + - - - + + @@ -73,7 +72,7 @@ - + @@ -81,42 +80,42 @@ - + - + - + - + - + - + @@ -124,14 +123,14 @@ - + - + @@ -147,14 +146,14 @@ - + - + @@ -162,7 +161,7 @@ - + @@ -170,7 +169,7 @@ - + @@ -178,14 +177,14 @@ - + - + @@ -196,123 +195,123 @@ - + - + - - + + - - + + - - + + - - + + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + diff --git a/examples/BoundingBoxServerForm/bounding_box_server_demo.res b/examples/BoundingBoxServerForm/bounding_box_server_demo.res index 3f620fc91d29c4659db9f9c669c411c765830302..58a5ed909ae7167aa1574eda3aba70bf37ccfdb2 100644 GIT binary patch delta 22 ecmaE`g!#b|<_&Y$8I>o`W&h7;x_K_g;gbMy;R)6N delta 22 ecmaE`g!#b|<_&Y$8I>l_W&h7;vUx7Y;gbMy&k583