mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3948 HoloLens : Add labels
This commit is contained in:
@@ -38,15 +38,16 @@
|
||||
#include "RivMeshLinesSourceInfo.h"
|
||||
#include "RivSimWellPipeSourceInfo.h"
|
||||
#include "RivSourceInfo.h"
|
||||
#include "RivTextLabelSourceInfo.h"
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
|
||||
#include "cafEffectGenerator.h"
|
||||
|
||||
#include "cvfPart.h"
|
||||
#include "cvfRenderState.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfRenderStateCullFace.h"
|
||||
#include "cvfRenderStateTextureBindings.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "cvfTexture.h"
|
||||
#include "cvfTexture2D_FF.h"
|
||||
|
||||
@@ -213,6 +214,27 @@ std::vector<VdeExportPart> RicHoloLensExportImpl::partsForExport(const RimGridVi
|
||||
return exportParts;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<cvf::Vec3f, cvf::String>> RicHoloLensExportImpl::labelsForExport(const RimGridView& view)
|
||||
{
|
||||
std::vector<std::pair<cvf::Vec3f, cvf::String>> labelAndPositions;
|
||||
|
||||
auto visibleParts = view.viewer()->visibleParts();
|
||||
|
||||
for (auto& visiblePart : visibleParts)
|
||||
{
|
||||
const RivTextLabelSourceInfo* textLabel = dynamic_cast<const RivTextLabelSourceInfo*>(visiblePart->sourceInfo());
|
||||
if (textLabel)
|
||||
{
|
||||
labelAndPositions.push_back(std::make_pair(textLabel->textPositionDisplayCoord(), textLabel->text()));
|
||||
}
|
||||
}
|
||||
|
||||
return labelAndPositions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user