NNS_G3D_SBC_BB
Command Format
Offset (bytes) |
Description for NNS_G3D_SBCFLG_000 |
0 |
NNS_G3D_SBC_BB | NNS_G3D_SBCFLG_000 |
1 |
The node ID of a node that is targeted for billboard transformation. |
Offset (bytes) |
Description for NNS_G3D_SBCFLG_001 |
0 |
NNS_G3D_SBC_BB | NNS_G3D_SBCFLG_001 |
1 |
The node ID of a node that is targeted for billboard transformation. |
2 |
The ID of the matrix stack where calculation results are stored. |
Offset (bytes) |
Description for NNS_G3D_SBCFLG_010 . |
0 |
NNS_G3D_SBC_BB | NNS_G3D_SBCFLG_010 |
1 |
The node ID of a node that is targeted for billboard transformation. |
2 |
The ID of the matrix stack to be restored before calculation. |
Offset (bytes) |
Description for NNS_G3D_SBCFLG_011 . |
0 |
NNS_G3D_SBC_BB | NNS_G3D_SBCFLG_011 |
1 |
The node ID of a node that is targeted for billboard transformation. |
2 |
The ID of the matrix stack where calculation results are stored. |
3 |
The ID of the matrix stack to be restored before calculation. |
Description
The NNS_G3D_SBC_BB
command performs billboard conversion on the Position/Vector
matrix. By default, this command calls the NNSi_G3dFuncSbc_BB
function found in sbc.c
. This function internally performs the following processes:
- Restores the
Position/Vector
matrix to the current matrix from the matrix stack (depending on command variations).
- Checks the timing
A
callback. Callbacks in this position are convenient when substituting the billboard conversion calculations to the callback function. You can skip processing until the next callback by setting the NNS_G3D_RSFLAG_SKIP
flag in the NNS_G3dRS
structure in the callback function.
- Performs the billboard conversion calculation and sets the calculation results in the current matrix of the
Position/Vector
matrix.
- Checks the timing
C
callback. Callbacks in this position are used when performing some sort of operation after this command finishes.
- Stores the
Position/Vector
matrix from the current matrix to the matrix stack (depending on command variations).
Timing for Calling a Callback Function |
Usage |
NNS_G3D_SBC_CALLBACK_TIMING_A |
When you want a user program to do the material calculation. |
NNS_G3D_SBC_CALLBACK_TIMING_B |
When you want a user program to manipulate material calculation results. |
NNS_G3D_SBC_CALLBACK_TIMING_C |
When you want to insert some process after this command ends. |
Option Flag |
Operation |
NNS_G3D_SBCFLG_000 |
Billboard-transforms the current matrix. Does not store calculation results in the matrix stack. |
NNS_G3D_SBCFLG_001 |
Billboard-transforms the current matrix. Then stores calculation results in the matrix stack. |
NNS_G3D_SBCFLG_010 |
Restores from the matrix stack and then billboard-transforms. Does not store calculation results in the matrix stack. |
NNS_G3D_SBCFLG_011 |
Restores from the matrix stack and then billboard-transforms. Then stores the calculation results in the matrix stack. |
See Also
Revision History
2004/10/14 Added description.
2004/08/02 Initial version.
CONFIDENTIAL