mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3876 Implement rotated labels on contour maps
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimContourMapProjection.h"
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
|
||||
@@ -26,29 +28,37 @@
|
||||
#include "cvfDrawableText.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cvfVector4.h"
|
||||
|
||||
class RimContourMapView;
|
||||
class RimContourMapProjection;
|
||||
|
||||
class RivContourMapProjectionPartMgr : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RivContourMapProjectionPartMgr(RimContourMapProjection* contourMapProjection, RimContourMapView* contourMap);
|
||||
|
||||
void createProjectionGeometry();
|
||||
void appendProjectionToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
void appendContourLinesToModel(const cvf::Camera* camera, cvf::ModelBasicList* model, const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
void appendPickPointVisToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
|
||||
cvf::ref<cvf::Vec2fArray> createTextureCoords(const std::vector<double>& values) const;
|
||||
|
||||
|
||||
private:
|
||||
static cvf::ref<cvf::DrawableText> createTextLabel(const cvf::Color3f& textColor, const cvf::Color3f& backgroundColor);
|
||||
cvf::ref<cvf::Part> createProjectionMapPart(const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
std::vector<std::vector<cvf::ref<cvf::Drawable>>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
std::vector<std::vector<cvf::ref<cvf::Drawable>>> createContourPolygons(const caf::DisplayCoordTransform* displayCoordTransform, const std::vector<std::vector<cvf::BoundingBox>>& labelBBoxes) const;
|
||||
std::vector<cvf::ref<cvf::Drawable>> createContourLabels(const cvf::Camera* camera, const caf::DisplayCoordTransform* displayCoordTransform, std::vector<std::vector<cvf::BoundingBox>>* labelBBoxes) const;
|
||||
cvf::ref<cvf::DrawableGeo> createPickPointVisDrawable(const caf::DisplayCoordTransform* displayCoordTransform) const;
|
||||
private:
|
||||
caf::PdmPointer<RimContourMapProjection> m_contourMapProjection;
|
||||
caf::PdmPointer<RimContourMapView> m_parentContourMap;
|
||||
|
||||
std::vector<RimContourMapProjection::ContourPolygons> m_contourLinePolygons;
|
||||
std::vector<cvf::Vec4d> m_contourMapTriangles;
|
||||
std::vector<std::vector<cvf::BoundingBox>> m_labelBoundingBoxes;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user