140 lines
6.7 KiB
C
140 lines
6.7 KiB
C
/* ##H_FILE#
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
FILE : Xsl12_3D.h
|
|
MODULE : sl12 (Common Mathematic Library)
|
|
|
|
DESCRIPTION : 3D Vector-Matrix implementation
|
|
|
|
VERSION : sl12 V5.0.13 / Alexandre LANGER [ALX] Ubi R&D / Add Comments
|
|
|
|
VERSION PC
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
*/
|
|
|
|
/* -----------------27/04/98 16:23-------------------
|
|
* Conversion : OK avec version 23.04.98 19:26 (14197)
|
|
* --------------------------------------------------*/
|
|
|
|
#ifndef __MATRICES_VECTOR_SL12_3D__
|
|
#define __MATRICES_VECTOR_SL12_3D__
|
|
|
|
/* ##MACRO#----------------------------------------------------------------------------
|
|
MACRO definition
|
|
---------------------------------------------------------------------------------------*/
|
|
|
|
/* ##-###########################
|
|
## Matrix-Vector operations
|
|
############################## */
|
|
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vMulMatrixVectorWithoutBuffer
|
|
DESCRIPTION : Multiply a Matrix to a Vector : VectDest= MatA*VectA, VectDest must be
|
|
a other vector
|
|
INPUT : VectDest : address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
VectA : address of sl12_3D_tdstVector
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vMulMatrixVectorWithoutBuffer( VectDest, MatA, VectA) \
|
|
MTH3D_M_vMulMatrixVectorWithoutBuffer( VectDest, MatA, VectA)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vMulMatrixVector
|
|
DESCRIPTION : Multiply a Matrix to a Vector : VectDest= MatA*VectA
|
|
INPUT : VectDest : address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
VectA : address of sl12_3D_tdstVector
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vMulMatrixVector( VectDest, MatA, VectA) \
|
|
MTH3D_M_vMulMatrixVector( VectDest, MatA, VectA)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vGetColumnInMatrix
|
|
DESCRIPTION : Get a Vector column of a Matrix to a Vector : VectDest= columm col of MatA
|
|
INPUT : VectDest : address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
col : int
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vGetColumnInMatrix( VectDest, MatA, col ) \
|
|
MTH3D_M_vGetColumnInMatrix( VectDest, MatA, col )
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vSetColumnInMatrix
|
|
DESCRIPTION : Put a Vector to a column of a Matrix : Set columm col of MatDest with VectA
|
|
INPUT : MatDest : address of sl12_3D_tdstMatrix
|
|
VectA : address of sl12_3D_tdstVector
|
|
col : int
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vSetColumnInMatrix( MatDest, VectA, col) \
|
|
MTH3D_M_vSetColumnInMatrix( MatDest, VectA, col)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vGetLineInMatrix
|
|
DESCRIPTION : Get a Vector line of a Matrix to a Vector : VectDest= line lin of MatA
|
|
INPUT : VectDest : address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
lin : int
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vGetLineInMatrix( VectDest, MatA, lin ) \
|
|
MTH3D_M_vGetLineInMatrix( VectDest, MatA, lin )
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vSetLineInMatrix
|
|
DESCRIPTION : Put a Vector to a line of a Matrix : Set line lin of MatDest with VectA
|
|
INPUT : MatDest : address of sl12_3D_tdstMatrix
|
|
VectA : address of sl12_3D_tdstVector
|
|
lin : int
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vSetLineInMatrix( MatDest, VectA, lin) \
|
|
MTH3D_M_vSetLineInMatrix( MatDest, VectA, lin)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vGetDiagInMatrix
|
|
DESCRIPTION : Get a Vector diagonal of a Matrix to a Vector : VectDest= diagonal of MatA
|
|
INPUT : VectDest : address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vGetDiagInMatrix( VectDest, MatA) \
|
|
MTH3D_M_vGetDiagInMatrix( VectDest, MatA)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vSetDiagInMatrix
|
|
DESCRIPTION : Put a Vector to a diagonal of a Matrix : Set diagonal of MatDest with VectA
|
|
INPUT : MatDest : address of sl12_3D_tdstMatrix
|
|
VectA : address of sl12_3D_tdstVector
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vSetDiagInMatrix( MatDest, VectA) \
|
|
MTH3D_M_vSetDiagInMatrix( MatDest, VectA)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vGetVectorsInMatrix
|
|
DESCRIPTION : Get all column Matrix to two Vectors
|
|
INPUT : VaDest, VbDest, VcDest: address of sl12_3D_tdstVector
|
|
MatA : address of sl12_3D_tdstMatrix
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vGetVectorsInMatrix( VaDest, VbDest, VcDest, MatA) \
|
|
MTH3D_M_vGetVectorsInMatrix( VaDest, VbDest, VcDest, MatA)
|
|
|
|
/* ##M==================================================================================
|
|
NAME : sl12_3D_M_vSetVectorsInMatrix
|
|
DESCRIPTION : Set all column Matrix with two Vectors
|
|
INPUT : MatDest : address of sl12_3D_tdstMatrix
|
|
VectA, VectB, VectC : address of sl12_3D_tdstVector
|
|
OUTPUT : void
|
|
=======================================================================================*/
|
|
#define sl12_3D_M_vSetVectorsInMatrix( MatDest, VectA, VectB, VectC) \
|
|
MTH3D_M_vSetVectorsInMatrix( MatDest, VectA, VectB, VectC)
|
|
|
|
|
|
|
|
#endif /* __MATRICES_VECTOR_SL12_3D__ */
|