Merge "Change PixelData to use the handle/body pattern" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / common / math.h
1 #ifndef __DALI_INTERNAL_MATH_H__
2 #define __DALI_INTERNAL_MATH_H__
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 namespace Dali
22 {
23
24 namespace Internal
25 {
26
27 typedef float Vec3[3];
28 typedef float Vec4[4];
29 typedef float Mat4[16];
30
31 /**
32  * @brief Applies a transformation matrix to a vector
33  *
34  * @param[out] result The transformed vector
35  * @param[in] m The transformation matrix
36  * @param[in] v The vector to transform
37  */
38 void TransformVector3( Vec3 result, const Mat4 m, const Vec3 v );
39
40 /**
41  * @brief Computes the length of a vector3
42  *
43  * @param[in] v The vector
44  * @return The lenght of the vector
45  */
46 float Length( const Vec3 v );
47
48 } // namespace Internal
49
50 } // namespace Dali
51
52 #endif  //__DALI_INTERNAL_MATH_H__