🛰️航天仿真算法库 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) {}
45 ColoredSurfaceEnrichment& operator=(const ColoredSurfaceEnrichment&) = default;
46 ColoredSurfaceEnrichment* clone() const override { return new ColoredSurfaceEnrichment(*this); }
47 void drawBegin() override;
48 void draw(Qwt3D::Triple const &) override;
49public:
51 void setData(const Qwt3D::GridData* grid);
52 void setPlotStyle(Qwt3D::PLOTSTYLE plotStyle){plotStyle_ = plotStyle;}
53 Qwt3D::PLOTSTYLE plotStyle() const {return plotStyle_;}
54 const Qwt3D::SurfacePlot* surface() const;
55
56private:
57 const Qwt3D::GridData* grid_{nullptr};
58 Qwt3D::PLOTSTYLE plotStyle_{Qwt3D::WIREFRAME};
59
60 void drawFaces();
61 void drawColoredMeshLines();
62};
63
64
67AST_NAMESPACE_END
定义 ColoredSurfaceEnrichment.hpp:39