stub out the Projection classes as well as duplicating the disgusting hack used for...
[moon.git] / class / System.Windows / System.Windows.Media3D / UnmanagedMatrix3D.cs
blob6c96a321aabe8905dad107829b384791d517079d
1 //
2 // System.Windows.Media.UnmanagedMatrix DO
3 //
4 // Contact:
5 // Moonlight List (moonlight-list@lists.ximian.com)
6 //
7 // Copyright (C) 2009 Novell, Inc (http://www.novell.com)
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using Mono;
31 namespace System.Windows.Media3D {
33 // the unmanaged Matrix3D is a DependencyObject so we can set it's value from JScript
34 internal partial class UnmanagedMatrix3D : DependencyObject {
36 // FIXME: introduce a private DP that allows us to set all values in a single SetValue call
37 public static readonly DependencyProperty M11Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M11", typeof (double));
38 public static readonly DependencyProperty M12Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M12", typeof (double));
39 public static readonly DependencyProperty M13Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M13", typeof (double));
40 public static readonly DependencyProperty M14Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M14", typeof (double));
41 public static readonly DependencyProperty M21Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M21", typeof (double));
42 public static readonly DependencyProperty M22Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M22", typeof (double));
43 public static readonly DependencyProperty M23Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M23", typeof (double));
44 public static readonly DependencyProperty M24Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M24", typeof (double));
45 public static readonly DependencyProperty M31Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M31", typeof (double));
46 public static readonly DependencyProperty M32Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M32", typeof (double));
47 public static readonly DependencyProperty M33Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M33", typeof (double));
48 public static readonly DependencyProperty M34Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M34", typeof (double));
49 public static readonly DependencyProperty OffsetXProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetX", typeof (double));
50 public static readonly DependencyProperty OffsetYProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetY", typeof (double));
51 public static readonly DependencyProperty OffsetZProperty = DependencyProperty.Lookup (Kind.MATRIX3D, "OffsetZ", typeof (double));
52 public static readonly DependencyProperty M44Property = DependencyProperty.Lookup (Kind.MATRIX3D, "M44", typeof (double));
54 public UnmanagedMatrix3D (Matrix3D m) :
55 this ()
57 SetValue (UnmanagedMatrix3D.M11Property, m.M11);
58 SetValue (UnmanagedMatrix3D.M12Property, m.M12);
59 SetValue (UnmanagedMatrix3D.M13Property, m.M13);
60 SetValue (UnmanagedMatrix3D.M14Property, m.M14);
61 SetValue (UnmanagedMatrix3D.M21Property, m.M21);
62 SetValue (UnmanagedMatrix3D.M22Property, m.M22);
63 SetValue (UnmanagedMatrix3D.M23Property, m.M23);
64 SetValue (UnmanagedMatrix3D.M24Property, m.M24);
65 SetValue (UnmanagedMatrix3D.M31Property, m.M31);
66 SetValue (UnmanagedMatrix3D.M32Property, m.M32);
67 SetValue (UnmanagedMatrix3D.M33Property, m.M33);
68 SetValue (UnmanagedMatrix3D.M34Property, m.M34);
69 SetValue (UnmanagedMatrix3D.OffsetXProperty, m.OffsetX);
70 SetValue (UnmanagedMatrix3D.OffsetYProperty, m.OffsetY);
71 SetValue (UnmanagedMatrix3D.OffsetZProperty, m.OffsetZ);
72 SetValue (UnmanagedMatrix3D.M44Property, m.M44);