#include <revolution/mtx.h>
void C_MTXMultVecArraySR (
const Mtx m,
const Vec* srcBase,
Vec* dstBase,
u32 count );
void PSMTXMultVecArraySR (
const Mtx m,
const Vec* srcBase,
Vec* dstBase,
u32 count );
#define MTXMultVecArraySR C_MTXMultVecArraySR // for debug build
#define MTXMultVecArraySR PSMTXMultVecArraySR // for nondebug build
| m | Source matrix to multiply. m is not altered by this function. The type of m may be either Mtx or MtxPtr. |
|---|---|
| srcBase | Pointer to the first Vec type of the source vector array. The type of srcBase may be either VecPtr or Point3dPtr. |
| dstBase | Pointer to the first Vec type of the calculated vector array. The type of dstBase may be either VecPtr or 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.
Post-multiplies an array of count 3D vectors by a 3x3 sub-matrix (Scale and Rotate component of 3x4 matrix m).
For arrays of vectors, this is more efficient than calling MTXMultVecSR in a loop because 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 is acceptable if srcBase = dstBase. However, problems will result if the dstBase pointer is within the range (srcBase + count - 1). In this case, resultant vectors will overwrite part of the srcBase array before it can be used as a source value.
During a debug build, the MTXMultVecArraySR function is parsed as C_MTXMultVecArraySR, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, PSMTXMultVecArraySR, will be automatically substituted. You can also call C_MTXMultVecArraySR and PSMTXMultVecArraySR explicitly.
Mtx, MtxPtr, Point3d, Point3dPtr, Vec, VecPtr, MTXMultVec, MTXMultVecSR, MTXMultVecArray
2008/05/26 Corrected errors.
2006/03/01 Initial version.
CONFIDENTIAL