2 * Copyright(c) 2021 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.
19 using System.ComponentModel;
24 /// The Matrix class represents transformations and projections. <br/>
25 /// The matrix is stored as a flat array and is Column Major, i.e. the storage order is as follows (numbers represent indices of array): <br/>
32 /// Each axis is contiguous in memory, so the x-axis corresponds to elements 0, 1, 2 and 3, the y-axis corresponds to
33 /// elements 4, 5, 6, 7, the z-axis corresponds to elements 12, 13, 14 and 15, and the translation vector corresponds to
34 /// elements 12, 13 and 14.
36 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 public class Matrix : Disposable
40 internal Matrix(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
44 /// This will not be public opened.
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
48 Interop.Matrix.DeleteMatrix(swigCPtr);
52 /// The constructor initialized as zero.
54 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
55 [EditorBrowsable(EditorBrowsableState.Never)]
56 public Matrix() : this(Interop.Matrix.NewMatrix(), true)
58 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62 /// The constructor whether initialize matrix or not.
64 /// <param name="initialize">True if we want to initialize values as zero. False if we just allocate and do not initalize value.</param>
65 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 public Matrix(bool initialize) : this(Interop.Matrix.NewMatrix(initialize), true)
69 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73 /// The constructor with continuous float array.
75 /// <param name="array">Array of float value.</param>
77 /// Please note that NUI using column major matrix.
79 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public Matrix(float[] array) : this(Interop.Matrix.NewMatrix(array), true)
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 /// The constructor with Rotation to be rotation transform matrix.
89 /// <param name="rotation">Rotation information.</param>
90 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public Matrix(Rotation rotation) : this(Interop.Matrix.NewMatrixQuaternion(Rotation.getCPtr(rotation)), true)
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 /// <param name="matrix">Matrix to create this matrix from</param>
101 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public Matrix(Matrix matrix) : this(Interop.Matrix.NewMatrix(Matrix.getCPtr(matrix)), true)
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 /// <param name="rhs">A reference to the copied handle.</param>
112 /// <returns>A reference to this.</returns>
113 internal Matrix Assign(Matrix rhs)
115 Matrix ret = new Matrix(Interop.Matrix.Assign(SwigCPtr, Matrix.getCPtr(rhs)), false);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 /// The matrix as identity
129 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
130 [EditorBrowsable(EditorBrowsableState.Never)]
131 public static Matrix Identity
135 global::System.IntPtr cPtr = Interop.Matrix.IdentityGet();
136 Matrix ret = (cPtr == global::System.IntPtr.Zero) ? null : new Matrix(cPtr, false);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 /// Get/set the value of matrix by it's index.
145 /// <param name="index">The index to get/set value.</param>
146 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
147 [EditorBrowsable(EditorBrowsableState.Never)]
148 public float this[uint index]
152 SetValueAtIndex(index, value);
156 return ValueOfIndex(index);
161 /// Multiply Matrix and Vector4.
164 /// returns = lhs * rhs;
166 /// <param name="lhs">The left-hand-side Matrix.</param>
167 /// <param name="rhs">The right-hand-side Vector4.</param>
168 /// <returns>The vector multiply as lhs * rhs.</returns>
169 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
170 [EditorBrowsable(EditorBrowsableState.Never)]
171 public static Vector4 operator *(Matrix lhs, Vector4 rhs)
173 return lhs?.Multiply(rhs);
177 /// Multiply Rotation matrix and Matrix.
180 /// returns = lhs * rhs;
182 /// <param name="lhs">The left-hand-side Rotation.</param>
183 /// <param name="rhs">The right-hand-side Matrix.</param>
184 /// <returns>The Matrix multiply as lhs * rhs.</returns>
185 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
186 [EditorBrowsable(EditorBrowsableState.Never)]
187 public static Matrix operator *(Rotation lhs, Matrix rhs)
189 Matrix ret = new Matrix(false);
190 Matrix.Multiply(ret, rhs, lhs); // Note : Mutliply function be used for time-critical path. lhs and rhs is not matched as normal sense.
195 /// Multiply Matrix and Matrix.
198 /// returns = lhs * rhs;
200 /// <param name="lhs">The left-hand-side Matrix.</param>
201 /// <param name="rhs">The right-hand-side Matrix.</param>
202 /// <returns>The Matrix multiply as lhs * rhs.</returns>
203 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public static Matrix operator *(Matrix lhs, Matrix rhs)
207 return lhs?.Multiply(rhs);
211 /// Make matrix as identity.
213 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 public void SetIdentity()
217 Interop.Matrix.SetIdentity(SwigCPtr);
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 /// Make matrix as identity and multiply scale.
224 /// <param name="scale">The scale value to be multiplied into identity Matrix.</param>
225 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public void SetIdentityAndScale(Vector3 scale)
229 Interop.Matrix.SetIdentityAndScale(SwigCPtr, Vector3.getCPtr(scale));
230 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 /// Inverts a transform Matrix.<br/>
235 /// Any Matrix representing only a rotation and/or translation
236 /// can be inverted using this function. It is faster and more accurate then using Invert().
238 /// <param name="result">The inverse of this Matrix.</param>
239 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
240 [EditorBrowsable(EditorBrowsableState.Never)]
241 public void InvertTransform(Matrix result)
243 Interop.Matrix.InvertTransform(SwigCPtr, Matrix.getCPtr(result));
244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 /// Generic brute force matrix invert.
250 /// <returns>True if successful.</returns>
251 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
252 [EditorBrowsable(EditorBrowsableState.Never)]
255 bool ret = Interop.Matrix.Invert(SwigCPtr);
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 /// Swaps the rows to columns.
263 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
264 [EditorBrowsable(EditorBrowsableState.Never)]
265 public void Transpose()
267 Interop.Matrix.Transpose(SwigCPtr);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 /// Returns the X Axis from a Transform matrix.
274 /// <returns>The X axis.</returns>
275 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
276 [EditorBrowsable(EditorBrowsableState.Never)]
277 public Vector3 GetXAxis()
279 Vector3 ret = new Vector3(Interop.Matrix.GetXAxis(SwigCPtr), true);
280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 /// Returns the Y Axis from a Transform matrix.
287 /// <returns>The Y axis.</returns>
288 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
289 [EditorBrowsable(EditorBrowsableState.Never)]
290 public Vector3 GetYAxis()
292 Vector3 ret = new Vector3(Interop.Matrix.GetYAxis(SwigCPtr), true);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 /// Returns the Z Axis from a Transform matrix.
300 /// <returns>The Z axis.</returns>
301 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
302 [EditorBrowsable(EditorBrowsableState.Never)]
303 public Vector3 GetZAxis()
305 Vector3 ret = new Vector3(Interop.Matrix.GetZAxis(SwigCPtr), true);
306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 /// Sets the X Axis to a Transform matrix.<br/>
312 /// This assumes the matrix is a transform matrix.
314 /// <param name="axis">The X axis.</param>
315 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
316 [EditorBrowsable(EditorBrowsableState.Never)]
317 public void SetXAxis(Vector3 axis)
319 Interop.Matrix.SetXAxis(SwigCPtr, Vector3.getCPtr(axis));
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 /// Sets the Y Axis to a Transform matrix.<br/>
325 /// This assumes the matrix is a transform matrix.
327 /// <param name="axis">The Y axis.</param>
328 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
329 [EditorBrowsable(EditorBrowsableState.Never)]
330 public void SetYAxis(Vector3 axis)
332 Interop.Matrix.SetYAxis(SwigCPtr, Vector3.getCPtr(axis));
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 /// Sets the Z Axis to a Transform matrix.<br/>
338 /// This assumes the matrix is a transform matrix.
340 /// <param name="axis">The Z axis.</param>
341 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
342 [EditorBrowsable(EditorBrowsableState.Never)]
343 public void SetZAxis(Vector3 axis)
345 Interop.Matrix.SetZAxis(SwigCPtr, Vector3.getCPtr(axis));
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 /// Gets the translate from a Transform matrix.<br/>
351 /// This assumes the matrix is a transform matrix.
353 /// <returns>The Translation.</returns>
354 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
355 [EditorBrowsable(EditorBrowsableState.Never)]
356 public Vector4 GetTranslation()
358 Vector4 ret = new Vector4(Interop.Matrix.GetTranslation(SwigCPtr), false);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 /// Gets the x, y, and z components of translate from a Transform matrix.<br/>
365 /// This assumes the matrix is a transform matrix.
367 /// <returns>The Translation.</returns>
368 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
369 [EditorBrowsable(EditorBrowsableState.Never)]
370 public Vector3 GetTranslation3()
372 Vector3 ret = new Vector3(Interop.Matrix.GetTranslation3(SwigCPtr), false);
373 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378 /// Sets the translate to a Transform matrix.<br/>
379 /// This assumes the matrix is a transform matrix.
381 /// <returns>The Translation.</returns>
382 /// <param name="translation">The translation.</param>
383 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
384 [EditorBrowsable(EditorBrowsableState.Never)]
385 public void SetTranslation(Vector4 translation)
387 Interop.Matrix.SetTranslationVector4(SwigCPtr, Vector4.getCPtr(translation));
388 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392 /// Sets the translate to a Transform matrix.<br/>
393 /// This assumes the matrix is a transform matrix.
395 /// <param name="translation">The translation.</param>
396 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
397 [EditorBrowsable(EditorBrowsableState.Never)]
398 public void SetTranslation(Vector3 translation)
400 Interop.Matrix.SetTranslationVector3(SwigCPtr, Vector3.getCPtr(translation));
401 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
405 /// Makes the axes of the matrix orthogonal to each other and of unit length.<br/>
406 /// This function is used to correct floating point errors which would otherwise accumulate
407 /// as operations are applied to the matrix.<br/>
408 /// This assumes the matrix is a transform matrix.
410 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
411 [EditorBrowsable(EditorBrowsableState.Never)]
412 public void OrthoNormalize()
414 Interop.Matrix.OrthoNormalize(SwigCPtr);
415 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419 /// Function to multiply two matrices and store the result onto third.<br/>
420 /// Use this method in time critical path as it does not require temporaries.<br/>
423 /// This Mutliply function be used for time-critical path. lhs and rhs is not matched as normal sense.
426 /// result = rhs * lhs;
428 /// <param name="result">Result of the multiplication.</param>
429 /// <param name="lhs">The left-hand-side Matrix. this can be same matrix as result.</param>
430 /// <param name="rhs">The right-hand-side Matrix. this cannot be same matrix as result.</param>
431 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
432 [EditorBrowsable(EditorBrowsableState.Never)]
433 public static void Multiply(Matrix result, Matrix lhs, Matrix rhs)
435 Interop.Matrix.Multiply(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Matrix.getCPtr(rhs));
436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
440 /// Function to multiply a matrix and rotataion and store the result onto third.<br/>
441 /// Use this method in time critical path as it does not require temporaries.<br/>
444 /// This Mutliply function be used for time-critical path. lhs and rhs is not matched as normal sense.
447 /// result = rhs * lhs;
449 /// <param name="result">Result of the multiplication.</param>
450 /// <param name="lhs">The left-hand-side Matrix. this can be same matrix as result.</param>
451 /// <param name="rhs">The right-hand-side Rotation.</param>
452 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
453 [EditorBrowsable(EditorBrowsableState.Never)]
454 public static void Multiply(Matrix result, Matrix lhs, Rotation rhs)
456 Interop.Matrix.MultiplyQuaternion(Matrix.getCPtr(result), Matrix.getCPtr(lhs), Rotation.getCPtr(rhs));
457 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
461 /// Multiply the Matrix and Vector4.
464 /// returns = this * rhs;
466 /// <param name="rhs">The right-hand-side Vector4.</param>
467 /// <returns>The vector multiply as this * rhs.</returns>
468 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
469 [EditorBrowsable(EditorBrowsableState.Never)]
470 public Vector4 Multiply(Vector4 rhs)
472 Vector4 ret = new Vector4(Interop.Matrix.MultiplyVector4(SwigCPtr, Vector4.getCPtr(rhs)), true);
473 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
478 /// Multiply the Matrix and Matrix.
481 /// returns = this * rhs;
483 /// <param name="rhs">The right-hand-side Matrix.</param>
484 /// <returns>The matrix multiply as this * rhs.</returns>
485 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
486 [EditorBrowsable(EditorBrowsableState.Never)]
487 public Matrix Multiply(Matrix rhs)
489 Matrix ret = new Matrix(Interop.Matrix.Multiply(SwigCPtr, Matrix.getCPtr(rhs)), true);
490 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495 /// Multiply the Matrix and Matrix. Result will be stored into this Matrix.
498 /// this = this * rhs;
500 /// <param name="rhs">The right-hand-side Matrix.</param>
501 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
502 [EditorBrowsable(EditorBrowsableState.Never)]
503 public void MultiplyAssign(Matrix rhs)
505 Interop.Matrix.MultiplyAssign(SwigCPtr, Matrix.getCPtr(rhs));
506 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
510 /// Gets the hash code of this Matrix.
512 /// <returns>The Hash Code.</returns>
513 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
514 [EditorBrowsable(EditorBrowsableState.Never)]
515 public override int GetHashCode()
517 return SwigCPtr.Handle.GetHashCode();
521 /// Compares if rhs is equal to.
523 /// <param name="rhs">The matrix to compare.</param>
524 /// <returns>Returns true if the two matrixes are equal, otherwise false.</returns>
525 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
526 [EditorBrowsable(EditorBrowsableState.Never)]
527 public bool EqualTo(Matrix rhs)
529 bool ret = Interop.Matrix.EqualTo(SwigCPtr, Matrix.getCPtr(rhs));
530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
535 /// Compares if rhs is not equal to.
537 /// <param name="rhs">The matrix to compare.</param>
538 /// <returns>Returns true if the two matrixes are not equal, otherwise false.</returns>
539 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
540 [EditorBrowsable(EditorBrowsableState.Never)]
541 public bool NotEqualTo(Matrix rhs)
543 bool ret = Interop.Matrix.NotEqualTo(SwigCPtr, Matrix.getCPtr(rhs));
544 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
549 /// Sets this matrix to contain the position, scale and rotation components.<br/>
550 /// Performs scale, rotation, then translation
552 /// <param name="scale">Scale to apply.</param>
553 /// <param name="rotation">Rotation to apply.</param>
554 /// <param name="translation">Translation to apply.</param>
555 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
556 [EditorBrowsable(EditorBrowsableState.Never)]
557 public void SetTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation)
559 Interop.Matrix.SetTransformComponents(SwigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation));
560 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
564 /// Sets this matrix to contain the inverse of the position, scale and rotation components.<br/>
565 /// Performs scale, rotation, then translation
567 /// <param name="scale">Scale to apply.</param>
568 /// <param name="rotation">Rotation to apply.</param>
569 /// <param name="translation">Translation to apply.</param>
570 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
571 [EditorBrowsable(EditorBrowsableState.Never)]
572 public void SetInverseTransformComponents(Vector3 scale, Rotation rotation, Vector3 translation)
574 Interop.Matrix.SetInverseTransformComponents(SwigCPtr, Vector3.getCPtr(scale), Rotation.getCPtr(rotation), Vector3.getCPtr(translation));
575 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
579 /// Sets this matrix to contain the inverse of the orthonormal basis and position components.<br/>
580 /// Performs scale, rotation, then translation
582 /// <param name="xAxis">The X axis of the basis.</param>
583 /// <param name="yAxis">The Y axis of the basis.</param>
584 /// <param name="zAxis">The Z axis of the basis.</param>
585 /// <param name="translation">Translation to apply.</param>
586 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
587 [EditorBrowsable(EditorBrowsableState.Never)]
588 public void SetInverseTransformComponents(Vector3 xAxis, Vector3 yAxis, Vector3 zAxis, Vector3 translation)
590 Interop.Matrix.SetInverseTransformComponents(SwigCPtr, Vector3.getCPtr(xAxis), Vector3.getCPtr(yAxis), Vector3.getCPtr(zAxis), Vector3.getCPtr(translation));
591 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595 /// Gets the position, scale and rotation components from the given transform matrix.<br/>
598 /// This matrix must not contain skews or shears.
600 /// <param name="position">Position to set.</param>
601 /// <param name="rotation">Rotation to set - only valid if the transform matrix has not been skewed or sheared</param>
602 /// <param name="scale">Scale to set - only valid if the transform matrix has not been skewed or sheared.</param>
603 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
604 [EditorBrowsable(EditorBrowsableState.Never)]
605 public void GetTransformComponents(Vector3 position, Rotation rotation, Vector3 scale)
607 Interop.Matrix.GetTransformComponents(SwigCPtr, Vector3.getCPtr(position), Rotation.getCPtr(rotation), Vector3.getCPtr(scale));
608 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
612 /// Get the value of matrix by it's index.
614 /// <param name="index">The index to get value.</param>
615 /// <returns>A value of index</returns>
616 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
617 [EditorBrowsable(EditorBrowsableState.Never)]
618 public float ValueOfIndex(uint index)
620 float ret = Interop.Matrix.ValueOfIndex(SwigCPtr, index);
621 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626 /// Get the value of matrix by it's row index and column index.
628 /// <param name="indexRow">The row index to get value.</param>
629 /// <param name="indexColumn">The column index to get value.</param>
630 /// <returns>A value of index</returns>
631 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
632 [EditorBrowsable(EditorBrowsableState.Never)]
633 public float ValueOfIndex(uint indexRow, uint indexColumn)
635 float ret = Interop.Matrix.ValueOfIndex(SwigCPtr, indexRow, indexColumn);
636 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641 /// Set the value at matrix by it's index.
643 /// <param name="index">The index to set value.</param>
644 /// <param name="value">The value to set.</param>
645 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
646 [EditorBrowsable(EditorBrowsableState.Never)]
647 public void SetValueAtIndex(uint index, float value)
649 Interop.Matrix.SetValueAtIndex(SwigCPtr, index, value);
650 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
654 /// Set the value at matrix by it's row index and column index.
656 /// <param name="indexRow">The row index to set value.</param>
657 /// <param name="indexColumn">The column index to set value.</param>
658 /// <param name="value">The value to set.</param>
659 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
660 [EditorBrowsable(EditorBrowsableState.Never)]
661 public void SetValueAtIndex(uint indexRow, uint indexColumn, float value)
663 Interop.Matrix.SetValueAtIndex(SwigCPtr, indexRow, indexColumn, value);
664 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
668 /// Get the matrix class from native IntPtr
670 /// <param name="cPtr">The native IntPtr.</param>
671 /// <returns>New created matrix by inputed cPtr</returns>
672 internal static Matrix GetMatrixFromPtr(global::System.IntPtr cPtr)
674 Matrix ret = new Matrix(cPtr, false);
675 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();