2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
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.
17 #ifndef __MEDIA_VISION_UTIL_MATRIX_H__
18 #define __MEDIA_VISION_UTIL_MATRIX_H__
22 #endif /* __cplusplus */
24 int matrix_translate(float *m, float x, float y, float z);
25 int matrix_rotate(float *m, float angle, float x, float y, float z);
26 int matrix_scale(float *m, float x, float y, float z);
27 int matrix_mult(float *m, float *m1, float *m2);
28 int matrix_identity(float *m);
29 void matrix_copy(float *d, float *s);
30 void matrix_invert(float *m);
31 void matrix_transpose(float *m);
32 void matrix_proj_perspective(float *mat, float fovy, float aspect, float znear, float zfar);
33 void quaternion_mult(float *lpR, float *lpP, float *lpQ);
34 void quaternion_to_matrix(float *lpM, float *lpQ);
35 void quaternion_rotate(float *lpQ, float rad, float ax, float ay, float az);
36 void quaternion_identity(float *lpQ);
37 void quaternion_copy(float *lpTo, float *lpFrom);
38 float vec3_normalize(float *v);
42 #endif /* __cplusplus */
44 #endif /* __MEDIA_VISION_UTIL_MATRIX_H__ */