1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: math_Matrix34.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd. 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 $Revision: 17112 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_MATH_ARMV6_MATH_MATRIX34_H_ 17 #define NN_MATH_ARMV6_MATH_MATRIX34_H_ 18 19 #include <cstring> 20 #include <nn/math/math_Config.h> 21 #include <nn/math/math_Matrix34.h> 22 23 #pragma push 24 #pragma Otime 25 26 namespace nn { 27 namespace math { 28 namespace ARMv6 { 29 30 MTX34* MTX34CopyAsm(MTX34* pOut, const MTX34* p); 31 MTX34* MTX34MultAsm(MTX34* pOut, const MTX34* p1, const MTX34* p2); 32 MTX34* MTX34MultAsm_ORG(MTX34* pOut, const MTX34* p1, const MTX34* p2); 33 MTX34* MTX34MultAsm(MTX34* pOut, const MTX34* p, f32 f); 34 MTX34* MTX34AddAsm(MTX34* pOut, const MTX34* p1, const MTX34* p2); 35 u32 MTX34InverseAsm(MTX34* pOut, const MTX34* p); 36 u32 MTX34InvTransposeAsm(MTX34* pOut, const MTX34* __restrict p); 37 MTX34* MTX34MAddAsm(MTX34* pOut, f32 t, const MTX34* p1, const MTX34* p2); 38 MTX34* MTX34MultScaleAsm(MTX34* pOut, const MTX34* pM, const VEC3* pS); 39 MTX34* MTX34MultScaleAsm(MTX34* pOut, const VEC3* __restrict pS, const MTX34* pM); 40 MTX34* MTX34MultTranslateAsm(MTX34* pOut, const VEC3* pT, const MTX34* pM); 41 MTX34* MTX34MultTranslateAsm(MTX34* pOut, const MTX34* pM, const VEC3* pT); 42 MTX34* MTX34ScaleAsm(MTX34* pOut, const VEC3* pS); 43 MTX34* MTX34TransposeAsm(MTX34* pOut, const MTX34* p); 44 VEC3* VEC3TransformAsm(VEC3* pOut, const MTX34* __restrict pM, const VEC3* __restrict pV); 45 46 NN_MATH_INLINE MTX34* MTX34ScaleC_FAST(MTX34* pOut, const VEC3* pS); 47 NN_MATH_INLINE MTX34* MTX34TranslateC_FAST(MTX34* pOut, const VEC3* pT); 48 NN_MATH_INLINE MTX34* MTX34RotAxisRad_C_FAST( MTX34* pOut, const VEC3 *pAxis, f32 fRad ); 49 NN_MATH_INLINE MTX34* MTX34RotXYZFIdxC_FAST(MTX34* pOut, f32 fIdxX, f32 fIdxY, f32 fIdxZ); 50 NN_MATH_INLINE MTX34* MTX34LookAtC_FAST(MTX34* pOut, const VEC3* pCamPos, const VEC3* pCamUp, const VEC3* pTarget); 51 NN_MATH_INLINE MTX34* MTX34LookAtC_FAST(MTX34* pOut, const VEC3* pCamPos, f32 twist, const VEC3* pTarget); 52 NN_MATH_INLINE MTX34* MTX34CameraRotateC_FAST(MTX34* pOut, const VEC3* pCamPos, const VEC3* pCamRotate); 53 NN_MATH_INLINE MTX34* QUATToMTX34C_FAST(MTX34* pOut, const QUAT* pQ); 54 55 56 NN_MATH_INLINE VEC3* VEC3TransformC(VEC3* pOut, const MTX34* __restrict pM, const VEC3* __restrict pV); 57 NN_MATH_INLINE MTX34* MTX34CopyC(MTX34* pOut, const MTX34* p); 58 NN_MATH_INLINE MTX34* MTX34MultC(MTX34* pOut, const MTX34* __restrict p1, const MTX34* __restrict p2); 59 NN_MATH_INLINE MTX34* MTX34MultC(MTX34* pOut, const MTX34* p, f32 f); 60 NN_MATH_INLINE MTX34* MTX34AddC(MTX34* pOut, const MTX34* p1, const MTX34* p2); 61 NN_MATH_INLINE MTX34* MTX34ScaleC(MTX34* pOut, const VEC3* pS); 62 NN_MATH_INLINE MTX34* MTX34MultScaleC(MTX34* pOut, const MTX34* pM, const VEC3* pS); 63 NN_MATH_INLINE MTX34* MTX34MultScaleC(MTX34* pOut, const VEC3* __restrict pS, const MTX34* pM); 64 NN_MATH_INLINE MTX34* MTX34TranslateC(MTX34* pOut, const VEC3* pT); 65 NN_MATH_INLINE MTX34* MTX34MultTranslateC(MTX34* pOut, const VEC3* pT, const MTX34* pM); 66 NN_MATH_INLINE MTX34* MTX34MultTranslateC(MTX34* pOut, const MTX34* pM, const VEC3* pT); 67 NN_MATH_INLINE MTX34* MTX34MAddC(MTX34* pOut, f32 t, const MTX34* p1, const MTX34* p2); 68 NN_MATH_INLINE MTX34* MTX34RotAxisRad_C( MTX34* pOut, const VEC3 *pAxis, f32 fRad ); 69 NN_MATH_INLINE MTX34* MTX34RotXYZFIdxC(MTX34* pOut, f32 fIdxX, f32 fIdxY, f32 fIdxZ); 70 NN_MATH_INLINE u32 MTX34InverseC(MTX34* pOut, const MTX34* p); 71 NN_MATH_INLINE MTX34* MTX34TransposeC(MTX34* pOut, const MTX34* p); 72 NN_MATH_INLINE u32 MTX34InvTransposeC(MTX34* pOut, const MTX34* __restrict p); 73 NN_MATH_INLINE MTX34* MTX34LookAtC(MTX34* pOut, const VEC3* pCamPos, const VEC3* pCamUp, const VEC3* pTarget); 74 NN_MATH_INLINE MTX34* MTX34LookAtC(MTX34* pOut, const VEC3* pCamPos, f32 twist, const VEC3* pTarget); 75 NN_MATH_INLINE MTX34* MTX34CameraRotateC(MTX34* pOut, const VEC3* pCamPos, const VEC3* pCamRotate); 76 NN_MATH_INLINE MTX34* QUATToMTX34C(MTX34* pOut, const QUAT* pQ); 77 78 } // namespcae ARMv6 79 } // namespace math 80 } // namespace nn 81 82 83 #pragma pop 84 85 /* NN_MATH_ARMV6_MATH_MATRIX34_H_ */ 86 #endif 87