Files
ResInsight/ApplicationLibCode/ProjectDataModelCommands/Rimc3dView.h
2025-02-15 12:12:18 +01:00

83 lines
2.8 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2025 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmField.h"
#include "cafPdmObjectHandle.h"
#include "cafPdmObjectMethod.h"
#include "cvfVector3.h"
//==================================================================================================
///
//==================================================================================================
class RimcCameraVectors : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimcCameraVectors();
void setEye( const cvf::Vec3d& eye );
void setUp( const cvf::Vec3d& up );
void setReferencePoint( const cvf::Vec3d& referencePoint );
private:
caf::PdmField<cvf::Vec3d> m_eye;
caf::PdmField<cvf::Vec3d> m_up;
caf::PdmField<cvf::Vec3d> m_referencePoint;
};
//==================================================================================================
///
//==================================================================================================
class Rimc3dView_cameraVectors : public caf::PdmObjectMethod
{
CAF_PDM_HEADER_INIT;
public:
Rimc3dView_cameraVectors( caf::PdmObjectHandle* self );
caf::PdmObjectHandle* execute() override;
bool resultIsPersistent() const override;
std::unique_ptr<PdmObjectHandle> defaultResult() const override;
bool isNullptrValidResult() const override;
};
//==================================================================================================
///
//==================================================================================================
class Rimc3dView_setCameraVectors : public caf::PdmObjectMethod
{
CAF_PDM_HEADER_INIT;
public:
Rimc3dView_setCameraVectors( caf::PdmObjectHandle* self );
caf::PdmObjectHandle* execute() override;
bool resultIsPersistent() const override;
std::unique_ptr<PdmObjectHandle> defaultResult() const override;
bool isNullptrValidResult() const override;
private:
caf::PdmField<cvf::Vec3d> m_eye;
caf::PdmField<cvf::Vec3d> m_up;
caf::PdmField<cvf::Vec3d> m_referencePoint;
};