1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>G3_BoxTest</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">G3*_BoxTest <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16 17<dl> 18 <dd> 19<PRE><CODE>#include <nitro/gx/g3imm.h> 20#include <nitro/gx/g3b.h> 21#include <nitro/gx/g3c.h> 22 23void G3_BoxTest(const <A href="../gx/GXBoxTestParam.html">GXBoxTestParam</A> * box); 24 25// Below are APIs for creating the display list (command list): 26void G3BS_BoxTest(<A href="../gx/GXDLInfo.html">GXDLInfo</A> * info, const GXBoxTestParam * box); 27void G3B_BoxTest(<A href="../gx/GXDLInfo.html">GXDLInfo</A> * info, const GXBoxTestParam * box); 28void G3CS_BoxTest(<A href="../gx/GXDLInfo.html">GXDLInfo</A> * info, const GXBoxTestParam * box); 29void G3C_BoxTest(<A href="../gx/GXDLInfo.html">GXDLInfo</A> * info, const GXBoxTestParam * box);<BR></CODE></PRE> 30 </dd> 31</dl><h2>Arguments</h2> 32<TABLE border="1" width="100%"> 33 <TBODY> 34 <TR> 35 <TD width="13%"><em><strong><font face="Courier New">info</font></strong></em></TD> 36 <TD width="87%">Command List Information.</TD> 37 </TR> 38 <TR> 39 <TD width="128"><em><strong><font face="Courier New">box</font></strong></em></TD> 40 <TD width="567">Pointer to the coordinate data of the box to test</TD> 41 </TR> 42 </TBODY> 43</TABLE> 44<h2>Return Values</h2> 45<p>None.</p> 46<H2>Description</H2> 47<P>This function tests the result of applying the current matrix to the <em><strong><code>box</code></strong></em> passed in the argument to determine whether the box is in the view volume.*Set the box data to <em><strong><code>*box</code></strong></em>. Results are obtained with the <CODE><A href="G3X_GetBoxTestResult.html">G3X_GetBoxTestResult</A></CODE> function.<BR>When calling this function, the <em>FAR plane intersecting clipping flag</em> and <em>1-dot polygon display flag</em> for the polygon attribute must first be set to <b>1</b>. When either of these flags are set to <b>0</b>, the test result may be incorrect. The polygon attribute is reflected when the Begin command is issued, so the BoxTest should be performed in this order:</P> 48<P><code>PolygonAttr</code> -> <code>Begin</code> -> <code>End</code> -> <code>BoxTest</code></P> 49<P> </P> 50<PRE><CODE>typedef union 51{ 52 u32 val[3]; 53 struct 54 { 55 fx16 x; // X coordinate of reference vertex 56 fx16 y; // y coordinate of reference vertex 57 fx16 z; // x coordinate of reference vertex 58 fx16 width; // width of the box to be tested 59 fx16 height; // height of the box to be tested 60 fx16 depth; // depth of the box to be tested 61 }; 62} 63GXBoxTestParam;</CODE></PRE> 64<h2>See Also</h2> 65<P><CODE><A href="G3_PositionTest.html">G3_PositionTest</A>, <A href="G3_VectorTest.html">G3_VectorTest</A>, <A href="G3X_GetBoxTestResult.html">G3X_GetBoxTestResult</A></CODE></P> 66<H2>Revision History</H2> 67<P>2004/07/29 Added description of the polygon attribute setting<br /> 2004/01/19 Initial version.</P> 68<hr><p>CONFIDENTIAL</p></body> 69</html> 70