xmatrix.cpp File Reference

(r1785/r1282)

#include "camtypes.h"

Go to the source code of this file.

Defines

#define RESULT
#define TORADIANS(x)   ((x)/180.0*PI)

Functions

 DECLARE_SOURCE ("$Revision: 1282 $")
XMatrix operator * (const XMatrix &op1, const XMatrix &op2)
 Matrix multiplication. Cannot be used in a nested form as the result is contained in a static local (e.g. a = (b*c)*(d*e) will fail).


Define Documentation

#define RESULT
 

Definition at line 113 of file xmatrix.cpp.

#define TORADIANS  )     ((x)/180.0*PI)
 

Definition at line 115 of file xmatrix.cpp.


Function Documentation

DECLARE_SOURCE "$Revision: 1282 $"   ) 
 

XMatrix operator * const XMatrix op1,
const XMatrix op2
 

Matrix multiplication. Cannot be used in a nested form as the result is contained in a static local (e.g. a = (b*c)*(d*e) will fail).

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/93
Parameters:
Two matrices to be multiplied. [INPUTS]
None. [OUTPUTS] Friend: Matrix
Returns:
result of multiplication.

Errors: None.

Definition at line 454 of file xmatrix.cpp.

00455 {
00456     static XMatrix result;
00457     
00458     result.a = ((op1.a * op2.a) + (op1.b * op2.c));
00459     result.b = ((op1.a * op2.b) + (op1.b * op2.d));
00460     result.c = ((op1.c * op2.a) + (op1.d * op2.c));
00461     result.d = ((op1.c * op2.b) + (op1.d * op2.d));
00462 
00463     XMatrixCalc(op2.a, op1.e, op2.c, op1.f, RESULT result.e);
00464     result.e += op2.e;
00465     XMatrixCalc(op2.b, op1.e, op2.d, op1.f, RESULT result.f);
00466     result.f += op2.f;
00467             
00468     return result;  
00469 }                   


Generated on Sat Nov 10 03:49:24 2007 for Camelot by  doxygen 1.4.4