libnds
Loading...
Searching...
No Matches
Functions
boxtest.h File Reference

3D box test dunctions. More...

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

Functions

int BoxTest (v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth)
 Performs a test to determine if the provided box is in the view frustrum.
 
void BoxTest_Asynch (v16 x, v16 y, v16 z, v16 height, v16 width, v16 depth)
 Performs a test to determine if the provided box is in the view frustum.
 
static int BoxTestf (float x, float y, float z, float width, float height, float depth)
 Performs a test to determine if the provided box is in the view frustum.
 
static void BoxTestf_Asynch (float x, float y, float z, float width, float height, float depth)
 Performs a test to determine if the provided box is in the view frustum.
 
static int BoxTestResult (void)
 Gets the result of the last box test.
 

Detailed Description

3D box test dunctions.

Function Documentation

◆ BoxTest()

int BoxTest ( v16  x,
v16  y,
v16  z,
v16  width,
v16  height,
v16  depth 
)

Performs a test to determine if the provided box is in the view frustrum.

Parameters
xPoint of a vertex on the box
yPoint of a vertex on the box
zPoint of a vertex on the box
heightDescribe the size of the box referenced from (x, y, z)
widthDescribe the size of the box referenced from (x, y, z)
depthDescribe the size of the box referenced from (x, y, z)
Returns
Non zero if any or all of the box is in the view frustum.

◆ BoxTest_Asynch()

void BoxTest_Asynch ( v16  x,
v16  y,
v16  z,
v16  height,
v16  width,
v16  depth 
)

Performs a test to determine if the provided box is in the view frustum.

This is asynchronous. BoxTestResult must be called to get the result of this operation.

Parameters
xPoint of a vertex on the box
yPoint of a vertex on the box
zPoint of a vertex on the box
widthDescribe the size of the box referenced from (x, y, z)
heightDescribe the size of the box referenced from (x, y, z)
depthDescribe the size of the box referenced from (x, y, z)

◆ BoxTestf()

static int BoxTestf ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth 
)
inlinestatic

Performs a test to determine if the provided box is in the view frustum.

Parameters
xPoint of a vertex on the box
yPoint of a vertex on the box
zPoint of a vertex on the box
widthDescribe the size of the box referenced from (x, y, z)
heightDescribe the size of the box referenced from (x, y, z)
depthDescribe the size of the box referenced from (x, y, z)
Returns
Non zero if any or all of the box is in the view frustum.

◆ BoxTestf_Asynch()

static void BoxTestf_Asynch ( float  x,
float  y,
float  z,
float  width,
float  height,
float  depth 
)
inlinestatic

Performs a test to determine if the provided box is in the view frustum.

This is asynchronous. BoxTestResult must be called to get the result of this operation.

Parameters
xPoint of a vertex on the box
yPoint of a vertex on the box
zPoint of a vertex on the box
widthDescribe the size of the box referenced from (x, y, z)
heightDescribe the size of the box referenced from (x, y, z)
depthDescribe the size of the box referenced from (x, y, z)

◆ BoxTestResult()

static int BoxTestResult ( void  )
inlinestatic

Gets the result of the last box test.

Needed for asynch box test calls.

Returns
Non zero if any or all of the box is in the view frustum.