2 * Copyright(c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 internal class Matrix3 : Disposable
22 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23 protected bool swigCMemOwn;
25 internal Matrix3(global::System.IntPtr cPtr, bool cMemoryOwn)
27 swigCMemOwn = cMemoryOwn;
28 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Matrix3 obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 protected override void Dispose(DisposeTypes type)
43 //Release your own unmanaged resources here.
44 //You should not access any managed member here except static instance.
45 //because the execution order of Finalizes is non-deterministic.
47 if (swigCPtr.Handle != global::System.IntPtr.Zero)
52 Interop.Matrix.delete_Matrix3(swigCPtr);
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60 public static Matrix3 IDENTITY
64 global::System.IntPtr cPtr = Interop.Matrix.Matrix3_IDENTITY_get();
65 Matrix3 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix3(cPtr, false);
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 public Matrix3() : this(Interop.Matrix.new_Matrix3__SWIG_0(), true)
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76 public Matrix3(Matrix3 m) : this(Interop.Matrix.new_Matrix3__SWIG_1(Matrix3.getCPtr(m)), true)
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81 public Matrix3(Matrix m) : this(Interop.Matrix.new_Matrix3__SWIG_2(Matrix.getCPtr(m)), true)
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 public Matrix3(float s00, float s01, float s02, float s10, float s11, float s12, float s20, float s21, float s22) : this(Interop.Matrix.new_Matrix3__SWIG_3(s00, s01, s02, s10, s11, s12, s20, s21, s22), true)
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 public Matrix3 Assign(Matrix3 matrix)
93 Matrix3 ret = new Matrix3(Interop.Matrix.Matrix3_Assign__SWIG_0(swigCPtr, Matrix3.getCPtr(matrix)), false);
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 public Matrix3 Assign(Matrix matrix)
100 Matrix3 ret = new Matrix3(Interop.Matrix.Matrix3_Assign__SWIG_1(swigCPtr, Matrix.getCPtr(matrix)), false);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 public bool EqualTo(Matrix3 rhs)
107 bool ret = Interop.Matrix.Matrix3_EqualTo(swigCPtr, Matrix3.getCPtr(rhs));
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 public bool NotEqualTo(Matrix3 rhs)
114 bool ret = Interop.Matrix.Matrix3_NotEqualTo(swigCPtr, Matrix3.getCPtr(rhs));
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 public void SetIdentity()
121 Interop.Matrix.Matrix3_SetIdentity(swigCPtr);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 public SWIGTYPE_p_float AsFloat()
127 global::System.IntPtr cPtr = Interop.Matrix.Matrix3_AsFloat__SWIG_0(swigCPtr);
128 SWIGTYPE_p_float ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 bool ret = Interop.Matrix.Matrix3_Invert(swigCPtr);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public bool Transpose()
142 bool ret = Interop.Matrix.Matrix3_Transpose(swigCPtr);
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 public void Scale(float scale)
149 Interop.Matrix.Matrix3_Scale(swigCPtr, scale);
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 public float Magnitude()
155 float ret = Interop.Matrix.Matrix3_Magnitude(swigCPtr);
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 public bool ScaledInverseTranspose()
162 bool ret = Interop.Matrix.Matrix3_ScaledInverseTranspose(swigCPtr);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public static void Multiply(Matrix3 result, Matrix3 lhs, Matrix3 rhs)
169 Interop.Matrix.Matrix3_Multiply(Matrix3.getCPtr(result), Matrix3.getCPtr(lhs), Matrix3.getCPtr(rhs));
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();