RE: [Algorithms] Creating the world matrix
Brought to you by:
vexxed72
From: Steve W. <Ste...@im...> - 2000-07-17 16:53:35
|
> From: Aldo . [mailto:al...@ho...] > > I'm looking for a fast way to create the world matrix from > the values of pitch, yaw, roll and position(and scaling factor, perhaps), > without using a matrix operation for each value. > I would like to avoid do the folowing > > WorldMatrix = MatrixIdentity(); > > MatrixScale(WorldMatrix, scale); > > MatrixTranslate(WorldMatrix, position); > > MatrixRotateX(WorldMatrix, pitch); > MatrixRotateY(WorldMatrix, yaw); > MatrixRotateZ(WorldMatrix, roll); > > SetWorldMatrix(WorldMatrix); > In the DirectX help Index select: 3-D Transformations. It has details on the matrices used for each method you list. If you want to hard code it into your app to eliminate un-necessary operations then you'll want to break each transform operation down to it's components and do the math. R&R |