mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3343 Holo Lens : Add role (geometry or mesh_lines)
This commit is contained in:
parent
2bf7915222
commit
ea78f85755
@ -158,7 +158,7 @@ std::vector<VdeExportPart> RicHoloLensExportImpl::partsForExport(const RimGridVi
|
||||
else if (RicHoloLensExportImpl::isMeshLines(visiblePart.p()))
|
||||
{
|
||||
VdeExportPart exportPart(visiblePart.p());
|
||||
exportPart.setSourceObjectType(VdeExportPart::OBJ_TYPE_GRID_MESH);
|
||||
exportPart.setSourceObjectType(VdeExportPart::OBJ_TYPE_GRID);
|
||||
|
||||
cvf::Color3f lineColor = RiaApplication::instance()->preferences()->defaultGridLineColors();
|
||||
|
||||
@ -172,6 +172,7 @@ std::vector<VdeExportPart> RicHoloLensExportImpl::partsForExport(const RimGridVi
|
||||
}
|
||||
|
||||
exportPart.setColor(lineColor);
|
||||
exportPart.setRole(VdeExportPart::MESH_LINES);
|
||||
|
||||
appendTextureImage(exportPart, visiblePart.p());
|
||||
|
||||
|
@ -41,9 +41,8 @@ class RicHoloLensExportImpl
|
||||
public:
|
||||
static std::vector<VdeExportPart> partsForExport(const RimGridView& view);
|
||||
|
||||
static void appendTextureImage(VdeExportPart& exportPart, cvf::Part* part);
|
||||
|
||||
private:
|
||||
static void appendTextureImage(VdeExportPart& exportPart, cvf::Part* part);
|
||||
static QString gridCellSetTypeText(RivCellSetEnum cellSetType);
|
||||
|
||||
static bool isGrid(const cvf::Part* part);
|
||||
|
@ -26,8 +26,9 @@ VdeExportPart::VdeExportPart(cvf::Part* part)
|
||||
, m_sourceObjectName("Unnamed Object")
|
||||
, m_sourceObjectType(OBJ_TYPE_UNKNOWN)
|
||||
, m_color(cvf::Color3f::MAGENTA)
|
||||
, m_winding(COUNTERCLOCKWISE)
|
||||
, m_opacity(1.0)
|
||||
, m_winding(COUNTERCLOCKWISE)
|
||||
, m_role(GEOMETRY)
|
||||
{
|
||||
}
|
||||
|
||||
@ -87,6 +88,14 @@ void VdeExportPart::setWinding(Winding winding)
|
||||
m_winding = winding;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void VdeExportPart::setRole(Role role)
|
||||
{
|
||||
m_role = role;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -150,3 +159,11 @@ VdeExportPart::Winding VdeExportPart::winding() const
|
||||
{
|
||||
return m_winding;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
VdeExportPart::Role VdeExportPart::role() const
|
||||
{
|
||||
return m_role;
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
{
|
||||
OBJ_TYPE_GRID,
|
||||
OBJ_TYPE_PIPE,
|
||||
OBJ_TYPE_GRID_MESH,
|
||||
OBJ_TYPE_UNKNOWN
|
||||
};
|
||||
|
||||
@ -45,6 +44,12 @@ public:
|
||||
COUNTERCLOCKWISE
|
||||
};
|
||||
|
||||
enum Role
|
||||
{
|
||||
GEOMETRY,
|
||||
MESH_LINES
|
||||
};
|
||||
|
||||
public:
|
||||
VdeExportPart(cvf::Part* part);
|
||||
|
||||
@ -55,6 +60,7 @@ public:
|
||||
void setColor(const cvf::Color3f& color);
|
||||
void setOpacity(float opacity);
|
||||
void setWinding(Winding winding);
|
||||
void setRole(Role role);
|
||||
|
||||
const cvf::Part* part() const;
|
||||
const cvf::TextureImage* textureImage() const;
|
||||
@ -65,6 +71,7 @@ public:
|
||||
cvf::Color3f color() const;
|
||||
float opacity() const;
|
||||
Winding winding() const;
|
||||
Role role() const;
|
||||
|
||||
private:
|
||||
cvf::cref<cvf::Part> m_part;
|
||||
@ -76,4 +83,5 @@ private:
|
||||
cvf::Color3f m_color;
|
||||
float m_opacity;
|
||||
Winding m_winding;
|
||||
Role m_role;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user