*/
Written some cool source code? Upload it to Programmer's Heaven.
*/

View \MATRIX44.H

3d Libmatrix

Submitted By: Unknown
Rating: starstarhalf star (Rate It)


/*
    4x4 matrix, 3d oriented functions
    5-19-97, 5:10 PM
    [[Email Removed]]
*/


#ifndef _MATRIX44_H_
#define _MATRIX44_H_

#include "shared.h"

#ifdef __cplusplus
extern "C" {
#endif

#define pi 3.14159265358
#define matrixCopy(m1,m2) repmovsd((byte *)m1,(byte *)m2,sizeof(matrix44)>>2)

typedef real matrix44[4][4];

void matrixIdentity(matrix44 m);
void matrixMultiply(matrix44 m1, matrix44 m2);
void matrixPrint(matrix44 m);
void matrixXRotation(matrix44 m, real angle);
void matrixYRotation(matrix44 m, real angle);
void matrixZRotation(matrix44 m, real angle);
void matrixXYZRotation(matrix44 m, real xangle, real yangle, real zangle);
void matrixTranslation(matrix44 m, real dx, real dy, real dz);
void matrixScale(matrix44 m, real sx, real sy, real sz);
void matrixTranspose(matrix44 m);

#ifdef __cplusplus
}
#endif

#endif

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.