MTXMultVecArraySR

C Specification

#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

Arguments

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.

Return Values

None.

Description

Multiplies an array of count 3D vectors on the left with a 3x3 sub-matrix (Scale and Rotate component of 3x4 matrix m). For arrays of vectors, this function is more efficient than calling MTXMultVecSR 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, MTXMultVecArraySR is interpreted 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 or PSMTXMultVecArraySR explicitly.

See Also

Mtx, MtxPtr, Point3d, Point3dPtr, Vec, VecPtr, MTXMultVec, MTXMultVecSR, MTXMultVecArray

Revision History

03/01/2006 Initial version.