9#include <imt3dgui/CShape3dBase.h>
10#include <imt3d/CPointCloud3d.h>
17class CGridShape:
public CShape3dBase
19 typedef CShape3dBase BaseClass;
31 void SetGridValue(
double gridValue);
32 void SetCount(
int count);
33 void SetPlanePosition(
double position);
34 void SetPlaneMode(PlaneMode planeMode);
38 virtual void UpdateShapeGeometry(
const istd::IChangeable::ChangeSet& changeSet)
override;
39 virtual void DrawShapeGl(QOpenGLShaderProgram& program, QOpenGLFunctions& functions)
override;
42 virtual QVector3D GetColor()
const override {
return QVector3D(0.5, 0.5, 0.5); }
45 typedef std::vector<imt3d::CPointCloud3d::PointXyz32> Vertices;
46 void CreateXyPlane(Vertices& vertices,
double planePosition)
const;
47 void CreateXzPlane(Vertices& vertices,
double planePosition)
const;
48 void CreateYzPlane(Vertices& vertices,
double planePosition)
const;
51 double m_gridValue = 0.1;
54 bool m_doUpdate =
false;
55 PlaneMode m_planeMode = PM_XY;
57 std::optional<double> m_planePosition;