[Algorithms] Creating the world matrix
Brought to you by:
vexxed72
From: Aldo . <al...@ho...> - 2000-07-17 14:01:01
|
Hi! 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); Yes, I know the code is not efficient, and perhaps wrong, but its only a example. I'm using D3D Immediate Mode. Any ideas? Thanks in advance. Aldo ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com |