🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ColoredSurfaceEnrichment.hpp
1
20
21#pragma once
22
23#include "AstGlobal.h"
24#include <qwt3d_surfaceplot.h>
25#include <qwt3d_enrichment.h>
26
27
28AST_NAMESPACE_BEGIN
29
39class ColoredSurfaceEnrichment : public Qwt3D::VertexEnrichment {
40public:
41 ColoredSurfaceEnrichment() = default;
42 explicit ColoredSurfaceEnrichment(Qwt3D::PLOTSTYLE plotStyle)
43 : plotStyle_(plotStyle) {}
44 ColoredSurfaceEnrichment* clone() const override { return new ColoredSurfaceEnrichment(*this); }
45 void drawBegin() override;
46 void draw(Qwt3D::Triple const &) override;
47public:
49 void setData(const Qwt3D::GridData* grid);
50 void setPlotStyle(Qwt3D::PLOTSTYLE plotStyle){plotStyle_ = plotStyle;}
51 Qwt3D::PLOTSTYLE plotStyle() const {return plotStyle_;}
52 const Qwt3D::SurfacePlot* surface() const;
53
54private:
55 const Qwt3D::GridData* grid_{nullptr};
56 Qwt3D::PLOTSTYLE plotStyle_{Qwt3D::WIREFRAME};
57
58 void drawFaces();
59 void drawColoredMeshLines();
60};
61
62
65AST_NAMESPACE_END
定义 ColoredSurfaceEnrichment.hpp:39