1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     math_Matrix44.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: 24529 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_MATH_ARMV6_MATRIX44_H_
17 #define NN_MATH_ARMV6_MATRIX44_H_
18 
19 namespace nn {
20 namespace math {
21 namespace ARMv6 {
22 
23 NN_MATH_INLINE VEC4* VEC3TransformC(VEC4* pOut, const MTX44* pM, const VEC3* pV);
24 NN_MATH_INLINE MTX44* MTX44CopyC(MTX44* pOut, const MTX44* p);
25 NN_MATH_INLINE MTX44* MTX44AddC(MTX44* pOut, const MTX44* p1, const MTX44* p2);
26 NN_MATH_INLINE MTX44* MTX44MultC(MTX44* pOut, const MTX44* p, f32 f);
27 NN_MATH_INLINE MTX44* MTX44TransposeC(MTX44* pOut, const MTX44 *pSrc);
28 NN_MATH_INLINE MTX44* MTX44PerspectiveRadC(MTX44* pOut, f32 fovy, f32 aspect, f32 n, f32 f);
29 NN_MATH_INLINE MTX44* MTX44PerspectiveRadC_FAST(MTX44* pOut, f32 fovy, f32 aspect, f32 n, f32 f);
30 NN_MATH_INLINE MTX44* MTX44FrustumC(MTX44* pOut, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f);
31 NN_MATH_INLINE MTX44* MTX44FrustumC_FAST(MTX44* pOut, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f);
32 NN_MATH_INLINE MTX44* MTX44OrthoC(MTX44* pOut, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f);
33 NN_MATH_INLINE MTX44* MTX44OrthoC_FAST(MTX44* pOut, f32 l, f32 r, f32 b, f32 t, f32 n, f32 f);
34 NN_MATH_INLINE MTX44* MTX44MultC(MTX44* pOut, const MTX44* __restrict p1, const MTX44* __restrict p2);
35 NN_MATH_INLINE u32 MTX44InverseC(MTX44* pOut, const MTX44* p);
36 NN_MATH_INLINE u32 MTX44InverseC_FAST_ALGO(MTX44* pOut, const MTX44* p);
37 NN_MATH_INLINE MTX44* MTX44RotAxisRad_C( MTX44* pOut, const VEC3 *pAxis, f32 fRad );
38 NN_MATH_INLINE MTX44* MTX44RotAxisRad_C_FAST( MTX44* pOut, const VEC3 *pAxis, f32 fRad );
39 NN_MATH_INLINE MTX44* MTX44RotXYZFIdxC(MTX44* pOut, f32 fIdxX, f32 fIdxY, f32 fIdxZ);
40 NN_MATH_INLINE MTX44* MTX44RotXYZFIdxC_FAST(MTX44* pOut, f32 fIdxX, f32 fIdxY, f32 fIdxZ);
41 NN_MATH_INLINE MTX44* MTX44ScaleC(MTX44* pOut, const VEC3* pS);
42 NN_MATH_INLINE MTX44* MTX44ScaleC_FAST(MTX44* pOut, const VEC3* pS);
43 NN_MATH_INLINE MTX44* MTX44MultScaleC(MTX44* pOut, const MTX44* pM, const VEC3* pS);
44 NN_MATH_INLINE MTX44* MTX44MultScaleC(MTX44* pOut, const VEC3* pS, const MTX44* pM);
45 NN_MATH_INLINE MTX44* MTX44TranslateC(MTX44* pOut, const VEC3* pT);
46 NN_MATH_INLINE MTX44* MTX44TranslateC_FAST(MTX44* pOut, const VEC3* pT);
47 NN_MATH_INLINE MTX44* MTX44MultTranslateC(MTX44* pOut, const VEC3* pT, const MTX44* pM);
48 NN_MATH_INLINE MTX44* MTX44MultTranslateC(MTX44* pOut, const MTX44* pM, const VEC3* pT);
49 
50 inline MTX44*  MTX44PivotC( MTX44* pOut, PivotDirection pivot );
51 inline MTX44*  MTX44PivotC_FAST( MTX44* pOut, PivotDirection pivot );
52 
53 MTX44* MTX44AddAsm(MTX44* pOut, const MTX44* p1, const MTX44* p2);
54 MTX44* MTX44CopyAsm(MTX44* pOut, const MTX44* p);
55 MTX44* MTX44MultAsm(MTX44* pOut, const MTX44* p, f32 f);
56 MTX44* MTX44MultAsm(MTX44* pOut, const MTX44* __restrict p1, const MTX44* __restrict p2);
57 MTX44* MTX44MultScaleAsm(MTX44* pOut, const MTX44* pM, const VEC3* pS);
58 MTX44* MTX44MultScaleAsm(MTX44* pOut, const VEC3* pS, const MTX44* pM);
59 MTX44* MTX44MultTranslateAsm(MTX44* pOut, const VEC3* pT, const MTX44* pM);
60 MTX44* MTX44MultTranslateAsm(MTX44* pOut, const MTX44* pM, const VEC3* pT);
61 MTX44* MTX44TransposeAsm(MTX44* pOut, const MTX44 *pSrc);
62 VEC4* VEC3TransformAsm(VEC4* pOut, const MTX44* pM, const VEC3* pV);
63 }  // namespace ARMv6
64 }  // namespace math
65 }  // namespace nn
66 
67 
68 #endif
69