MTXMultVec

Syntax

#include <revolution/mtx.h>

void C_MTXMultVec ( const Mtx m, const Vec* src, Vec* dst );
void PSMTXMultVec ( const Mtx m, const Vec* src, Vec* dst );

#define MTXMultVec  C_MTXMultVec // for debug build
#define MTXMultVec  PSMTXMultVec // for nondebug build

Arguments

m   Source matrix to multiply. m may be either a Mtx or a MtxPtr.
src Pointer to the source vector (Vec type) to be multiplied. src may also be a pointer to a Point3d.
dst Pointer to the vector (Vec type) resulting from the multiplication (m x src). dst may also be a pointer to a Point3d. OK if src=dst

Return Values

None.

Description

Pre-multiplies a 3D vector or 3D point by a matrix ( m x src = dst ).
For multiplication purposes, the vector is treated as a four-element column vector with an implied fourth w coordinate of 1.

During a debug build, MTXMultVec is interpreted as C_MTXMultVec, which is a normal C language version. During a nondebug build for a Broadway processor, the paired-singles equivalent of this function, PSMTXMultVec, will be automatically substituted. You can also call each of C_MTXMultVec/PSMTXMultVec explicitly.

See Also

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

Revision History

2008/05/26 Corrected errors.
2006/03/01 Initial version.


CONFIDENTIAL