00001 /*========================================================================= 00002 00003 Program: Open IGT Link Library 00004 Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlMath.h $ 00005 Language: C++ 00006 Date: $Date: 2011-03-24 00:08:23 -0400 (Thu, 24 Mar 2011) $ 00007 Version: $Revision: 7354 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notices for more information. 00014 00015 =========================================================================*/ 00016 00017 #ifndef __igtlMath_h 00018 #define __igtlMath_h 00019 00020 #include "igtlWin32Header.h" 00021 00022 namespace igtl 00023 { 00024 00025 typedef float Matrix4x4[4][4]; 00026 00027 void IGTLCommon_EXPORT PrintMatrix(igtl::Matrix4x4 &matrix); 00028 void IGTLCommon_EXPORT PrintVector3(float v[3]); 00029 void IGTLCommon_EXPORT PrintVector3(float x, float y, float z); 00030 void IGTLCommon_EXPORT PrintVector4(float v[4]); 00031 void IGTLCommon_EXPORT PrintVector4(float x, float y, float z, float w); 00032 void IGTLCommon_EXPORT QuaternionToMatrix(float* q, Matrix4x4& m); 00033 void IGTLCommon_EXPORT MatrixToQuaternion(Matrix4x4& m, float* q); 00034 void IGTLCommon_EXPORT Cross(float *a, float *b, float *c); 00035 void IGTLCommon_EXPORT IdentityMatrix(igtl::Matrix4x4 &matrix); 00036 00037 } 00038 00039 #endif // __igtlMath_h 00040 00041 00042 00043