home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-07-23 | 1.8 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Camera.cpp
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Fri Jul 23 21:20:24 1999, modified Fri Jul 23 21:20:24 1999, creator 'CWIE', type ASCII, 1091 bytes "Camera.cpp" , at 0x4c3 410 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 43 61 6d 65 72 61 | 2e 63 70 70 00 00 00 00 |..Camera|.cpp....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 04 43 00 | 00 01 9a b3 be c5 58 b3 |......C.|......X.|
|00000060| be c5 58 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..X.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 83 86 00 00 |........|........|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 22 43 61 6d 65 72 61 |#include| "Camera|
|00000090| 2e 68 22 0d 0d 23 69 6e | 63 6c 75 64 65 20 22 52 |.h"..#in|clude "R|
|000000a0| 33 4d 61 74 72 69 78 2e | 68 22 0d 0d 23 64 65 66 |3Matrix.|h"..#def|
|000000b0| 69 6e 65 20 41 09 6d 44 | 69 72 2e 6d 58 0d 23 64 |ine A.mD|ir.mX.#d|
|000000c0| 65 66 69 6e 65 20 42 09 | 6d 44 69 72 2e 6d 59 0d |efine B.|mDir.mY.|
|000000d0| 23 64 65 66 69 6e 65 20 | 43 09 6d 44 69 72 2e 6d |#define |C.mDir.m|
|000000e0| 5a 0d 0d 0d 0d 76 6f 69 | 64 20 43 61 6d 65 72 61 |Z....voi|d Camera|
|000000f0| 3a 3a 43 61 6c 63 54 72 | 61 6e 73 4d 61 74 72 69 |::CalcTr|ansMatri|
|00000100| 78 28 20 52 33 4d 61 74 | 72 69 78 26 20 6f 75 74 |x( R3Mat|rix& out|
|00000110| 54 20 29 20 63 6f 6e 73 | 74 20 7b 0d 09 56 33 09 |T ) cons|t {..V3.|
|00000120| 76 3b 0d 09 52 33 4d 61 | 74 72 69 78 20 52 6f 74 |v;..R3Ma|trix Rot|
|00000130| 3b 0d 09 66 6c 6f 61 74 | 09 63 6f 73 61 2c 20 73 |;..float|.cosa, s|
|00000140| 69 6e 61 3b 0d 09 66 6c | 6f 61 74 09 42 43 09 3d |ina;..fl|oat.BC.=|
|00000150| 20 73 71 72 74 28 20 42 | 2a 42 20 2b 20 43 2a 43 | sqrt( B|*B + C*C|
|00000160| 20 29 3b 0d 09 66 6c 6f | 61 74 09 41 42 43 09 3d | );..flo|at.ABC.=|
|00000170| 20 6d 44 69 72 2e 6d 61 | 67 6e 69 74 75 64 65 28 | mDir.ma|gnitude(|
|00000180| 29 3b 0d 09 0d 09 69 66 | 20 28 20 42 43 20 3e 20 |);....if| ( BC > |
|00000190| 30 2e 30 30 30 30 30 31 | 20 29 20 7b 0d 09 09 6f |0.000001| ) {...o|
|000001a0| 75 74 54 2e 73 65 74 52 | 6f 77 28 20 31 2c 20 42 |utT.setR|ow( 1, B|
|000001b0| 43 2f 41 42 43 2c 20 2d | 20 41 20 2a 20 42 20 2f |C/ABC, -| A * B /|
|000001c0| 20 28 42 43 2a 41 42 43 | 29 2c 20 2d 20 41 20 2a | (BC*ABC|), - A *|
|000001d0| 20 43 20 2f 20 28 42 43 | 2a 41 42 43 29 20 29 3b | C / (BC|*ABC) );|
|000001e0| 0d 09 09 6f 75 74 54 2e | 73 65 74 52 6f 77 28 20 |...outT.|setRow( |
|000001f0| 32 2c 20 30 2c 20 43 20 | 2f 20 42 43 2c 20 2d 20 |2, 0, C |/ BC, - |
|00000200| 42 20 2f 20 42 43 20 29 | 3b 0d 09 09 6f 75 74 54 |B / BC )|;...outT|
|00000210| 2e 73 65 74 52 6f 77 28 | 20 33 2c 20 41 20 2f 20 |.setRow(| 3, A / |
|00000220| 41 42 43 2c 20 42 20 2f | 20 41 42 43 2c 20 43 20 |ABC, B /| ABC, C |
|00000230| 2f 20 41 42 43 20 29 3b | 20 7d 0d 09 65 6c 73 65 |/ ABC );| }..else|
|00000240| 20 7b 0d 09 09 6f 75 74 | 54 2e 73 65 74 52 6f 77 | {...out|T.setRow|
|00000250| 28 20 31 2c 20 30 2c 20 | 2d 31 2c 20 2d 31 20 29 |( 1, 0, |-1, -1 )|
|00000260| 3b 0d 09 09 6f 75 74 54 | 2e 73 65 74 52 6f 77 28 |;...outT|.setRow(|
|00000270| 20 32 2c 20 30 2c 20 31 | 2c 20 2d 31 20 29 3b 0d | 2, 0, 1|, -1 );.|
|00000280| 09 09 6f 75 74 54 2e 73 | 65 74 52 6f 77 28 20 33 |..outT.s|etRow( 3|
|00000290| 2c 20 31 2c 20 30 2c 20 | 30 20 29 3b 0d 09 7d 0d |, 1, 0, |0 );..}.|
|000002a0| 09 0d 09 2f 2f 20 4d 61 | 6b 65 20 74 68 65 20 63 |...// Ma|ke the c|
|000002b0| 61 6d 65 72 61 20 61 6c | 77 61 79 73 20 6f 72 69 |amera al|ways ori|
|000002c0| 65 6e 74 20 22 75 70 22 | 20 69 6e 20 74 68 65 20 |ent "up"| in the |
|000002d0| 6d 55 70 44 69 72 20 64 | 69 72 65 63 74 69 6f 6e |mUpDir d|irection|
|000002e0| 2e 2e 2e 0d 09 76 2e 74 | 72 61 6e 73 66 6f 72 6d |.....v.t|ransform|
|000002f0| 28 20 6f 75 74 54 2c 20 | 6d 55 70 44 69 72 20 29 |( outT, |mUpDir )|
|00000300| 3b 09 09 0d 09 76 2e 6d | 5a 20 3d 20 30 3b 0d 09 |;....v.m|Z = 0;..|
|00000310| 76 2e 6e 6f 72 6d 61 6c | 69 7a 65 28 29 3b 0d 09 |v.normal|ize();..|
|00000320| 0d 09 2f 2f 20 43 61 74 | 63 68 20 74 68 65 20 63 |..// Cat|ch the c|
|00000330| 61 73 65 20 77 68 65 72 | 65 20 6f 75 72 20 75 70 |ase wher|e our up|
|00000340| 20 64 69 72 20 69 73 20 | 65 78 61 63 74 6c 79 20 | dir is |exactly |
|00000350| 6e 6f 72 6d 61 6c 20 74 | 6f 20 74 68 65 20 76 69 |normal t|o the vi|
|00000360| 65 77 20 70 6c 61 6e 65 | 0d 09 69 66 20 28 20 76 |ew plane|..if ( v|
|00000370| 2e 6d 61 67 6e 69 74 75 | 64 65 28 29 20 3e 3d 20 |.magnitu|de() >= |
|00000380| 30 2e 30 30 30 30 30 31 | 20 29 20 7b 20 0d 09 09 |0.000001| ) { ...|
|00000390| 63 6f 73 61 20 3d 20 76 | 2e 6d 59 20 2f 20 76 2e |cosa = v|.mY / v.|
|000003a0| 6d 61 67 6e 69 74 75 64 | 65 28 29 3b 0d 09 09 73 |magnitud|e();...s|
|000003b0| 69 6e 61 20 3d 20 76 2e | 6d 58 20 2f 20 76 2e 6d |ina = v.|mX / v.m|
|000003c0| 61 67 6e 69 74 75 64 65 | 28 29 3b 0d 09 09 52 6f |agnitude|();...Ro|
|000003d0| 74 2e 73 65 74 52 6f 77 | 28 20 31 2c 20 63 6f 73 |t.setRow|( 1, cos|
|000003e0| 61 2c 20 2d 20 73 69 6e | 61 2c 20 30 20 29 3b 0d |a, - sin|a, 0 );.|
|000003f0| 09 09 52 6f 74 2e 73 65 | 74 52 6f 77 28 20 32 2c |..Rot.se|tRow( 2,|
|00000400| 20 73 69 6e 61 2c 20 63 | 6f 73 61 2c 20 30 20 29 | sina, c|osa, 0 )|
|00000410| 3b 0d 09 09 52 6f 74 2e | 73 65 74 52 6f 77 28 20 |;...Rot.|setRow( |
|00000420| 33 2c 20 30 2c 20 30 2c | 20 31 20 29 3b 0d 09 09 |3, 0, 0,| 1 );...|
|00000430| 6f 75 74 54 2e 74 72 61 | 6e 73 66 6f 72 6d 28 20 |outT.tra|nsform( |
|00000440| 52 6f 74 20 29 3b 0d 09 | 7d 0d 09 0d 09 2f 2f 20 |Rot );..|}....// |
|00000450| 53 63 61 6c 65 20 61 6c | 6c 20 74 68 65 20 63 6f |Scale al|l the co|
|00000460| 65 66 66 73 20 74 68 61 | 74 20 64 65 74 65 72 6d |effs tha|t determ|
|00000470| 69 6e 65 20 74 68 65 20 | 78 20 61 6e 64 20 79 20 |ine the |x and y |
|00000480| 63 6f 72 64 73 0d 09 66 | 6f 72 20 28 20 69 6e 74 |cords..f|or ( int|
|00000490| 20 69 20 3d 20 30 3b 20 | 69 20 3c 20 36 3b 20 69 | i = 0; |i < 6; i|
|000004a0| 2b 2b 20 29 20 0d 09 09 | 6f 75 74 54 2e 6d 4d 5b |++ ) ...|outT.mM[|
|000004b0| 20 69 20 5d 20 2a 3d 20 | 6d 58 59 53 63 61 6c 65 | i ] *= |mXYScale|
|000004c0| 3b 0d 7d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000510| 70 01 a0 a4 4a 6e ff b2 | 4f ef 00 20 66 00 06 0c |p...Jn..|O.. f...|
|00000520| 4a 04 66 00 00 ca 48 c7 | be ab 00 18 66 00 00 c0 |J.f...H.|....f...|
|00000530| 4a 6a 00 08 67 00 00 b8 | 42 6e ff 36 30 07 53 40 |Jj..g...|Bn.60.S@|
|00000540| 3d 40 ff 34 3d 46 ff 3a | 3d 47 ff 38 42 6e ff 3e |=@.4=F.:|=G.8Bn.>|
|00000550| 3d 47 ff 3c 3d 46 ff 42 | 30 2a 00 08 d0 47 3d 40 |=G.<=F.B|0*...G=@|
|00000560| ff 40 20 6c 00 60 20 68 | 00 02 70 00 a0 a4 70 00 |.@ l.` h|..p...p.|
|00000570| 2f 00 4a 2c 02 72 67 04 | 72 01 60 02 72 00 2f 01 |/.J,.rg.|r.`.r./.|
|00000580| 70 00 2f 00 2f 00 48 6e | ff 3c 48 6e ff 34 20 6c |p././.Hn|.<Hn.4 l|
|00000590| 00 60 20 68 00 02 2f 10 | 20 6c 00 60 20 68 00 02 |.` h../.| l.` h..|
|000005a0| 2f 10 70 c8 20 78 18 8c | 4e 90 55 8f aa 40 3d 5f |/.p. x..|N.U..@=_|
|000005b0| ff b2 20 6c 00 60 20 68 | 00 02 70 01 a0 a4 30 2a |.. l.` h|..p...0*|
|000005c0| 00 08 48 c0 d1 ab 00 18 | 20 6e ff f4 30 2b 00 1a |..H.....| n..0+..|
|000005d0| d0 50 3d 40 ff a6 30 2b | 00 1a 90 6b 00 16 3d 40 |.P=@..0+|...k..=@|
|000005e0| ff ae 4a 6e ff b2 4f ef | 00 20 66 00 05 3e 55 8f |..Jn..O.|. f..>U.|
|000005f0| 2f 2c 00 60 20 3c 00 04 | 00 13 ab 1d 4a 1f 67 ee |/,.` <..|....J.g.|
|00000600| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 03 | 00 04 00 2e 00 0a 02 3e |........|.......>|
|00000630| 02 5c 00 2e 00 0a 02 3e | 02 5c b3 be 7f 08 00 00 |.\.....>|.\......|
|00000640| 00 72 00 00 00 81 00 00 | 00 2b 01 00 00 00 00 04 |.r......|.+......|
|00000650| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000660| 00 00 00 46 05 c8 ee f0 | 1c 48 00 00 00 1c 00 46 |...F....|.H.....F|
|00000670| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000680| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000690| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+