Home
last modified time | relevance | path

Searched refs:Matrix4 (Results 1 - 25 of 89) sorted by relevance

1234

/foundation/arkui/ace_engine/frameworks/base/geometry/
H A Dmatrix4.h28 class ACE_FORCE_EXPORT Matrix4 { class
33 static Matrix4 CreateIdentity();
35 static Matrix4 CreateTranslate(double x, double y, double z);
37 static Matrix4 CreateScale(double x, double y, double z);
39 static Matrix4 CreateRotate(double angle, double dx, double dy, double dz);
41 static Matrix4 CreateMatrix2D(double m00, double m10, double m01, double m11, double m03, double m13);
43 static Matrix4 CreateSkew(double x, double y);
45 static Matrix4 CreateFactorSkew(double x, double y);
47 static Matrix4 CreateFactorPerspective(double x, double y);
50 static Matrix4 CreatePerspectiv
[all...]
H A Dmatrix4.cpp20 constexpr int32_t MATRIX_LENGTH = Matrix4::DIMENSION * Matrix4::DIMENSION;
31 Matrix4 Matrix4::CreateIdentity() in CreateIdentity()
33 return Matrix4(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); in CreateIdentity()
36 Matrix4 Matrix4::CreateTranslate(double x, double y, double z) in CreateTranslate()
38 return Matrix4(1.0f, 0.0f, 0.0f, x, 0.0f, 1.0f, 0.0f, y, 0.0f, 0.0f, 1.0f, z, 0.0f, 0.0f, 0.0f, 1.0f); in CreateTranslate()
41 Matrix4 Matrix4
132 Matrix4::Matrix4() Matrix4() function in OHOS::Ace::Matrix4
136 Matrix4::Matrix4(const Matrix4& matrix) Matrix4() function in OHOS::Ace::Matrix4
141 Matrix4::Matrix4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, Matrix4() function in OHOS::Ace::Matrix4
[all...]
H A Danimatable_matrix4.cpp22 AnimatableMatrix4& AnimatableMatrix4::operator=(const Matrix4& newMatrix4) in operator =()
25 Matrix4& matrix4 = *this; in operator =()
35 Matrix4& matrix4 = *this; in operator =()
47 Matrix4& matrix4 = *this; in operator =()
54 void AnimatableMatrix4::MoveTo(const Matrix4& target) in MoveTo()
56 Matrix4& matrix4 = *this; in MoveTo()
61 void AnimatableMatrix4::AnimateTo(const Matrix4& endValue) in AnimateTo()
65 Matrix4& matrix4 = *this; in AnimateTo()
82 operationInit.matrix4_ = static_cast<Matrix4>(*this); in AnimateTo()
127 Matrix4 in OnAnimationCallback()
[all...]
H A Dtransform_util.cpp56 bool Normalize(Matrix4& m) in Normalize()
71 Matrix4 BuildPerspectiveMatrix(const DecomposedTransform& decomp) in BuildPerspectiveMatrix()
73 Matrix4 matrix = Matrix4::CreateIdentity(); in BuildPerspectiveMatrix()
81 Matrix4 BuildTranslationMatrix(const DecomposedTransform& decomp) in BuildTranslationMatrix()
83 Matrix4 matrix = Matrix4::CreateIdentity(); in BuildTranslationMatrix()
97 Matrix4 BuildRotationMatrix(const DecomposedTransform& decomp) in BuildRotationMatrix()
99 Matrix4 matrix4; in BuildRotationMatrix()
128 Matrix4 BuildSkewMatri
[all...]
H A Danimatable_matrix4.h28 class ACE_EXPORT AnimatableMatrix4 : public Matrix4 {
33 explicit AnimatableMatrix4(Matrix4 matrix4, const AnimationOption& option = AnimationOption()) in AnimatableMatrix4()
34 : Matrix4(matrix4), animationOption_(option) in AnimatableMatrix4()
66 AnimatableMatrix4& operator=(const Matrix4& matrix4);
70 void MoveTo(const Matrix4& target);
78 void AnimateTo(const Matrix4& endValue);
H A Dtransform_util.h124 Matrix4 matrix4_ = Matrix4::CreateIdentity();
195 Matrix4 ComputerRemaining(std::size_t startOffset) const;
229 static bool DecomposeTransform(DecomposedTransform& out, const Matrix4& transform);
232 static Matrix4 ComposeTransform(const DecomposedTransform& decomp);
234 static void ProcessMatrix(const Matrix4& matrix, const Matrix4& perspectiveMatrix, DecomposedTransform& out);
/foundation/graphic/graphic_utils_lite/interfaces/kits/gfx_utils/
H A Dtransform.h152 const Matrix4<float>& GetTransformMatrix() const in GetTransformMatrix()
157 const Matrix4<float>& GetOrigTransformMatrix() const in GetOrigTransformMatrix()
162 const Matrix4<float>& GetRotateMatrix() const in GetRotateMatrix()
167 const Matrix4<float>& GetScaleMatrix() const in GetScaleMatrix()
172 const Matrix4<float>& GetTranslateMatrix() const in GetTranslateMatrix()
177 const Matrix4<float>& GetShearMatrix() const in GetShearMatrix()
182 const Matrix4<float>& GetPerspectiveMatrix() const in GetPerspectiveMatrix()
229 void SetMatrix(const Matrix4<float>& matrix, bool isInternalMatrix = false);
267 Matrix4<float> scale_;
268 Matrix4<floa
[all...]
H A Dgraphic_math.h621 class Matrix4 : public HeapBase { class
624 * @brief Defines a <b>Matrix4</b> instance and initializes the 4 x 4 matrix data.
629 Matrix4();
631 Matrix4(T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13,
639 ~Matrix4() {} in ~Matrix4()
666 Matrix4<T> Inverse() const;
678 static Matrix4<T> Rotate(T angle, const Vector3<T>& pivot1, const Vector3<T>& pivot2);
689 static Matrix4<T> Scale(const Vector3<T>& scale, const Vector3<T>& fixed);
699 static Matrix4<T> Translate(const Vector3<T>& trans);
701 static Matrix4<
729 Matrix4<T>::Matrix4() Matrix4() function in OHOS::Matrix4
739 Matrix4<T>::Matrix4(T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13, Matrix4() function in OHOS::Matrix4
[all...]
/foundation/arkui/ace_engine/test/unittest/base/
H A Dmatrix4_test.cpp60 * @tc.desc: Test functions beginning with Create of the class Matrix4.
66 * @tc.steps: Test the function CreateIdentity of the class Matrix4. in HWTEST_F()
68 Matrix4 matrix4Obj1 = Matrix4::CreateIdentity(); in HWTEST_F()
77 * @tc.steps: Test the function CreateTranslate of the class Matrix4. in HWTEST_F()
79 Matrix4 matrix4Obj2 = Matrix4::CreateTranslate(DEFAULT_DOUBLE0, DEFAULT_DOUBLE1, DEFAULT_DOUBLE2); in HWTEST_F()
86 * @tc.steps: Test the function CreateScale of the class Matrix4. in HWTEST_F()
88 Matrix4 matrix4Obj3 = Matrix4 in HWTEST_F()
[all...]
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/matrix4/
H A Dcj_matrix4_ffi.cpp21 namespace OHOS::Matrix4 { namespace in OHOS
27 } // namespace OHOS::Matrix4
31 using namespace OHOS::Matrix4;
41 Matrix4 matrix = Matrix4::CreateIdentity(); in FfiOHOSMatrix4Init()
44 if (vector.size() != Matrix4::DIMENSION * Matrix4::DIMENSION) { in FfiOHOSMatrix4Init()
49 for (int32_t i = 0; i < Matrix4::DIMENSION; i++) { in FfiOHOSMatrix4Init()
50 for (int32_t j = 0; j < Matrix4::DIMENSION; j++) { in FfiOHOSMatrix4Init()
51 auto index = i * Matrix4 in FfiOHOSMatrix4Init()
[all...]
H A Dcj_matrix4_ffi.h29 namespace OHOS::Matrix4 { namespace in OHOS
36 const OHOS::Ace::Matrix4& GetMatrix4() in GetMatrix4()
41 void SetMatrix4(const OHOS::Ace::Matrix4& instance) in SetMatrix4()
46 void SetMatrix4(OHOS::Ace::Matrix4&& instance) in SetMatrix4()
52 OHOS::Ace::Matrix4 instance_ = OHOS::Ace::Matrix4();
55 } // namespace OHOS::Matrix4
/foundation/graphic/graphic_utils_lite/frameworks/
H A Dtransform.cpp24 scale_ = Matrix4<float>::Scale(Vector3<float>(1.0f, 1.0f, 1.0f), Vector3<float>(0, 0, 0)); in TransformMap()
25 rotate_ = Matrix4<float>::Rotate(0, Vector3<float>(0, 0, 0), Vector3<float>(0, 0, 0)); in TransformMap()
26 shear_ = Matrix4<float>::Shear(Vector2<float>(0, 0), Vector2<float>(0, 0), Vector2<float>(0, 0)); in TransformMap()
27 translate_ = Matrix4<float>::Translate(Vector3<float>(0, 0, 0)); in TransformMap()
44 scale_ = Matrix4<float>::Scale(Vector3<float>(1.0f, 1.0f, 1.0f), Vector3<float>(0, 0, 0)); in TransformMap()
45 rotate_ = Matrix4<float>::Rotate(0, Vector3<float>(0, 0, 0), Vector3<float>(0, 0, 0)); in TransformMap()
46 shear_ = Matrix4<float>::Shear(Vector2<float>(0, 0), Vector2<float>(0, 0), Vector2<float>(0, 0)); in TransformMap()
47 translate_ = Matrix4<float>::Translate(Vector3<float>(0, 0, 0)); in TransformMap()
145 translate_ = Matrix4<float>::Translate(Vector3<float>(trans.x_, trans.y_, trans.z_)); in Translate()
157 translate_ = Matrix4<floa in Translate()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/transform/
H A Drender_transform.h42 static Matrix4 GetTransformByOffset(Matrix4 matrix, const Offset& offset);
54 void Matrix3D(Matrix4 m);
151 Matrix4 GetTransformMatrix(const Offset& offset) in GetTransformMatrix()
153 Matrix4 transform = GetTransformByOffset(UpdateWithEffectMatrix(transform_), origin_); in GetTransformMatrix()
166 Matrix4 UpdateWithEffectMatrix(Matrix4 matrix);
169 void ParseTransformEffects(const std::vector<AnimatableTransformOperation>& transformEffects, Matrix4& transform);
170 Matrix4 ParseTransformEffect(const TransformOperation& effect);
173 Matrix4 transform
[all...]
H A Drender_transform.cpp36 transform_ = transform_ * Matrix4::CreateTranslate(dx, dy, dz); in Translate()
59 transform_ = transform_ * Matrix4::CreateScale(x, y, z); in Scale()
75 Matrix4 skew = Matrix4::CreateSkew(x, y); in Skew()
88 Matrix4 rotate = Matrix4::CreateRotate(angle, x, y, z); in Rotate()
123 void RenderTransform::Matrix3D(Matrix4 m) in Matrix3D()
139 transform_ = transform_ * Matrix4::CreatePerspective(static_cast<float>(dx)); in Perspective()
150 transform_ = Matrix4::CreateIdentity(); in ResetTransform()
267 const std::vector<AnimatableTransformOperation>& transformEffects, Matrix4 in ParseTransformEffects()
[all...]
H A Drosen_render_transform.h32 static void SyncTransformToRsNode(const std::shared_ptr<RSNode>& rsNode, const Matrix4& transformMatrix);
67 Matrix4 GetEffectiveTransform(const Offset& offset);
71 Matrix4 previousTransformMatrix_;
/foundation/window/window_manager/utils/include/
H A Dwm_math.h195 struct Matrix4 { struct
198 friend Matrix4 operator*(const Matrix4& left, const Matrix4& right);
199 Matrix4& operator*=(const Matrix4& right);
207 static const Matrix4 Identity;
219 Matrix4 CreateScale(float xScale, float yScale, float zScale);
222 Matrix4 CreateRotationX(float theta);
225 Matrix4 CreateRotation
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/svg/
H A Dsvg_transform.cpp35 void SvgTransform::ApplyRotationPivot(Matrix4& mat, float x, float y) in ApplyRotationPivot()
39 mat = Matrix4::CreateTranslate(x, y, 0) * mat * Matrix4::CreateTranslate(-x, -y, 0); in ApplyRotationPivot()
42 Matrix4 SvgTransform::CreateMatrix4(const std::string& transform) in CreateMatrix4()
44 auto retMat = Matrix4::CreateIdentity(); in CreateMatrix4()
57 Matrix4 mat = Matrix4::CreateIdentity(); in CreateMatrix4()
61 mat = Matrix4::CreateTranslate(StringToFloat(numVec[0].c_str()), 0, 0); in CreateMatrix4()
63 mat = Matrix4::CreateTranslate(StringToFloat(numVec[0].c_str()), StringToFloat(numVec[1].c_str()), 0); in CreateMatrix4()
67 mat = Matrix4 in CreateMatrix4()
[all...]
H A Dsvg_transform.h27 Matrix4 matrix4;
38 static Matrix4 CreateMatrix4(const std::string& transform);
46 static Matrix4 CreateMatrixFromMap(const std::map<std::string, std::vector<float>>& transform);
57 static void ApplyRotationPivot(Matrix4& mat, float x, float y);
/foundation/arkui/ace_engine/frameworks/core/components_ng/gestures/
H A Dpan_gesture.cpp69 for (int i = 0; i < Matrix4::DIMENSION; i++) { in SerializeTo()
70 for (int j = 0; j < Matrix4::DIMENSION; j++) { in SerializeTo()
71 matrix[i * Matrix4::DIMENSION + j] = matrix_.Get(i, j); in SerializeTo()
78 return sizeof(int32_t) + sizeof(GestureType) + sizeof(PanDirection) + sizeof(double) + sizeof(Matrix4) + in SizeofMe()
110 for (int i = 0; i < Matrix4::DIMENSION; i++) { in Deserialize()
111 for (int j = 0; j < Matrix4::DIMENSION; j++) { in Deserialize()
112 matrix_.Set(i, j, matrix[i * Matrix4::DIMENSION + j]); in Deserialize()
/foundation/window/window_manager/utils/src/
H A Dwm_math.cpp25 const Matrix4 Matrix4::Identity = { {
58 Matrix4 operator*(const Matrix4& left, const Matrix4& right) in operator *()
103 Matrix4& Matrix4::operator*=(const Matrix4& right) in operator *=()
109 void Matrix4::SwapRow(int row1, int row2) in SwapRow()
130 void Matrix4
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/toggle/
H A Drosen_render_toggle.cpp36 Matrix4 translateMatrix = Matrix4::CreateTranslate(translateX, translateY, 0.0); in UpdateLayer()
37 Matrix4 scaleMatrix = Matrix4::CreateScale(scale_, scale_, 1.0); in UpdateLayer()
38 Matrix4 transformMatrix = translateMatrix * scaleMatrix; in UpdateLayer()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/modules/
H A Djsi_matrix4_module.cpp34 Matrix4 ConvertToMatrix(const shared_ptr<JsRuntime>& runtime, const shared_ptr<JsValue>& value) in ConvertToMatrix()
36 Matrix4 result = Matrix4::CreateIdentity(); in ConvertToMatrix()
41 for (int32_t i = 0; i < Matrix4::DIMENSION; i++) { in ConvertToMatrix()
42 for (int32_t j = 0; j < Matrix4::DIMENSION; j++) { in ConvertToMatrix()
43 auto index = i * Matrix4::DIMENSION + j; in ConvertToMatrix()
54 shared_ptr<JsValue> ConvertToJSValue(const shared_ptr<JsRuntime>& runtime, const Matrix4& matrix) in ConvertToJSValue()
57 for (int32_t i = 0; i < Matrix4::DIMENSION; i++) { in ConvertToJSValue()
58 for (int32_t j = 0; j < Matrix4::DIMENSION; j++) { in ConvertToJSValue()
59 int32_t index = i * Matrix4 in ConvertToJSValue()
[all...]
/foundation/window/window_manager/utils/test/unittest/
H A Dwm_math_test.cpp91 Matrix4 transformMat = CreateScale(scale.x_, scale.y_, scale.z_); in HWTEST_F()
110 Matrix4 mat = Matrix4::Identity; in HWTEST_F()
130 Matrix4 mat; in HWTEST_F()
144 Matrix4 mat; in HWTEST_F()
158 Matrix4 mat; in HWTEST_F()
172 Matrix4 mat; in HWTEST_F()
/foundation/arkui/ace_engine/test/unittest/core/gestures/
H A Dgesture_recognizer_test_ng.cpp131 FRAME_NODE_0->localMat_ = Matrix4::CreateIdentity(); in HWTEST_F()
132 FRAME_NODE_1->localMat_ = Matrix4::CreateIdentity(); in HWTEST_F()
133 FRAME_NODE_2->localMat_ = Matrix4::CreateIdentity(); in HWTEST_F()
162 FRAME_NODE_0->localMat_ = Matrix4::CreateIdentity(); in HWTEST_F()
163 FRAME_NODE_1->localMat_ = Matrix4::Invert( in HWTEST_F()
164 Matrix4::CreateTranslate(100, 200, 0) * Matrix4::CreateRotate(90, 0, 0, 1) * in HWTEST_F()
165 Matrix4::CreateScale(0.6, 0.8, 1)); in HWTEST_F()
166 FRAME_NODE_2->localMat_ = Matrix4::Invert( in HWTEST_F()
167 Matrix4 in HWTEST_F()
[all...]
/foundation/graphic/graphic_2d/rosen/samples/webgl/entry/src/main/js/MainAbility/pages/index/sample/
H A Dcube_demo.js18 import { Matrix4 } from '../utils/Matrix';
104 let m1 = new Matrix4();
105 let m2 = new Matrix4();
106 let mX = new Matrix4();
107 let mY = new Matrix4();
108 let mZ = new Matrix4();
109 let normalMatrix = new Matrix4();

Completed in 13 milliseconds

1234