/*=========================================================================
*
* Vertex.h	- vertex functions
*
* Version			1.0
* Revision date
*
*=======================================================================*/
#ifndef VERTEX_H
#define VERTEX_H

//--- Includes --------------------------------------------------------

#include "MTH.h"


//--- Defines --------------------------------------------------------

#define MLT_M_SetVertexX(A,B)			MTH3D_M_vSetXofVector(A,B)

#define MLT_M_SetVertexY(A,B)			MTH3D_M_vSetYofVector(A,B)

#define MLT_M_SetVertexZ(A,B)			MTH3D_M_vSetZofVector(A,B)

#define MLT_M_SetVertexXYZ(A,B,C,D)     MTH3D_M_vSetVectorElements(A,B,C,D)
          
#define MLT_M_GetVertexX(A,B)			*(B) = MTH3D_M_xGetXofVector(A)

#define MLT_M_GetVertexY(A,B)			*(B) = MTH3D_M_xGetYofVector(A)

#define MLT_M_GetVertexZ(A,B)			*(B) = MTH3D_M_xGetZofVector(A)

#define MLT_M_GetVertexXYZ(A,B,C,D)		MTH3D_M_vGetVectorElements(B,C,D,A)     // WARNING !!! INVERSION OF PARAMS

#define MLT_M_NullVertex(A)				MTH3D_M_vNullVector(A)

#define MLT_M_AddVertex(A,B)			MTH3D_M_vAddVector(A,A,B)

#define MLT_M_SubVertex(A,B)			MTH3D_M_vSubVector(A,A,B)

#define MLT_M_MulVertex(A,B)			MTH3D_M_vMulScalarVector(A,B,A)

#define MLT_M_DotProduct(A,B)			MTH3D_M_xDotProductVector(A,B)

#define MLT_M_CrossProduct(A,B,C)       MTH3D_M_vCrossProductVector( A, B, C)

#define MLT_M_Norme(A)					MTH3D_M_xNormVector(A)

#define MLT_M_Normalize(A)				MTH3D_M_vNormalizeVector(A, A)

#define MLT_M_ScaleVertex(A,B)			(A)->xX = MLT_M_Mul( (A)->xX , (B)->xX ) ; \
										(A)->xY = MLT_M_Mul( (A)->xY , (B)->xY ) ; \
										(A)->xZ = MLT_M_Mul( (A)->xZ , (B)->xZ )      // WARNING A FAIRE : AJOUTER A MTH !!!! 


#endif // VERTEX_H




