// qcameralens.sip generated by MetaSIP
//
// This file is part of the Qt3DRender Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt6-3D.
// 
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file.  Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
// 
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license.  For more information contact
// info@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


namespace Qt3DRender
{
%TypeHeaderCode
#include <qcameralens.h>
%End

    class QCameraLens : public Qt3DCore::QComponent
    {
%TypeHeaderCode
#include <qcameralens.h>
%End

    public:
        explicit QCameraLens(Qt3DCore::QNode *parent /TransferThis/ = 0);
        virtual ~QCameraLens();

        enum ProjectionType
        {
            OrthographicProjection,
            PerspectiveProjection,
            FrustumProjection,
            CustomProjection,
        };

        Qt3DRender::QCameraLens::ProjectionType projectionType() const;
        float nearPlane() const;
        float farPlane() const;
        float fieldOfView() const;
        float aspectRatio() const;
        float left() const;
        float right() const;
        float bottom() const;
        float top() const;
        QMatrix4x4 projectionMatrix() const;
        void setOrthographicProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane);
        void setFrustumProjection(float left, float right, float bottom, float top, float nearPlane, float farPlane);
        void setPerspectiveProjection(float fieldOfView, float aspect, float nearPlane, float farPlane);

    public slots:
        void setProjectionType(Qt3DRender::QCameraLens::ProjectionType projectionType);
        void setNearPlane(float nearPlane);
        void setFarPlane(float farPlane);
        void setFieldOfView(float fieldOfView);
        void setAspectRatio(float aspectRatio);
        void setLeft(float left);
        void setRight(float right);
        void setBottom(float bottom);
        void setTop(float top);
        void setProjectionMatrix(const QMatrix4x4 &projectionMatrix);

    signals:
        void projectionTypeChanged(Qt3DRender::QCameraLens::ProjectionType projectionType /ScopesStripped=1/);
        void nearPlaneChanged(float nearPlane);
        void farPlaneChanged(float farPlane);
        void fieldOfViewChanged(float fieldOfView);
        void aspectRatioChanged(float aspectRatio);
        void leftChanged(float left);
        void rightChanged(float right);
        void bottomChanged(float bottom);
        void topChanged(float top);
        void projectionMatrixChanged(const QMatrix4x4 &projectionMatrix);

    public:
        float exposure() const;

    public slots:
        void setExposure(float exposure);

    signals:
        void exposureChanged(float exposure);

    public:
        void viewAll(Qt3DCore::QNodeId cameraId);
        void viewEntity(Qt3DCore::QNodeId entityId, Qt3DCore::QNodeId cameraId);

    signals:
        void viewSphere(const QVector3D &center, float radius);
    };
};
