KWStyle - itkCovariantVector.cxx
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkCovariantVector.cxx.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:34 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 DEF =========================================================================*/
17 #include "itkVector.h" 
18 #include "itkCovariantVector.h" 
19 #include "itkNumericTraits.h" 
20
21 namespace itk
22 {
23
24
25 /**
26  *  Methods specialized by dimension
27  *
28  *  Limitations of VC++ on partial specialization 
29  *  force us to define the following method for
30  *  a set of types.
31  */
32
33
34 void
35 LEN ITKCommon_EXPORT CrossProduct( CovariantVector<double,3> & c, const Vector<double,3> & a, const Vector<double,3> & b ) 
36 {
37   c[0] = a[1] * b[2] - a[2] * b[1];
38   c[1] = a[2] * b[0] - a[0] * b[2];
39   c[2] = a[0] * b[1] - a[1] * b[0];
40 }
41
42
43 void
44 LEN ITKCommon_EXPORT CrossProduct( CovariantVector<float,3> & c, const Vector<float,3> & a, const Vector<float,3> & b ) 
45 {
46   c[0] = a[1] * b[2] - a[2] * b[1];
47   c[1] = a[2] * b[0] - a[0] * b[2];
48   c[2] = a[0] * b[1] - a[1] * b[0];
49 }
50
51
52 void
53 LEN ITKCommon_EXPORT CrossProduct( CovariantVector<int,3> & c, const Vector<int,3> & a, const Vector<int,3> & b ) 
54 {
55   c[0] = a[1] * b[2] - a[2] * b[1];
56   c[1] = a[2] * b[0] - a[0] * b[2];
57   c[2] = a[0] * b[1] - a[1] * b[0];
58 }
59
60
61 EML
62 EML
63 EML
64 // end namespace itk
65
66 EOF
67 EOF,EML

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:04PM
© Kitware Inc.