1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#ifndef __GXTRANSFORM_H__
#define __GXTRANSFORM_H__
#ifdef __cplusplus
extern "C" {
#endif
/*---------------------------------------------------------------------------*/
#define GX_PROJECTION_SZ 7
#define GX_VIEWPORT_SZ 6
/*---------------------------------------------------------------------------*/
void GXSetProjection ( const f32 mtx[4][4], GXProjectionType type );
void GXSetProjectionv ( const f32 *ptr );
void GXLoadPosMtxImm ( const f32 mtx[3][4], u32 id );
void GXLoadPosMtxIndx ( u16 mtx_indx, u32 id );
void GXLoadNrmMtxImm ( const f32 mtx[3][4], u32 id );
void GXLoadNrmMtxImm3x3 ( const f32 mtx[3][3], u32 id );
void GXLoadNrmMtxIndx3x3 ( u16 mtx_indx, u32 id );
void GXSetCurrentMtx ( u32 id );
void GXLoadTexMtxImm ( const f32 mtx[][4], u32 id, GXTexMtxType type );
void GXLoadTexMtxIndx ( u16 mtx_indx, u32 id, GXTexMtxType type );
void GXProject (
f32 x, // model coordinates
f32 y,
f32 z,
const f32 mtx[3][4], // model-view matrix
const f32* pm, // projection matrix, as returned by GXGetProjectionv
const f32* vp, // viewport, as returned by GXGetViewportv
f32* sx, // screen coordinates
f32* sy,
f32* sz );
void GXSetViewport(
f32 left,
f32 top,
f32 wd,
f32 ht,
f32 nearz,
f32 farz );
static inline void GXSetViewportv( const f32 *vp )
{ // Note: doesn't check for NULL ptr
GXSetViewport(vp[0], vp[1], vp[2], vp[3], vp[4], vp[5]);
}
void GXSetViewportJitter(
f32 left,
f32 top,
f32 wd,
f32 ht,
f32 nearz,
f32 farz,
u32 field );
void GXSetZScaleOffset ( f32 scale, f32 offset );
#if ( GX_REV != 1 )
void GXSetScissorBoxOffset( s32 x_off, s32 y_off );
#endif
void GXSetClipMode( GXClipMode mode );
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif // __GXTRANSFORM_H__
|