1 /*---------------------------------------------------------------------------* 2 Project: Matrix Vector Library, Graphics library 3 File: GeoTypes.h 4 5 Copyright 1998, 1999 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 14 $Log: GeoTypes.h,v $ 15 Revision 1.2 2006/02/04 11:56:47 hashida 16 (none) 17 18 Revision 1.1.1.1 2005/12/29 06:53:28 hiratsu 19 Initial import. 20 21 Revision 1.1.1.1 2005/05/12 02:41:07 yasuh-to 22 Ported from dolphin source tree. 23 NoKeywords: $ 24 25 2 2000/01/27 4:53p Tian 26 Added S16Vec type and ROMtx (reordered matrix) type. 27 28 6 1999/11/16 11:45a Yasu 29 Changed Quat -> Qtrn 30 31 5 1999/11/15 6:44p Yasu 32 Added Quat, QuatPtr 33 34 35 *---------------------------------------------------------------------------*/ 36 37 38 39 #include <revolution/types.h> 40 41 42 43 #ifndef __GEOTYPES_H__ 44 #define __GEOTYPES_H__ 45 46 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 53 // 3D vector, point 54 typedef struct 55 { 56 57 f32 x, y, z; 58 59 } Vec, *VecPtr, Point3d, *Point3dPtr; 60 61 62 63 // Signed 16bit 3D vector 64 typedef struct 65 { 66 67 s16 x; 68 s16 y; 69 s16 z; 70 71 }S16Vec, *S16VecPtr; 72 73 74 75 // Quaternion 76 typedef struct 77 { 78 79 f32 x, y, z, w; 80 81 } Quaternion, *QuaternionPtr, Qtrn, *QtrnPtr; 82 83 84 // 3x4 matrix, pointer 85 typedef f32 Mtx[3][4]; 86 87 typedef f32 (*MtxPtr)[4]; 88 89 // 4x3 reordered matrix, pointer 90 typedef f32 ROMtx[4][3]; 91 92 typedef f32 (*ROMtxPtr)[3]; 93 94 95 96 // 4x4 matrix , pointer 97 // Used for projection matrix 98 typedef f32 Mtx44[4][4]; 99 100 typedef f32 (*Mtx44Ptr)[4]; 101 102 103 104 105 #ifdef __cplusplus 106 } 107 #endif 108 109 #endif // __GEOTYPES_H__ 110 111 112