2012-09-09 03:51:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%class Point3, see Doxygen page for details
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%-------Constructors-------
							 | 
						
					
						
							
								
									
										
										
										
											2012-09-04 06:48:08 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%Point3(double x, double y, double z)
							 | 
						
					
						
							
								
									
										
										
										
											2012-09-09 03:51:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%-------Methods-------
							 | 
						
					
						
							
								
									
										
										
										
											2012-09-04 06:48:08 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%norm() : returns double
							 | 
						
					
						
							
								
									
										
										
										
											2012-09-09 03:51:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%-------Static Methods-------
							 | 
						
					
						
							
								
									
										
										
										
											2012-09-04 06:48:08 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%StaticFunctionRet(double z) : returns Point3
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%staticFunction() : returns double
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%-------Serialization Interface-------
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%string_serialize() : returns string
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%string_deserialize(string serialized) : returns Point3
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:50:02 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								classdef Point3 < handle
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  properties
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    ptr_Point3 = 0
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  methods
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function obj = Point3(varargin)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        my_ptr = varargin{2};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        geometry_wrapper(11, my_ptr);
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      elseif nargin == 3 && isa(varargin{1},'double') && isa(varargin{2},'double') && isa(varargin{3},'double')
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        my_ptr = geometry_wrapper(12, varargin{1}, varargin{2}, varargin{3});
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        error('Arguments do not match any overload of Point3 constructor');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      end
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      obj.ptr_Point3 = my_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function delete(obj)
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      geometry_wrapper(13, obj.ptr_Point3);
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function display(obj), obj.print(''); end
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-30 04:27:10 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    %DISPLAY Calls print on the object
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function disp(obj), obj.display; end
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-30 04:27:10 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    %DISP Calls print on the object
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-10 22:21:58 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    function varargout = norm(this, varargin)
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-30 04:27:10 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % NORM usage: norm() : returns double
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-26 03:21:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      varargout{1} = geometry_wrapper(14, this, varargin{:});
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:50:02 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    function varargout = string_serialize(this, varargin)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % STRING_SERIALIZE usage: string_serialize() : returns string
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      if length(varargin) == 0
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        varargout{1} = geometry_wrapper(15, this, varargin{:});
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        error('Arguments do not match any overload of function Point3.string_serialize');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-23 07:16:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function sobj = saveobj(obj)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % SAVEOBJ Saves the object to a matlab-readable format
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      sobj = obj.string_serialize();
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-26 02:36:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  methods(Static = true)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function varargout = StaticFunctionRet(varargin)
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-30 04:27:10 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % STATICFUNCTIONRET usage: StaticFunctionRet(double z) : returns Point3
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % 
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-29 05:44:45 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % Usage
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % STATICFUNCTIONRET(double z)
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      if length(varargin) == 1 && isa(varargin{1},'double')
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        varargout{1} = geometry_wrapper(16, varargin{:});
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        error('Arguments do not match any overload of function Point3.StaticFunctionRet');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    function varargout = StaticFunction(varargin)
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-30 04:27:10 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % STATICFUNCTION usage: staticFunction() : returns double
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-28 01:54:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % 
							 | 
						
					
						
							
								
									
										
										
										
											2012-08-29 05:44:45 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % Usage
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % STATICFUNCTION()
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      if length(varargin) == 0
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        varargout{1} = geometry_wrapper(17, varargin{:});
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        error('Arguments do not match any overload of function Point3.StaticFunction');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:50:02 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    function varargout = string_deserialize(varargin)
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      % STRING_DESERIALIZE usage: string_deserialize() : returns Point3
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % Doxygen can be found at http://research.cc.gatech.edu/borg/sites/edu.borg/html/index.html
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:50:00 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      if length(varargin) == 1
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        varargout{1} = geometry_wrapper(18, varargin{:});
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      else
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:59 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        error('Arguments do not match any overload of function Point3.string_deserialize');
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-20 01:49:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								      end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2013-06-23 07:16:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    function obj = loadobj(sobj)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      % LOADOBJ Saves the object to a matlab-readable format
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      obj = Point3.string_deserialize(sobj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end
							 | 
						
					
						
							
								
									
										
										
										
											2012-07-09 04:23:47 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								end
							 |