OSDN Git Service

#32713 初コミット。SVNrev567時点での、ファイルはbranch/140707(ReBuild XGVersion)から移行したもの。
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / math / Quaternion.h
1 /*
2 * Copyright (c) 2007-2010 SlimDX Group
3
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22 #pragma once
23
24 #include "../design/QuaternionConverter.h"
25
26 using System::Runtime::InteropServices::OutAttribute;
27
28 namespace SlimDX
29 {
30         value class Matrix;
31         value class Vector3;
32         
33         /// <summary>
34         /// Defines a four dimensional mathematical quaternion.
35         /// </summary>
36         /// <unmanaged>D3DXQUATERNION</unmanaged>
37         [System::Serializable]
38         [System::Runtime::InteropServices::StructLayout( System::Runtime::InteropServices::LayoutKind::Sequential )]
39         [System::ComponentModel::TypeConverter( SlimDX::Design::QuaternionConverter::typeid )]
40         public value class Quaternion : System::IEquatable<Quaternion>
41         {
42         public:
43                 /// <summary>
44                 /// Gets or sets the X component of the quaternion.
45                 /// </summary>
46                 /// <value>The X component of the quaternion.</value>
47                 float X;
48
49                 /// <summary>
50                 /// Gets or sets the Y component of the quaternion.
51                 /// </summary>
52                 /// <value>The Y component of the quaternion.</value>
53                 float Y;
54
55                 /// <summary>
56                 /// Gets or sets the Z component of the quaternion.
57                 /// </summary>
58                 /// <value>The Z component of the quaternion.</value>
59                 float Z;
60
61                 /// <summary>
62                 /// Gets or sets the W component of the quaternion.
63                 /// </summary>
64                 /// <value>The W component of the quaternion.</value>
65                 float W;
66
67                 /// <summary>
68                 /// Initializes a new instance of the <see cref="Quaternion"/> structure.
69                 /// </summary>
70                 /// <param name="x">The X component of the quaternion.</param>
71                 /// <param name="y">The Y component of the quaternion.</param>
72                 /// <param name="z">The Z component of the quaternion.</param>
73                 /// <param name="w">The W component of the quaternion.</param>
74                 Quaternion( float x, float y, float z, float w );
75
76                 /// <summary>
77                 /// Initializes a new instance of the <see cref="Quaternion"/> structure.
78                 /// </summary>
79                 /// <param name="value">A <see cref="Vector3"/> containing the first three values of the quaternion.</param>
80                 /// <param name="w">The W component of the quaternion.</param>
81                 Quaternion( Vector3 value, float w );
82
83                 /// <summary>
84                 /// Gets the identity <see cref="Quaternion"/> (0, 0, 0, 1).
85                 /// </summary>
86                 static property Quaternion Identity { Quaternion get(); }
87
88                 /// <summary>
89                 /// Gets a value indicating whether this instance is an identity <see cref="Quaternion"/>.
90                 /// </summary>
91                 [System::ComponentModel::Browsable(false)]
92                 property bool IsIdentity { bool get(); }
93
94                 /// <summary>
95                 /// Gets the axis components of the quaternion.
96                 /// </summary>
97                 property Vector3 Axis { Vector3 get(); }
98
99                 /// <summary>
100                 /// Gets the angle of the quaternion.
101                 /// </summary>
102                 property float Angle { float get(); }
103
104                 /// <summary>
105                 /// Calculates the length of the quaternion.
106                 /// </summary>
107                 /// <returns>The length of the quaternion.</returns>
108                 float Length();
109
110                 /// <summary>
111                 /// Calculates the squared length of the quaternion.
112                 /// </summary>
113                 /// <returns>The squared length of the quaternion.</returns>
114                 float LengthSquared();
115
116                 /// <summary>
117                 /// Converts the quaternion into a unit quaternion.
118                 /// </summary>
119                 void Normalize();
120
121                 /// <summary>
122                 /// Conjugates the quaternion.
123                 /// </summary>
124                 void Conjugate();
125
126                 /// <summary>
127                 /// Conjugates and renormalizes the quaternion.
128                 /// </summary>
129                 void Invert();
130
131                 /// <summary>
132                 /// Adds two quaternions.
133                 /// </summary>
134                 /// <param name="left">The first quaternion to add.</param>
135                 /// <param name="right">The second quaternion to add.</param>
136                 /// <returns>The sum of the two quaternions.</returns>
137                 static Quaternion Add( Quaternion left, Quaternion right );
138
139                 /// <summary>
140                 /// Adds two quaternions.
141                 /// </summary>
142                 /// <param name="left">The first quaternion to add.</param>
143                 /// <param name="right">The second quaternion to add.</param>
144                 /// <param name="result">When the method completes, contains the sum of the two quaternions.</param>
145                 static void Add( Quaternion% left, Quaternion% right, [Out] Quaternion% result );
146
147                 /// <summary>
148                 /// Returns a <see cref="Quaternion"/> containing the 4D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 2D triangle.
149                 /// </summary>
150                 /// <param name="source1">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 1 of the triangle.</param>
151                 /// <param name="source2">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 2 of the triangle.</param>
152                 /// <param name="source3">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 3 of the triangle.</param>
153                 /// <param name="weight1">Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in <paramref name="source2"/>).</param>
154                 /// <param name="weight2">Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in <paramref name="source3"/>).</param>
155                 /// <returns>A new <see cref="Quaternion"/> containing the 4D Cartesian coordinates of the specified point.</returns>
156                 static Quaternion Barycentric( Quaternion source1, Quaternion source2, Quaternion source3, float weight1, float weight2 );
157                 
158                 /// <summary>
159                 /// Returns a <see cref="Quaternion"/> containing the 4D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 2D triangle.
160                 /// </summary>
161                 /// <param name="source1">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 1 of the triangle.</param>
162                 /// <param name="source2">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 2 of the triangle.</param>
163                 /// <param name="source3">A <see cref="Quaternion"/> containing the 4D Cartesian coordinates of vertex 3 of the triangle.</param>
164                 /// <param name="weight1">Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in <paramref name="source2"/>).</param>
165                 /// <param name="weight2">Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in <paramref name="source3"/>).</param>
166                 /// <param name="result">When the method completes, contains a new <see cref="Quaternion"/> containing the 4D Cartesian coordinates of the specified point.</param>
167                 static void Barycentric( Quaternion% source1, Quaternion% source2, Quaternion% source3, float weight1, float weight2, [Out] Quaternion% result );
168
169                 /// <summary>
170                 /// Conjugates a quaternion.
171                 /// </summary>
172                 /// <param name="quaternion">The quaternion to conjugate.</param>
173                 /// <returns>The conjugated quaternion.</returns>
174                 static Quaternion Conjugate( Quaternion quaternion );
175
176                 /// <summary>
177                 /// Conjugates a quaternion.
178                 /// </summary>
179                 /// <param name="quaternion">The quaternion to conjugate.</param>
180                 /// <param name="result">When the method completes, contains the conjugated quaternion.</param>
181                 static void Conjugate( Quaternion% quaternion, [Out] Quaternion% result );
182
183                 /// <summary>
184                 /// Divides a quaternion by another.
185                 /// </summary>
186                 /// <param name="left">The first quaternion to divide.</param>
187                 /// <param name="right">The second quaternion to divide.</param>
188                 /// <returns>The divided quaternion.</returns>
189                 static Quaternion Divide( Quaternion left, Quaternion right );
190
191                 /// <summary>
192                 /// Divides a quaternion by another.
193                 /// </summary>
194                 /// <param name="left">The first quaternion to divide.</param>
195                 /// <param name="right">The second quaternion to divide.</param>
196                 /// <returns>The divided quaternion.</returns>
197                 static void Divide( Quaternion% left, Quaternion% right, [Out] Quaternion% result );
198
199                 /// <summary>
200                 /// Calculates the dot product of two quaternions.
201                 /// </summary>
202                 /// <param name="left">First source quaternion.</param>
203                 /// <param name="right">Second source quaternion.</param>
204                 /// <returns>The dot product of the two quaternions.</returns>
205                 static float Dot( Quaternion left, Quaternion right );
206
207                 /// <summary>
208                 /// Exponentiates a quaternion.
209                 /// </summary>
210                 /// <param name="quaternion">The quaternion to exponentiate.</param>
211                 /// <returns>The exponentiated quaternion.</returns>
212                 static Quaternion Exponential( Quaternion quaternion );
213
214                 /// <summary>
215                 /// Exponentiates a quaternion.
216                 /// </summary>
217                 /// <param name="quaternion">The quaternion to exponentiate.</param>
218                 /// <param name="result">When the method completes, contains the exponentiated quaternion.</param>
219                 static void Exponential( Quaternion% quaternion, [Out] Quaternion% result );
220
221                 /// <summary>
222                 /// Conjugates and renormalizes the quaternion.
223                 /// </summary>
224                 /// <param name="quaternion">The quaternion to conjugate and renormalize.</param>
225                 /// <returns>The conjugated and renormalized quaternion.</returns>
226                 static Quaternion Invert( Quaternion quaternion );
227
228                 /// <summary>
229                 /// Conjugates and renormalizes the quaternion.
230                 /// </summary>
231                 /// <param name="quaternion">The quaternion to conjugate and renormalize.</param>
232                 /// <param name="result">When the method completes, contains the conjugated and renormalized quaternion.</param>
233                 static void Invert( Quaternion% quaternion, [Out] Quaternion% result );
234
235                 /// <summary>
236                 /// Performs a linear interpolation between two quaternion.
237                 /// </summary>
238                 /// <param name="start">Start quaternion.</param>
239                 /// <param name="end">End quaternion.</param>
240                 /// <param name="amount">Value between 0 and 1 indicating the weight of <paramref name="end"/>.</param>
241                 /// <returns>The linear interpolation of the two quaternions.</returns>
242                 /// <remarks>
243                 /// This method performs the linear interpolation based on the following formula.
244                 /// <code>start + (end - start) * amount</code>
245                 /// Passing <paramref name="amount"/> a value of 0 will cause <paramref name="start"/> to be returned; a value of 1 will cause <paramref name="end"/> to be returned. 
246                 /// </remarks>
247                 static Quaternion Lerp( Quaternion start, Quaternion end, float amount );
248
249                 /// <summary>
250                 /// Performs a linear interpolation between two quaternions.
251                 /// </summary>
252                 /// <param name="start">Start quaternion.</param>
253                 /// <param name="end">End quaternion.</param>
254                 /// <param name="amount">Value between 0 and 1 indicating the weight of <paramref name="end"/>.</param>
255                 /// <param name="result">When the method completes, contains the linear interpolation of the two quaternions.</param>
256                 /// <remarks>
257                 /// This method performs the linear interpolation based on the following formula.
258                 /// <code>start + (end - start) * amount</code>
259                 /// Passing <paramref name="amount"/> a value of 0 will cause <paramref name="start"/> to be returned; a value of 1 will cause <paramref name="end"/> to be returned. 
260                 /// </remarks>
261                 static void Lerp( Quaternion% start, Quaternion% end, float amount, [Out] Quaternion% result );
262
263                 /// <summary>
264                 /// Calculates the natural logarithm of the specified quaternion.
265                 /// </summary>
266                 /// <param name="quaternion">The quaternion whose logarithm will be calculated.</param>
267                 /// <returns>The natural logarithm of the quaternion.</returns>
268                 static Quaternion Logarithm( Quaternion quaternion );
269
270                 /// <summary>
271                 /// Calculates the natural logarithm of the specified quaternion.
272                 /// </summary>
273                 /// <param name="quaternion">The quaternion whose logarithm will be calculated.</param>
274                 /// <param name="result">When the method completes, contains the natural logarithm of the quaternion.</param>
275                 static void Logarithm( Quaternion% quaternion, [Out] Quaternion% result );
276
277                 /// <summary>
278                 /// Modulates a quaternion by another.
279                 /// </summary>
280                 /// <param name="left">The first quaternion to modulate.</param>
281                 /// <param name="right">The second quaternion to modulate.</param>
282                 /// <returns>The modulated quaternion.</returns>
283                 static Quaternion Multiply( Quaternion left, Quaternion right );
284
285                 /// <summary>
286                 /// Modulates a quaternion by another.
287                 /// </summary>
288                 /// <param name="left">The first quaternion to modulate.</param>
289                 /// <param name="right">The second quaternion to modulate.</param>
290                 /// <param name="result">When the moethod completes, contains the modulated quaternion.</param>
291                 static void Multiply( Quaternion% left, Quaternion% right, [Out] Quaternion% result );
292
293                 /// <summary>
294                 /// Scales a quaternion by the given value.
295                 /// </summary>
296                 /// <param name="quaternion">The quaternion to scale.</param>
297                 /// <param name="scale">The amount by which to scale the quaternion.</param>
298                 /// <returns>The scaled quaternion.</returns>
299                 static Quaternion Multiply( Quaternion quaternion, float scale );
300
301                 /// <summary>
302                 /// Scales a quaternion by the given value.
303                 /// </summary>
304                 /// <param name="quaternion">The quaternion to scale.</param>
305                 /// <param name="scale">The amount by which to scale the quaternion.</param>
306                 /// <param name="result">When the method completes, contains the scaled quaternion.</param>
307                 static void Multiply( Quaternion% quaternion, float scale, [Out] Quaternion% result );
308
309                 /// <summary>
310                 /// Reverses the direction of a given quaternion.
311                 /// </summary>
312                 /// <param name="quaternion">The quaternion to negate.</param>
313                 /// <returns>A quaternion facing in the opposite direction.</returns>
314                 static Quaternion Negate( Quaternion quaternion );
315
316                 /// <summary>
317                 /// Reverses the direction of a given quaternion.
318                 /// </summary>
319                 /// <param name="quaternion">The quaternion to negate.</param>
320                 /// <param name="result">When the method completes, contains a quaternion facing in the opposite direction.</param>
321                 static void Negate( Quaternion% quaternion, [Out] Quaternion% result );
322
323                 /// <summary>
324                 /// Converts the quaternion into a unit quaternion.
325                 /// </summary>
326                 /// <param name="quaternion">The quaternion to normalize.</param>
327                 /// <returns>The normalized quaternion.</returns>
328                 static Quaternion Normalize( Quaternion quaternion );
329
330                 /// <summary>
331                 /// Converts the quaternion into a unit quaternion.
332                 /// </summary>
333                 /// <param name="quaternion">The quaternion to normalize.</param>
334                 /// <param name="result">When the method completes, contains the normalized quaternion.</param>
335                 static void Normalize( Quaternion% quaternion, [Out] Quaternion% result );
336
337                 /// <summary>
338                 /// Creates a quaternion given a rotation and an axis.
339                 /// </summary>
340                 /// <param name="axis">The axis of rotation.</param>
341                 /// <param name="angle">The angle of rotation.</param>
342                 /// <returns>The newly created quaternion.</returns>
343                 static Quaternion RotationAxis( Vector3 axis, float angle );
344
345                 /// <summary>
346                 /// Creates a quaternion given a rotation and an axis.
347                 /// </summary>
348                 /// <param name="axis">The axis of rotation.</param>
349                 /// <param name="angle">The angle of rotation.</param>
350                 /// <param name="result">When the method completes, contains the newly created quaternion.</param>
351                 static void RotationAxis( Vector3% axis, float angle, [Out] Quaternion% result );
352
353                 /// <summary>
354                 /// Creates a quaternion given a rotation matrix.
355                 /// </summary>
356                 /// <param name="matrix">The rotation matrix.</param>
357                 /// <returns>The newly created quaternion.</returns>
358                 static Quaternion RotationMatrix( Matrix matrix );
359
360                 /// <summary>
361                 /// Creates a quaternion given a rotation matrix.
362                 /// </summary>
363                 /// <param name="matrix">The rotation matrix.</param>
364                 /// <param name="result">When the method completes, contains the newly created quaternion.</param>
365                 static void RotationMatrix( Matrix% matrix, [Out] Quaternion% result );
366
367                 /// <summary>
368                 /// Creates a quaternion given a yaw, pitch, and roll value.
369                 /// </summary>
370                 /// <param name="yaw">The yaw of rotation.</param>
371                 /// <param name="pitch">The pitch of rotation.</param>
372                 /// <param name="roll">The roll of rotation.</param>
373                 /// <returns>The newly created quaternion.</returns>
374                 static Quaternion RotationYawPitchRoll( float yaw, float pitch, float roll );
375
376                 /// <summary>
377                 /// Creates a quaternion given a yaw, pitch, and roll value.
378                 /// </summary>
379                 /// <param name="yaw">The yaw of rotation.</param>
380                 /// <param name="pitch">The pitch of rotation.</param>
381                 /// <param name="roll">The roll of rotation.</param>
382                 /// <param name="result">When the method completes, contains the newly created quaternion.</param>
383                 static void RotationYawPitchRoll( float yaw, float pitch, float roll, [Out] Quaternion% result );
384
385                 /// <summary>
386                 /// Interpolates between two quaternions, using spherical linear interpolation.
387                 /// </summary>
388                 /// <param name="start">Start quaternion.</param>
389                 /// <param name="end">End quaternion.</param>
390                 /// <param name="amount">Value between 0 and 1 indicating the weight of <paramref name="end"/>.</param>
391                 /// <returns>The spherical linear interpolation of the two quaternions.</returns>
392                 static Quaternion Slerp( Quaternion start, Quaternion end, float amount );
393
394                 /// <summary>
395                 /// Interpolates between two quaternions, using spherical linear interpolation.
396                 /// </summary>
397                 /// <param name="start">Start quaternion.</param>
398                 /// <param name="end">End quaternion.</param>
399                 /// <param name="amount">Value between 0 and 1 indicating the weight of <paramref name="end"/>.</param>
400                 /// <param name="result">When the method completes, contains the spherical linear interpolation of the two quaternions.</param>
401                 static void Slerp( Quaternion% start, Quaternion% end, float amount, [Out] Quaternion% result );
402
403                 /// <summary>
404                 /// Interpolates between quaternions, using spherical quadrangle interpolation.
405                 /// </summary>
406                 /// <param name="source1">First source quaternion.</param>
407                 /// <param name="source2">Second source quaternion.</param>
408                 /// <param name="source3">Thrid source quaternion.</param>
409                 /// <param name="source4">Fourth source quaternion.</param>
410                 /// <param name="amount">Value between 0 and 1 indicating the weight of interpolation.</param>
411                 /// <returns>The spherical quadrangle interpolation of the quaternions.</returns>
412                 static Quaternion Squad( Quaternion source1, Quaternion source2, Quaternion source3, Quaternion source4, float amount );
413                 
414                 /// <summary>
415                 /// Interpolates between quaternions, using spherical quadrangle interpolation.
416                 /// </summary>
417                 /// <param name="source1">First source quaternion.</param>
418                 /// <param name="source2">Second source quaternion.</param>
419                 /// <param name="source3">Thrid source quaternion.</param>
420                 /// <param name="source4">Fourth source quaternion.</param>
421                 /// <param name="amount">Value between 0 and 1 indicating the weight of interpolation.</param>
422                 /// <param name="result">When the method completes, contains the spherical quadrangle interpolation of the quaternions.</param>
423                 static void Squad( Quaternion% source1, Quaternion% source2, Quaternion% source3, Quaternion% source4, float amount, [Out] Quaternion% result );
424
425                 /// <summary>
426                 /// Sets up control points for spherical quadrangle interpolation.
427                 /// </summary>
428                 /// <param name="source1">First source quaternion.</param>
429                 /// <param name="source2">Second source quaternion.</param>
430                 /// <param name="source3">Third source quaternion.</param>
431                 /// <param name="source4">Fourth source quaternion.</param>
432                 /// <returns>An array of three quaternions that represent control points for spherical quadrangle interpolation.</returns>
433                 static array<Quaternion>^ SquadSetup( Quaternion source1, Quaternion source2, Quaternion source3, Quaternion source4 );
434
435                 /// <summary>
436                 /// Subtracts two quaternions.
437                 /// </summary>
438                 /// <param name="left">The first quaternion to subtract.</param>
439                 /// <param name="right">The second quaternion to subtract.</param>
440                 /// <returns>The difference of the two quaternions.</returns>
441                 static Quaternion Subtract( Quaternion left, Quaternion right );
442
443                 /// <summary>
444                 /// Subtracts two quaternions.
445                 /// </summary>
446                 /// <param name="left">The first quaternion to subtract.</param>
447                 /// <param name="right">The second quaternion to subtract.</param>
448                 /// <param name="result">When the method completes, contains the difference of the two quaternions.</param>
449                 static void Subtract( Quaternion% left, Quaternion% right, [Out] Quaternion% result );
450
451                 /// <summary>
452                 /// Multiplies a quaternion by another.
453                 /// </summary>
454                 /// <param name="left">The first quaternion to multiply.</param>
455                 /// <param name="right">The second quaternion to multiply.</param>
456                 /// <returns>The multiplied quaternion.</returns>
457                 static Quaternion operator * ( Quaternion left, Quaternion right );
458
459                 /// <summary>
460                 /// Scales a quaternion by the given value.
461                 /// </summary>
462                 /// <param name="quaternion">The quaternion to scale.</param>
463                 /// <param name="scale">The amount by which to scale the quaternion.</param>
464                 /// <returns>The scaled quaternion.</returns>
465                 static Quaternion operator * ( Quaternion quaternion, float scale );
466
467                 /// <summary>
468                 /// Scales a quaternion by the given value.
469                 /// </summary>
470                 /// <param name="quaternion">The quaternion to scale.</param>
471                 /// <param name="scale">The amount by which to scale the quaternion.</param>
472                 /// <returns>The scaled quaternion.</returns>
473                 static Quaternion operator * ( float scale, Quaternion quaternion );
474
475                 /// <summary>
476                 /// Divides a quaternion by another.
477                 /// </summary>
478                 /// <param name="left">The first quaternion to divide.</param>
479                 /// <param name="right">The second quaternion to divide.</param>
480                 /// <returns>The divided quaternion.</returns>
481                 static Quaternion operator / ( Quaternion left, float right );
482
483                 /// <summary>
484                 /// Adds two quaternions.
485                 /// </summary>
486                 /// <param name="left">The first quaternion to add.</param>
487                 /// <param name="right">The second quaternion to add.</param>
488                 /// <returns>The sum of the two quaternions.</returns>
489                 static Quaternion operator + ( Quaternion left, Quaternion right );
490
491                 /// <summary>
492                 /// Subtracts two quaternions.
493                 /// </summary>
494                 /// <param name="left">The first quaternion to subtract.</param>
495                 /// <param name="right">The second quaternion to subtract.</param>
496                 /// <returns>The difference of the two quaternions.</returns>
497                 static Quaternion operator - ( Quaternion left, Quaternion right );
498
499                 /// <summary>
500                 /// Reverses the direction of a given quaternion.
501                 /// </summary>
502                 /// <param name="quaternion">The quaternion to negate.</param>
503                 /// <returns>A quaternion facing in the opposite direction.</returns>
504                 static Quaternion operator - ( Quaternion quaternion );
505
506                 /// <summary>
507                 /// Tests for equality between two objects.
508                 /// </summary>
509                 /// <param name="left">The first value to compare.</param>
510                 /// <param name="right">The second value to compare.</param>
511                 /// <returns><c>true</c> if <paramref name="left"/> has the same value as <paramref name="right"/>; otherwise, <c>false</c>.</returns>
512                 static bool operator == ( Quaternion left, Quaternion right );
513
514                 /// <summary>
515                 /// Tests for inequality between two objects.
516                 /// </summary>
517                 /// <param name="left">The first value to compare.</param>
518                 /// <param name="right">The second value to compare.</param>
519                 /// <returns><c>true</c> if <paramref name="left"/> has a different value than <paramref name="right"/>; otherwise, <c>false</c>.</returns>
520                 static bool operator != ( Quaternion left, Quaternion right );
521
522                 /// <summary>
523                 /// Converts the value of the object to its equivalent string representation.
524                 /// </summary>
525                 /// <returns>The string representation of the value of this instance.</returns>
526                 virtual System::String^ ToString() override;
527
528                 /// <summary>
529                 /// Returns the hash code for this instance.
530                 /// </summary>
531                 /// <returns>A 32-bit signed integer hash code.</returns>
532                 virtual int GetHashCode() override;
533
534                 /// <summary>
535                 /// Returns a value that indicates whether the current instance is equal to a specified object. 
536                 /// </summary>
537                 /// <param name="obj">Object to make the comparison with.</param>
538                 /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>
539                 virtual bool Equals( System::Object^ obj ) override;
540
541                 /// <summary>
542                 /// Returns a value that indicates whether the current instance is equal to the specified object. 
543                 /// </summary>
544                 /// <param name="other">Object to make the comparison with.</param>
545                 /// <returns><c>true</c> if the current instance is equal to the specified object; <c>false</c> otherwise.</returns>
546                 virtual bool Equals( Quaternion other );
547
548                 /// <summary>
549                 /// Determines whether the specified object instances are considered equal. 
550                 /// </summary>
551                 /// <param name="value1"></param>
552                 /// <param name="value2"></param>
553                 /// <returns><c>true</c> if <paramref name="value1"/> is the same instance as <paramref name="value2"/> or 
554                 /// if both are <c>null</c> references or if <c>value1.Equals(value2)</c> returns <c>true</c>; otherwise, <c>false</c>.</returns>
555                 static bool Equals( Quaternion% value1, Quaternion% value2 );
556         };
557 }