Get world scale more faster
[platform/core/uifw/dali-core.git] / dali / public-api / math / matrix.h
index 8a1481d..332163d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_MATRIX_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -257,6 +257,16 @@ public:
   }
 
   /**
+   * @brief Gets the x,y and z components of the scale as a Vector3.
+   * Note that transform scale always has positive components.
+   *
+   * This assumes the matrix is a transform matrix.
+   * @SINCE_2_2.17
+   * @return The scale
+   */
+  Vector3 GetScale() const;
+
+  /**
    * @brief Sets the translation.
    *
    * This assumes the matrix is a transform matrix.
@@ -319,7 +329,6 @@ public:
   {
     return mMatrix;
   }
-
   /**
    * @brief Function to multiply two matrices and store the result onto third.
    *
@@ -357,12 +366,20 @@ public:
    * @param[in] rhs The Matrix to multiply this by
    * @return A Matrix containing the result
    */
-  Matrix operator*(const Matrix& rhs) const
-  {
-    Matrix result(false);
-    Multiply(result, rhs, *this);
-    return result;
-  }
+  Matrix operator*(const Matrix& rhs) const;
+
+  /**
+   * @brief Multiplication assignment operator.
+   *
+   * This Matrix *= rhs
+   *
+   * @note It makes some memory allocate & copy internally.
+   *
+   * @SINCE_2_1.46
+   * @param[in] rhs The Matrix to multiply this by
+   * @return Itself
+   */
+  Matrix& operator*=(const Matrix& rhs);
 
   /**
    * @brief The multiplication operator.