source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/qtfm/@quaternion/private/compose.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 855 bytes
Line 
1function q = compose(a,b,c,d)
2% Private function to compose a quaternion from four components.
3
4% Copyright © 2005 Stephen J. Sangwine and Nicolas Le Bihan.
5% See the file : Copyright.m for further details.
6
7% The rationale for using this function is that it, and the four private
8% functions ess(), exe(), wye(), and zed() should be the only functions
9% that have knowledge of the underlying representation of a quaternion
10% in order to minimise the changes necessary to use a different
11% representation. In particular, the class constructor function uses this
12% function to make a quaternion, so that even the constructor does not
13% know how a quaternion is represented.
14
15switch nargin
16case 3
17  q.w = []; q.x = a; q.y = b; q.z = c;
18case 4
19  q.w = a;  q.x = b; q.y = c; q.z = d;
20otherwise
21  error('Internal error in use of private function compose')
22end
Note: See TracBrowser for help on using the repository browser.