File indexing completed on 2025-01-19 03:51:14
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2005-01-18 0007 * Description : triangle geometry calculation class. 0008 * 0009 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_EDITOR_PERSPECTIVE_TRIANGLE_H 0016 #define DIGIKAM_EDITOR_PERSPECTIVE_TRIANGLE_H 0017 0018 // Qt includes 0019 0020 #include <QPoint> 0021 0022 namespace DigikamEditorPerspectiveToolPlugin 0023 { 0024 0025 class PerspectiveTriangle 0026 { 0027 0028 public: 0029 0030 PerspectiveTriangle(const QPoint& A, const QPoint& B, const QPoint& C); 0031 ~PerspectiveTriangle() = default; 0032 0033 float angleABC() const; 0034 float angleACB() const; 0035 float angleBAC() const; 0036 0037 private: 0038 0039 float distanceP2P(const QPoint& p1, const QPoint& p2) const; 0040 0041 private: 0042 0043 float m_a; 0044 float m_b; 0045 float m_c; 0046 }; 0047 0048 } // namespace DigikamEditorPerspectiveToolPlugin 0049 0050 #endif // DIGIKAM_EDITOR_PERSPECTIVE_TRIANGLE_H