nds/arm9/postest.h

Position Test Functions.
The position test multiplies a given vector by the position matrix and returns the coords(x,y,z,w). The position test is really quick, about 10x faster than a box test. [詳細]

#include <nds/arm9/video.h>
#include <nds/arm9/videoGL.h>

関数

GL_STATIC_INL bool PosTestBusy ()
 true if the hardware is currently performing a position/vertex/box test.
GL_STATIC_INL void PosTest_Asynch (v16 x, v16 y, v16 z)
 Starts a position test asynchronously
GL_STATIC_INL void PosTest (v16 x, v16 y, v16 z)
 Performs a position test
GL_STATIC_INL int32 PosTestWresult ()
 Returns the distance from the camera of the last position test, pretty darn useful
GL_STATIC_INL int32 PosTestXresult ()
 Returns absolute X position of the last position test (location if the modelview matrix was identity)
GL_STATIC_INL int32 PosTestYresult ()
 Returns absolute Y position of the last position test (location if the modelview matrix was identity)
GL_STATIC_INL int32 PosTestZresult ()
 Returns absolute Z position of the last position test (location if the modelview matrix was identity)


説明

Position Test Functions.
The position test multiplies a given vector by the position matrix and returns the coords(x,y,z,w). The position test is really quick, about 10x faster than a box test.


関数

GL_STATIC_INL void PosTest ( v16  x,
v16  y,
v16  z 
)

Performs a position test

引数:
x specifies x offset from the current modelview matrix
y specifies y offset from the current modelview matrix
z specifies z offset from the current modelview matrix
00058                                                 {
00059         PosTest_Asynch(x,y,z);
00060         while(PosTestBusy());
00061 }

GL_STATIC_INL void PosTest_Asynch ( v16  x,
v16  y,
v16  z 
)

Starts a position test asynchronously

引数:
x specifies x offset from the current modelview matrix
y specifies y offset from the current modelview matrix
z specifies z offset from the current modelview matrix
00049                                                       {
00050         GFX_POS_TEST = VERTEX_PACK(x, y);
00051         GFX_POS_TEST = z;
00052 }

GL_STATIC_INL bool PosTestBusy (  ) 

true if the hardware is currently performing a position/vertex/box test.

戻り値:
whether a test is being performed
00036                                  {
00037         return (GFX_STATUS & BIT(0))!=0;
00038 }

GL_STATIC_INL int32 PosTestWresult (  ) 

Returns the distance from the camera of the last position test, pretty darn useful

戻り値:
W magnitude
00065                                      {
00066         return GFX_POS_RESULT[3];
00067 }

GL_STATIC_INL int32 PosTestXresult (  ) 

Returns absolute X position of the last position test (location if the modelview matrix was identity)

戻り値:
Absolute X position
00071                                      {
00072         return GFX_POS_RESULT[0];
00073 }

GL_STATIC_INL int32 PosTestYresult (  ) 

Returns absolute Y position of the last position test (location if the modelview matrix was identity)

戻り値:
Absolute Y position
00077                                      {
00078         return GFX_POS_RESULT[1];
00079 }

GL_STATIC_INL int32 PosTestZresult (  ) 

Returns absolute Z position of the last position test (location if the modelview matrix was identity)

戻り値:
Absolute Z position
00083                                      {
00084         return GFX_POS_RESULT[2];
00085 }


libnds(ARM9)に対してTue Jan 22 15:48:22 2008に生成されました。  doxygen 1.5.4