//*********************************************************************************
//
//
//
//             3D - graphics - Demo for PIC 18F4525 Mikrocontroller
//                      (C) 20.03.2005 by Daniel Porzig
//
//                      common Vector & Matrix functions
//
//
//*********************************************************************************


#ifndef _3DMATH_H_
#define _3DMATH_H_


typedef float Vector3[3];
typedef	float Matrix4x4[4][4];


void V3_Set(Vector3 v,float x,float y,float z);
void V3_Copy(Vector3 dst, Vector3 src);



void M4X4_Copy(Matrix4x4 dst, Matrix4x4 src);

void M4X4_Identity(Matrix4x4 m);

void M4X4_Mul(Matrix4x4 res, Matrix4x4 m1, Matrix4x4 m2);

void M4X4_MulSelf(Matrix4x4 m1, Matrix4x4 m2);

void MatrixVectorMul(Vector3 res, Vector3 v, Matrix4x4 m);

#endif // _3DMATH_H_
