36 #ifndef DISP3DLIB_ABSTRACTMESHTREEITEM_H
37 #define DISP3DLIB_ABSTRACTMESHTREEITEM_H
43 #include "../../../../disp3D_global.h"
44 #include "../common/abstract3Dtreeitem.h"
45 #include "../common/types.h"
51 #include <Qt3DRender/QGeometryRenderer>
66 namespace Qt3DRender {
95 typedef QSharedPointer<AbstractMeshTreeItem>
SPtr;
96 typedef QSharedPointer<const AbstractMeshTreeItem>
ConstSPtr;
107 int iType = Data3DTreeModelItemTypes::AbstractMeshItem,
108 const QString& text =
"Abstract Mesh Item");
114 virtual void setData(
const QVariant& value,
int role = Qt::UserRole + 1);
116 virtual void setMaterial(Qt3DRender::QMaterial *pMaterial);
128 void setMeshData(
const Eigen::MatrixX3f& tMatVert,
129 const Eigen::MatrixX3f& tMatNorm,
130 const Eigen::MatrixXi& tMatTris,
131 const Eigen::MatrixX4f &tMatColors,
132 Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType = Qt3DRender::QGeometryRenderer::Triangles);
140 virtual QPointer<CustomMesh> getCustomMesh();
150 virtual void setVertColor(
const Eigen::MatrixX4f &vertColor);
157 virtual void initItem();
165 virtual void onSurfaceTessInnerChanged(
const QVariant& fTessInner);
173 virtual void onSurfaceTessOuterChanged(
const QVariant& fTessOuter);
181 virtual void onSurfaceTriangleScaleChanged(
const QVariant& fTriangleScale);
189 virtual void onColorChanged(
const QVariant& color);
197 virtual void onSurfaceMaterialChanged(
const QVariant& sMaterial);
206 #endif // DISP3DLIB_ABSTRACTMESHTREEITEM_H