xxsimImport3DScenery

PURPOSE ^

xxsimImport3DScenery - Import a 3D scenery from a file into an 3D animation plot

SYNOPSIS ^

function [result] = xxsimImport3DScenery(varargin)

DESCRIPTION ^

 xxsimImport3DScenery - Import a 3D scenery from a file into an 3D animation plot

 Syntax:
   result = xxsimImport3DScenery(sceneryFileName)

 Inputs:
   sceneryFileName (string) = The scenery file to import

 Outputs:
   result (boolean) true on success, false otherwise.

 Examples:
   result = xxsimImport3DScenery('c:\\temp\\myscenery.scn');

 See also: xxsimExport3DScenery

 Author: Controllab Products B.V.
 email: info@controllab.nl
 Website: https://www.controllab.nl
 Oct 2021

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [result] = xxsimImport3DScenery(varargin)
0002 % xxsimImport3DScenery - Import a 3D scenery from a file into an 3D animation plot
0003 %
0004 % Syntax:
0005 %   result = xxsimImport3DScenery(sceneryFileName)
0006 %
0007 % Inputs:
0008 %   sceneryFileName (string) = The scenery file to import
0009 %
0010 % Outputs:
0011 %   result (boolean) true on success, false otherwise.
0012 %
0013 % Examples:
0014 %   result = xxsimImport3DScenery('c:\\temp\\myscenery.scn');
0015 %
0016 % See also: xxsimExport3DScenery
0017 %
0018 % Author: Controllab Products B.V.
0019 % email: info@controllab.nl
0020 % Website: https://www.controllab.nl
0021 % Oct 2021
0022 
0023 %------------- BEGIN CODE --------------
0024     %check input arguments
0025     sceneryFileName = '';
0026     windowID = -1;
0027     plotID = -1;
0028     if (length(varargin) < 1) || (length(varargin) > 1)
0029         error('This function expects 1 input argument: sceneryFileName.');
0030     else
0031         if ~ischar(varargin{1})
0032             error('Input argument 1 should be the the name (with full path) of the scenery file. (string).');
0033         else
0034             sceneryFileName = varargin{1};
0035         end
0036     end
0037 
0038     reply = xrlinvoke('xxsim.plot.import3DScenery', struct('sceneryFileLocation', sceneryFileName, 'windowID', int32(windowID), 'plotID', int32(plotID)));
0039     if (length(reply) == 0 )
0040         error('could not import the scenery file');
0041         result = false;
0042     end
0043 
0044     % return the succes
0045     result = true;
0046 end
0047 %------------- END OF CODE --------------

Generated on Tue 19-Oct-2021 21:32:08