postest.h File Reference

Position Test Functions.
More...

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

Functions

GL_STATIC_INL void PosTest (v16 x, v16 y, v16 z)
 Performs a position test.
GL_STATIC_INL void PosTest_Asynch (v16 x, v16 y, v16 z)
 Starts a position test asynchronously.
GL_STATIC_INL bool PosTestBusy ()
 true if the hardware is currently performing a position/vertex/box 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).

Detailed Description

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.

Function Documentation

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

Performs a position test.

Parameters:
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
GL_STATIC_INL void PosTest_Asynch ( v16  x,
v16  y,
v16  z 
)

Starts a position test asynchronously.

Parameters:
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
Examples:
Graphics/3D/Picking/source/main.cpp.
GL_STATIC_INL bool PosTestBusy (  ) 

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

Returns:
whether a test is being performed
Examples:
Graphics/3D/Picking/source/main.cpp.
GL_STATIC_INL int32 PosTestWresult (  ) 

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

Returns:
W magnitude
Examples:
Graphics/3D/Picking/source/main.cpp.
GL_STATIC_INL int32 PosTestXresult (  ) 

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

Returns:
Absolute X position
GL_STATIC_INL int32 PosTestYresult (  ) 

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

Returns:
Absolute Y position
GL_STATIC_INL int32 PosTestZresult (  ) 

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

Returns:
Absolute Z position
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat Oct 2 12:55:13 2010 for libnds by  doxygen 1.6.3