ResInsight/ApplicationCode/Commands/HoloLensCommands/VdeExportPart.cpp

170 lines
6.2 KiB
C++
Raw Normal View History

2018-09-18 08:29:46 -05:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018 Statoil 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.
//
/////////////////////////////////////////////////////////////////////////////////
#include "VdeExportPart.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
VdeExportPart::VdeExportPart(cvf::Part* part)
: m_part(part)
, m_sourceObjectName("Unnamed Object")
, m_sourceObjectType(OBJ_TYPE_UNKNOWN)
, m_color(cvf::Color3f::MAGENTA)
, m_opacity(1.0)
, m_winding(COUNTERCLOCKWISE)
, m_role(GEOMETRY)
2018-09-18 08:29:46 -05:00
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setTextureImage(const cvf::TextureImage* textureImage)
{
m_textureImage = textureImage;
}
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setSourceObjectType(SourceObjectType sourceObjectType)
{
m_sourceObjectType = sourceObjectType;
2018-09-18 08:29:46 -05:00
}
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setSourceObjectName(const QString& sourceObjectName)
{
m_sourceObjectName = sourceObjectName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setSourceObjectCellSetType(const QString& sourceObjectCellSetType)
{
m_sourceObjectCellSetType = sourceObjectCellSetType;
}
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setColor(const cvf::Color3f& color)
2018-09-18 08:29:46 -05:00
{
m_color = color;
}
2018-09-19 05:51:28 -05:00
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setOpacity(float opacity)
{
m_opacity = opacity;
}
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setWinding(Winding winding)
{
m_winding = winding;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void VdeExportPart::setRole(Role role)
{
m_role = role;
}
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
QString VdeExportPart::sourceObjectName() const
{
return m_sourceObjectName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString VdeExportPart::sourceObjectCellSetType() const
{
return m_sourceObjectCellSetType;
}
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
VdeExportPart::SourceObjectType VdeExportPart::sourceObjectType() const
{
return m_sourceObjectType;
}
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
2018-09-19 07:33:08 -05:00
const cvf::Part* VdeExportPart::part() const
2018-09-18 08:29:46 -05:00
{
return m_part.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const cvf::TextureImage* VdeExportPart::textureImage() const
{
return m_textureImage.p();
}
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
///
2018-09-18 08:29:46 -05:00
//--------------------------------------------------------------------------------------------------
cvf::Color3f VdeExportPart::color() const
2018-09-18 08:29:46 -05:00
{
return m_color;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
float VdeExportPart::opacity() const
{
return m_opacity;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
VdeExportPart::Winding VdeExportPart::winding() const
{
return m_winding;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
VdeExportPart::Role VdeExportPart::role() const
{
return m_role;
}