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: 29 static inline constexpr AdapterType TYPE = AdapterType::BASE_INTERFACE; CameraImpl()30 CameraImpl() {} ~CameraImpl()31 ~CameraImpl() override {} GetType()32 AdapterType GetType() const override 33 { 34 return AdapterType::BASE_INTERFACE; 35 } 36 37 virtual void Save() = 0; 38 virtual void Restore() = 0; 39 40 virtual void Translate(scalar x, scalar y, scalar z) = 0; 41 virtual void RotateX(scalar deg) = 0; 42 virtual void RotateY(scalar deg) = 0; 43 virtual void RotateZ(scalar deg) = 0; 44 45 virtual void SetCameraPos(scalar x, scalar y, scalar z) = 0; 46 virtual scalar GetCameraPosX() const = 0; 47 virtual scalar GetCameraPosY() const = 0; 48 virtual scalar GetCameraPosZ() const = 0; 49 50 virtual void ApplyToMatrix(Matrix& m) = 0; 51 }; 52 } // namespace Drawing 53 } // namespace Rosen 54 } // namespace OHOS 55 #endif