Updated all code to new format
[platform/core/uifw/dali-core.git] / dali / internal / event / common / projection.h
1 #ifndef DALI_INTERNAL_PROJECTION_H
2 #define DALI_INTERNAL_PROJECTION_H
3
4 /*
5  * Copyright (c) 2021 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 struct Vector4;
24 struct Vector2;
25
26 class Matrix;
27
28 namespace Internal
29 {
30 bool XyPlaneIntersect(const Dali::Vector4& pointA,
31                       const Dali::Vector4& pointB,
32                       Dali::Vector4&       intersect);
33
34 bool UnprojectFull(const Dali::Vector4& windowPos,
35                    const Matrix&        modelView,
36                    const Matrix&        projection,
37                    float                viewportWidth,
38                    float                viewportHeight,
39                    Dali::Vector4&       objectPos);
40
41 bool Unproject(const Dali::Vector4& windowPos,
42                const Matrix&        inverseMvp,
43                float                viewportWidth,
44                float                viewportHeight,
45                Dali::Vector4&       objectPos);
46
47 bool ProjectFull(const Vector4& position,
48                  const Matrix&  modelView,
49                  const Matrix&  projection,
50                  float          viewportX,
51                  float          viewportY,
52                  float          viewportWidth,
53                  float          viewportHeight,
54                  Vector4&       windowPos);
55
56 } // namespace Internal
57
58 } // namespace Dali
59
60 #endif // DALI_INTERNAL_PROJECTION_H