mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
HoloLens: Export of cull face mode to JSON
This commit is contained in:
parent
7588c0d2ae
commit
f2668eae4e
@ -303,6 +303,13 @@ std::unique_ptr<VdeMesh> VdeVizDataExtractor::createMeshFromExportPart(const Vde
|
||||
mesh->color = exportPart.color();
|
||||
mesh->opacity = exportPart.opacity();
|
||||
|
||||
if (exportPart.cullFace() != VdeExportPart::CF_NONE)
|
||||
{
|
||||
if (exportPart.cullFace() == VdeExportPart::CF_FRONT) mesh->cullFaceModeStr = "front";
|
||||
else if (exportPart.cullFace() == VdeExportPart::CF_BACK) mesh->cullFaceModeStr = "back";
|
||||
else mesh->cullFaceModeStr = "none";
|
||||
}
|
||||
|
||||
//cvf::Trace::show("createMeshFromExportPart(): numFaces=%d, time=%dms", faceCount, static_cast<int>(tim.time()*1000));
|
||||
|
||||
return mesh;
|
||||
@ -345,6 +352,11 @@ QString VdeVizDataExtractor::createModelMetaJsonString(const std::vector<std::un
|
||||
|
||||
jsonMeshMeta["opacity"] = mesh->opacity;
|
||||
|
||||
if (!mesh->cullFaceModeStr.isEmpty())
|
||||
{
|
||||
jsonMeshMeta["cullFaceMode"] = mesh->cullFaceModeStr;
|
||||
}
|
||||
|
||||
jsonMeshMetaList.push_back(jsonMeshMeta);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@ struct VdeMesh
|
||||
|
||||
cvf::Color3f color;
|
||||
float opacity;
|
||||
QString cullFaceModeStr; // front, back or none (or empty)
|
||||
|
||||
int verticesPerPrimitive;
|
||||
cvf::cref<cvf::Vec3fArray> vertexArr;
|
||||
|
Loading…
Reference in New Issue
Block a user