1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef CAMERA_IMPL_H
17 #define CAMERA_IMPL_H
18 
19 #include "base_impl.h"
20 
21 #include "utils/matrix.h"
22 #include "utils/scalar.h"
23 
24 namespace OHOS {
25 namespace Rosen {
26 namespace Drawing {
27 class CameraImpl : public BaseImpl {
28 public:
CameraImpl()29     CameraImpl() {}
~CameraImpl()30     ~CameraImpl() override {}
31 
32     virtual void Save() = 0;
33     virtual void Restore() = 0;
34 
35     virtual void Translate(scalar x, scalar y, scalar z) = 0;
36     virtual void RotateX(scalar deg) = 0;
37     virtual void RotateY(scalar deg) = 0;
38     virtual void RotateZ(scalar deg) = 0;
39 
40     virtual void SetCameraPos(scalar x, scalar y, scalar z) = 0;
41     virtual scalar GetCameraPosX() const = 0;
42     virtual scalar GetCameraPosY() const = 0;
43     virtual scalar GetCameraPosZ() const = 0;
44 
45     virtual void ApplyToMatrix(Matrix& m) = 0;
46 };
47 } // namespace Drawing
48 } // namespace Rosen
49 } // namespace OHOS
50 #endif