#include <revolution/mtx.h>
void C_MTXMultVecArray (
const Mtx m,
const Vec* srcBase,
Vec* dstBase,
u32 count );
void PSMTXMultVecArray (
const Mtx m,
const Vec* srcBase,
Vec* dstBase,
u32 count );
#define MTXMultVecArray C_MTXMultVecArray // for debug build
#define MTXMultVecArray PSMTXMultVecArray // for nondebug build
m |
Source matrix for multiply. m is unaffected by this function. m may be either an Mtx or an MtxPtr. |
srcBase |
Pointer to first Vec of source vector array. srcBase may be either a VecPtr or a Point3dPtr. |
dstBase |
Pointer to first Vec of destination vector array. dstBase may be either a VecPtr or a Point3dPtr.
|
count |
Number of contiguous array elements to multiply. Acceptable if srcBase=dstBase. However, the condition srcBase<dstBase<(srcBase+count-1) must be avoided. |
None.
Multiplies an array of count 3D vectors on the left with a matrix. For multiplication purposes, each vector is treated as a 4-element column vector with an implied fourth w coordinate of 1.
For arrays of vectors, this function is more efficient than calling MTXMultVec in a loop as it saves the overhead of repeated function calls.
Note: Vectors are transformed one array element at a time through a single temporary vector, so it's acceptable if srcBase=dstBase. However, problems will result if dstBase points are within the range: (srcBase+count-1). In this case, the resulting vectors will overwrite part of the srcBase array before it can be used as a source value.
During a debug build, MTXMultVecArray is interpreted as C_MTXMultVecArray, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSMTXMultVecArray, will be automatically substituted. You can also call C_MTXMultVecArray or PSMTXMultVecArray explicitly.
Mtx, MtxPtr, Point3d, Point3dPtr, Vec, VecPtr, MTXMultVec, MTXMultVecSR, MTXMultVecArraySR
03/01/2006 Initial version.