Cortex  10.0.0-a4
Convert.h
1 //
3 // Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // * Redistributions in binary form must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in the
14 // documentation and/or other materials provided with the distribution.
15 //
16 // * Neither the name of Image Engine Design nor the names of any
17 // other contributors to this software may be used to endorse or
18 // promote products derived from this software without specific prior
19 // written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
34 
35 #ifndef IE_COREMAYA_CONVERT_H
36 #define IE_COREMAYA_CONVERT_H
37 
38 #include "IECore/Convert.h"
39 #include "IECore/Data.h"
40 #include "IECore/TransformationMatrix.h"
41 
42 #include "OpenEXR/ImathVec.h"
43 #include "OpenEXR/ImathColor.h"
44 #include "OpenEXR/ImathBox.h"
45 #include "OpenEXR/ImathQuat.h"
46 #include "OpenEXR/ImathMatrix.h"
47 #include "OpenEXR/ImathEuler.h"
48 
49 #include "maya/MString.h"
50 #include "maya/MBoundingBox.h"
51 #include "maya/MPoint.h"
52 #include "maya/MVector.h"
53 #include "maya/MMatrix.h"
54 #include "maya/MFloatPoint.h"
55 #include "maya/MFloatVector.h"
56 #include "maya/MColor.h"
57 #include "maya/MQuaternion.h"
58 #include "maya/MTransformationMatrix.h"
59 #include "maya/MCommandResult.h"
60 #include "maya/MEulerRotation.h"
61 #include "maya/MDistance.h"
62 #include "maya/MAngle.h"
63 #include "maya/MTime.h"
64 
65 #include <string>
66 
69 namespace IECore
70 {
71 
72 template<>
73 std::string convert( const MString &from );
74 
75 template<>
76 MString convert( const std::string &from );
77 
78 template<>
79 Imath::V3f convert( const MVector &from );
80 
81 template<>
82 Imath::V3f convert( const MFloatVector &from );
83 
84 template<>
85 Imath::V3d convert( const MVector &from );
86 
87 template<>
88 Imath::V3d convert( const MFloatVector &from );
89 
90 template<>
91 Imath::V3f convert( const MPoint &from );
92 
93 template<>
94 Imath::V3f convert( const MFloatPoint &from );
95 
96 template<>
97 Imath::V3d convert( const MPoint &from );
98 
99 template<>
100 Imath::V3d convert( const MFloatPoint &from );
101 
102 template<>
103 MVector convert( const Imath::V3f &from );
104 
105 template<>
106 MVector convert( const Imath::V3d &from );
107 
108 template<>
109 MVector convert( const Imath::Color3f &from );
110 
111 template<>
112 MFloatVector convert( const Imath::V3f &from );
113 
114 template<>
115 MFloatVector convert( const Imath::V3d &from );
116 
117 template<>
118 MFloatVector convert( const Imath::Color3f &from );
119 
120 template<>
121 MPoint convert( const Imath::V3f &from );
122 
123 template<>
124 MPoint convert( const Imath::V3d &from );
125 
126 template<>
127 MFloatPoint convert( const Imath::V3f &from );
128 
129 template<>
130 MFloatPoint convert( const Imath::V3d &from );
131 
132 template<>
133 Imath::Color3f convert( const MVector &from );
134 
135 template<>
136 Imath::Color3f convert( const MColor &from );
137 
138 template<>
139 Imath::Color4f convert( const MColor &from );
140 
141 template<>
142 MColor convert( const Imath::Color3f &from );
143 
144 template<>
145 MColor convert( const Imath::Color4f &from );
146 
147 template<>
148 MBoundingBox convert( const Imath::Box3f &from );
149 
150 template<>
151 Imath::Box3f convert( const MBoundingBox &from );
152 
153 template<>
154 MBoundingBox convert( const Imath::Box3d &from );
155 
156 template<>
157 Imath::Box3d convert( const MBoundingBox &from );
158 
159 template<>
160 Imath::Quatf convert( const MQuaternion &from );
161 
162 template<>
163 MQuaternion convert( const Imath::Quatf &from );
164 
165 template<>
166 Imath::Quatd convert( const MQuaternion &from );
167 
168 template<>
169 MQuaternion convert( const Imath::Quatd &from );
170 
171 template<>
172 Imath::M44f convert( const MMatrix &from );
173 
174 template<>
175 Imath::M44d convert( const MMatrix &from );
176 
177 template<>
178 MMatrix convert( const Imath::M44f &from );
179 
180 template<>
181 MMatrix convert( const Imath::M44d &from );
182 
183 template<>
184 Imath::Eulerf convert( const MEulerRotation &from );
185 
186 template<>
187 MEulerRotation convert( const Imath::Eulerf &from );
188 
189 template<>
190 Imath::Eulerd convert( const MEulerRotation &from );
191 
192 template<>
193 MEulerRotation convert( const Imath::Eulerd &from );
194 
195 template<>
196 IECore::TransformationMatrixf convert( const MTransformationMatrix &from );
197 
198 template<>
199 MTransformationMatrix convert( const IECore::TransformationMatrixf &from );
200 
201 template<>
202 IECore::TransformationMatrixd convert( const MTransformationMatrix &from );
203 
204 template<>
205 MTransformationMatrix convert( const IECore::TransformationMatrixd &from );
206 
207 template<>
208 IECore::DataPtr convert( const MCommandResult &from );
209 
210 template<>
211 MDistance convert( const double &from );
212 
213 template<>
214 double convert( const MDistance &from );
215 
216 template<>
217 MAngle convert( const double &from );
218 
219 template<>
220 double convert( const MAngle &from );
221 
222 template<>
223 MTime convert( const double &from );
224 
225 template<>
226 double convert( const MTime &from );
227 
228 template<>
229 MDistance convert( const float &from );
230 
231 template<>
232 float convert( const MDistance &from );
233 
234 template<>
235 MAngle convert( const float &from );
236 
237 template<>
238 float convert( const MAngle &from );
239 
240 template<>
241 MTime convert( const float &from );
242 
243 template<>
244 float convert( const MTime &from );
245 
246 } // namespace IECore
247 
248 #endif // IE_COREMAYA_CONVERT_H
T convert(const F &from)
Definition: Convert.h:47
Definition: TransformationMatrix.h:53
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43