MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DISP3DLIB::AbstractMeshTreeItem Class Reference

Provides a generic mesh tree item. More...

#include <abstractmeshtreeitem.h>

Public Types

typedef QSharedPointer< AbstractMeshTreeItemSPtr
 
typedef QSharedPointer< const AbstractMeshTreeItemConstSPtr
 
- Public Types inherited from DISP3DLIB::Renderable3DEntity
typedef QSharedPointer< Renderable3DEntitySPtr
 
typedef QSharedPointer< const Renderable3DEntityConstSPtr
 

Public Member Functions

 AbstractMeshTreeItem (Qt3DCore::QEntity *p3DEntityParent=Q_NULLPTR, int iType=Data3DTreeModelItemTypes::AbstractMeshItem, const QString &text="Abstract Mesh Item")
 
virtual void setData (const QVariant &value, int role=Qt::UserRole+1)
 
virtual void setMaterial (Qt3DRender::QMaterial *pMaterial)
 
void setMeshData (const Eigen::MatrixX3f &tMatVert, const Eigen::MatrixX3f &tMatNorm, const Eigen::MatrixXi &tMatTris, const Eigen::MatrixX4f &tMatColors, Qt3DRender::QGeometryRenderer::PrimitiveType primitiveType=Qt3DRender::QGeometryRenderer::Triangles)
 
virtual QPointer< CustomMeshgetCustomMesh ()
 
virtual void setVertColor (const Eigen::MatrixX4f &vertColor)
 
- Public Member Functions inherited from DISP3DLIB::Abstract3DTreeItem
 Abstract3DTreeItem (QEntity *p3DEntityParent=0, int iType=Data3DTreeModelItemTypes::UnknownItem, const QString &text="")
 
void setData (const QVariant &value, int role=Qt::UserRole+1)
 
int type () const
 
QList< QStandardItem * > findChildren (int type)
 
QList< QStandardItem * > findChildren (const QString &text)
 
Abstract3DTreeItemoperator<< (Abstract3DTreeItem *newItem)
 
Abstract3DTreeItemoperator<< (Abstract3DTreeItem &newItem)
 
void setAlpha (float fAlpha)
 
- Public Member Functions inherited from DISP3DLIB::Renderable3DEntity
 Renderable3DEntity (Qt3DCore::QEntity *parent=0)
 
virtual ~Renderable3DEntity ()
 
virtual void setTransform (const Qt3DCore::QTransform &transform)
 
virtual void setTransform (const FIFFLIB::FiffCoordTrans &transform, bool bApplyInverse=false)
 
virtual void applyTransform (const Qt3DCore::QTransform &transform)
 
virtual void applyTransform (const FIFFLIB::FiffCoordTrans &transform, bool bApplyInverse=false)
 
virtual float scaleValue () const
 
virtual float rotX () const
 
virtual float rotY () const
 
virtual float rotZ () const
 
virtual QVector3D position () const
 
virtual void applyRotX (float rotX)
 
virtual void setRotX (float rotX)
 
virtual void applyRotY (float rotY)
 
virtual void setRotY (float rotY)
 
virtual void applyRotZ (float rotZ)
 
virtual void setRotZ (float rotZ)
 
virtual void applyPosition (const QVector3D &position)
 
virtual void setPosition (const QVector3D &position)
 
virtual void applyScale (float scale)
 
virtual void setScale (float scale)
 
virtual void setVisible (bool state)
 
virtual void setMaterialParameter (const QVariant &data, const QString &sParameterName)
 
virtual QVariant getMaterialParameter (const QString &sParameterName)
 

Protected Member Functions

virtual void initItem ()
 
virtual void onSurfaceTessInnerChanged (const QVariant &fTessInner)
 
virtual void onSurfaceTessOuterChanged (const QVariant &fTessOuter)
 
virtual void onSurfaceTriangleScaleChanged (const QVariant &fTriangleScale)
 
virtual void onColorChanged (const QVariant &color)
 
virtual void onSurfaceMaterialChanged (const QVariant &sMaterial)
 
- Protected Member Functions inherited from DISP3DLIB::Abstract3DTreeItem
virtual void onCheckStateChanged (const Qt::CheckState &checkState)
 
virtual void onTranslationXChanged (const QVariant &fTransX)
 
virtual void onTranslationYChanged (const QVariant &fTransY)
 
virtual void onTranslationZChanged (const QVariant &fTransZ)
 
virtual void onScaleChanged (const QVariant &fScale)
 
virtual void onAlphaChanged (const QVariant &fAlpha)
 
- Protected Member Functions inherited from DISP3DLIB::Renderable3DEntity
virtual void setMaterialParameterRecursive (QObject *pObject, const QVariant &data, const QString &sParameterName)
 
virtual QPair< bool, QVariant > getMaterialParameterRecursive (QObject *pObject, const QString &sParameterName)
 

Protected Attributes

QPointer< Qt3DRender::QMaterial > m_pMaterial
 
QPointer< CustomMeshm_pCustomMesh
 
- Protected Attributes inherited from DISP3DLIB::Abstract3DTreeItem
int m_iType
 
QPointer< MetaTreeItemm_pItemTransformationOptions
 
QPointer< MetaTreeItemm_pItemAppearanceOptions
 
- Protected Attributes inherited from DISP3DLIB::Renderable3DEntity
QPointer< Qt3DCore::QTransform > m_pTransform
 
float m_fScale
 
float m_fRotX
 
float m_fRotY
 
float m_fRotZ
 
QVector3D m_position
 

Additional Inherited Members

- Signals inherited from DISP3DLIB::Abstract3DTreeItem
void checkStateChanged (const Qt::CheckState &checkState)
 
- Signals inherited from DISP3DLIB::Renderable3DEntity
void scaleChanged (float scale)
 
void rotXChanged (float rotX)
 
void rotYChanged (float rotY)
 
void rotZChanged (float rotZ)
 
void positionChanged (QVector3D position)
 
- Static Public Member Functions inherited from DISP3DLIB::Abstract3DTreeItem
static Eigen::MatrixX4f createVertColor (int numVert, const QColor &color=QColor(0, 49, 69))
 
- Properties inherited from DISP3DLIB::Renderable3DEntity
float scale
 
float rotX
 
float rotY
 
float rotZ
 
QVector3D position
 

Detailed Description

Provides a generic mesh tree item.

AbstractMeshTreeItem provides a generic brain tree item to hold of brain data (hemi, vertices, tris, etc.) from different sources (FreeSurfer, etc.).

Definition at line 90 of file abstractmeshtreeitem.h.

Inheritance diagram for DISP3DLIB::AbstractMeshTreeItem:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for AbstractMeshTreeItem class.

Definition at line 96 of file abstractmeshtreeitem.h.

◆ SPtr

Shared pointer type for AbstractMeshTreeItem class.

Definition at line 95 of file abstractmeshtreeitem.h.

Constructor & Destructor Documentation

◆ AbstractMeshTreeItem()

AbstractMeshTreeItem::AbstractMeshTreeItem ( Qt3DCore::QEntity *  p3DEntityParent = Q_NULLPTR,
int  iType = Data3DTreeModelItemTypes::AbstractMeshItem,
const QString &  text = "Abstract Mesh Item" 
)
explicit

Default constructor.

Parameters
[in]p3DEntityParentThe parent 3D entity.
[in]iTypeThe type of the item. See types.h for declaration and definition.
[in]textThe text of this item. This is also by default the displayed name of the item in a view.

Definition at line 69 of file abstractmeshtreeitem.cpp.

Member Function Documentation

◆ getCustomMesh()

QPointer< CustomMesh > AbstractMeshTreeItem::getCustomMesh ( )
virtual

Returns the custom mesh.

Returns
The costum mesh.

Definition at line 79 of file abstractmeshtreeitem.cpp.

◆ initItem()

void AbstractMeshTreeItem::initItem ( )
protectedvirtual

◆ onColorChanged()

void AbstractMeshTreeItem::onColorChanged ( const QVariant &  color)
protectedvirtual

Call this function whenever the surface color was changed.

Parameters
[in]colorThe new surface color.

Reimplemented from DISP3DLIB::Abstract3DTreeItem.

Definition at line 248 of file abstractmeshtreeitem.cpp.

◆ onSurfaceMaterialChanged()

void AbstractMeshTreeItem::onSurfaceMaterialChanged ( const QVariant &  sMaterial)
protectedvirtual

Call this function whenever the surface material was changed.

Parameters
[in]materialThe new surface material.

Definition at line 260 of file abstractmeshtreeitem.cpp.

◆ onSurfaceTessInnerChanged()

void AbstractMeshTreeItem::onSurfaceTessInnerChanged ( const QVariant &  fTessInner)
protectedvirtual

Call this function whenever the inner tesselation value changed.

Parameters
[in]fTessInnerThe new inner tesselation value.

Definition at line 227 of file abstractmeshtreeitem.cpp.

◆ onSurfaceTessOuterChanged()

void AbstractMeshTreeItem::onSurfaceTessOuterChanged ( const QVariant &  fTessOuter)
protectedvirtual

Call this function whenever the outer tesselation value changed.

Parameters
[in]fTessOuterThe new outer tesselation value.

Definition at line 234 of file abstractmeshtreeitem.cpp.

◆ onSurfaceTriangleScaleChanged()

void AbstractMeshTreeItem::onSurfaceTriangleScaleChanged ( const QVariant &  fTriangleScale)
protectedvirtual

Call this function whenever the triangle scale value changed.

Parameters
[in]fTriangleScaleThe triangle scale value.

Definition at line 241 of file abstractmeshtreeitem.cpp.

◆ setData()

void AbstractMeshTreeItem::setData ( const QVariant &  value,
int  role = Qt::UserRole + 1 
)
virtual

AbstractTreeItem functions

Definition at line 169 of file abstractmeshtreeitem.cpp.

◆ setMeshData()

void AbstractMeshTreeItem::setMeshData ( const Eigen::MatrixX3f &  tMatVert,
const Eigen::MatrixX3f &  tMatNorm,
const Eigen::MatrixXi &  tMatTris,
const Eigen::MatrixX4f &  tMatColors,
Qt3DRender::QGeometryRenderer::PrimitiveType  primitiveType = Qt3DRender::QGeometryRenderer::Triangles 
)

Set the needed information to create the mesh and then creates a new mesh.

Parameters
[in]tMatVertVertices in form of a matrix.
[in]tMatNormNormals in form of a matrix.
[in]tMatTrisTris/Faces in form of a matrix.
[in]tMatColorsThe color info of all the vertices.
[in]primitiveTypeThe primitive type of the mesh lines, triangles, etc.

Definition at line 206 of file abstractmeshtreeitem.cpp.

◆ setVertColor()

void AbstractMeshTreeItem::setVertColor ( const Eigen::MatrixX4f &  vertColor)
virtual

Set new vertices colors to the mesh.

Parameters
[in]vertColorNew color matrix Eigen::MatrixX3f.
Returns
The costum mesh.

Definition at line 86 of file abstractmeshtreeitem.cpp.

Member Data Documentation

◆ m_pCustomMesh

QPointer<CustomMesh> DISP3DLIB::AbstractMeshTreeItem::m_pCustomMesh
protected

The actual mesh information (vertices, normals, colors).

Definition at line 200 of file abstractmeshtreeitem.h.

◆ m_pMaterial

QPointer<Qt3DRender::QMaterial> DISP3DLIB::AbstractMeshTreeItem::m_pMaterial
protected

The material. Ownership belongs to RenderableEntity.

Definition at line 199 of file abstractmeshtreeitem.h.


The documentation for this class was generated from the following files: