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

Base class for renederable 3D QEntities. More...

#include <renderable3Dentity.h>

Public Types

typedef QSharedPointer< Renderable3DEntitySPtr
 
typedef QSharedPointer< const Renderable3DEntityConstSPtr
 

Signals

void scaleChanged (float scale)
 
void rotXChanged (float rotX)
 
void rotYChanged (float rotY)
 
void rotZChanged (float rotZ)
 
void positionChanged (QVector3D position)
 

Public Member Functions

 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 setMaterialParameterRecursive (QObject *pObject, const QVariant &data, const QString &sParameterName)
 
virtual QPair< bool, QVariant > getMaterialParameterRecursive (QObject *pObject, const QString &sParameterName)
 

Protected Attributes

QPointer< Qt3DCore::QTransform > m_pTransform
 
float m_fScale
 
float m_fRotX
 
float m_fRotY
 
float m_fRotZ
 
QVector3D m_position
 

Properties

float scale
 
float rotX
 
float rotY
 
float rotZ
 
QVector3D position
 

Detailed Description

Base class for renederable 3D QEntities.

Base class for renederable 3D QEntities.

Definition at line 88 of file renderable3Dentity.h.

Inheritance diagram for DISP3DLIB::Renderable3DEntity:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for Renderable3DEntity class.

Definition at line 99 of file renderable3Dentity.h.

◆ SPtr

Shared pointer type for Renderable3DEntity class.

Definition at line 98 of file renderable3Dentity.h.

Constructor & Destructor Documentation

◆ Renderable3DEntity()

Renderable3DEntity::Renderable3DEntity ( Qt3DCore::QEntity *  parent = 0)
explicit

Default constructor.

Parameters
[in]parentThe parent of this entity.

Definition at line 81 of file renderable3Dentity.cpp.

◆ ~Renderable3DEntity()

Renderable3DEntity::~Renderable3DEntity ( )
virtual

Default destructor.

Definition at line 95 of file renderable3Dentity.cpp.

Member Function Documentation

◆ applyPosition()

void Renderable3DEntity::applyPosition ( const QVector3D &  position)
virtual

Applies the current position/translation.

Parameters
[in]positionThe position/translation value.

Definition at line 365 of file renderable3Dentity.cpp.

◆ applyRotX()

void Renderable3DEntity::applyRotX ( float  rotX)
virtual

Applies the current rotation around the x-axis.

Parameters
[in]rotXThe x-axis rotation value.

Definition at line 266 of file renderable3Dentity.cpp.

◆ applyRotY()

void Renderable3DEntity::applyRotY ( float  rotY)
virtual

Applies the current rotation around the y-axis.

Parameters
[in]rotYThe y-axis rotation value.

Definition at line 299 of file renderable3Dentity.cpp.

◆ applyRotZ()

void Renderable3DEntity::applyRotZ ( float  rotZ)
virtual

Applies the current rotation around the z-axis.

Parameters
[in]rotZThe z-axis rotation value.

Definition at line 332 of file renderable3Dentity.cpp.

◆ applyScale()

void Renderable3DEntity::applyScale ( float  scale)
virtual

Applies the current scale.

Parameters
[in]scaleThe new scaling value.

Definition at line 398 of file renderable3Dentity.cpp.

◆ applyTransform() [1/2]

void Renderable3DEntity::applyTransform ( const FIFFLIB::FiffCoordTrans transform,
bool  bApplyInverse = false 
)
virtual

Applies a transformation o ntop of the present one.

Parameters
[in]transformThe new entity's transform.
[in]bApplyInverseWhether to apply the inverse. False by default.

Definition at line 184 of file renderable3Dentity.cpp.

◆ applyTransform() [2/2]

void Renderable3DEntity::applyTransform ( const Qt3DCore::QTransform &  transform)
virtual

Applies a transformation o ntop of the present one.

Parameters
[in]transformThe new entity's transform.

Definition at line 177 of file renderable3Dentity.cpp.

◆ getMaterialParameter()

QVariant Renderable3DEntity::getMaterialParameter ( const QString &  sParameterName)
virtual

Gets the value of a specific parameter of the materials for this entity.

Parameters
[in]sParameterNameThe parameters name.
Returns
The data of the parameter.

Definition at line 449 of file renderable3Dentity.cpp.

◆ getMaterialParameterRecursive()

QPair< bool, QVariant > Renderable3DEntity::getMaterialParameterRecursive ( QObject *  pObject,
const QString &  sParameterName 
)
protectedvirtual

Gets the value of a specific parameter of the materials for this entity.

Parameters
[in]pObjectThe QObject to be scanned for parameters.
[in]sParameterNameThe parameters name.
Returns
The data of the parameter.

Definition at line 475 of file renderable3Dentity.cpp.

◆ position()

virtual QVector3D DISP3DLIB::Renderable3DEntity::position ( ) const
virtual

Returns the current position/translation.

Returns
The position/translation value.

◆ positionChanged

void DISP3DLIB::Renderable3DEntity::positionChanged ( QVector3D  position)
signal

Emit this signal whenever the position/translation changed.

Parameters
[in]positionThe position/translation value.

◆ rotX()

virtual float DISP3DLIB::Renderable3DEntity::rotX ( ) const
virtual

Returns the current rotation around the x-axis.

Returns
The x-axis rotation value.

◆ rotXChanged

void DISP3DLIB::Renderable3DEntity::rotXChanged ( float  rotX)
signal

Emit this signal whenever the x-axis rotation changed.

Parameters
[in]rotXThe x-axis rotation value.

◆ rotY()

virtual float DISP3DLIB::Renderable3DEntity::rotY ( ) const
virtual

Returns the current rotation around the y-axis.

Returns
The y-axis rotation value.

◆ rotYChanged

void DISP3DLIB::Renderable3DEntity::rotYChanged ( float  rotY)
signal

Emit this signal whenever the y-axis rotation changed.

Parameters
[in]rotYThe y-axis rotation value.

◆ rotZ()

virtual float DISP3DLIB::Renderable3DEntity::rotZ ( ) const
virtual

Returns the current rotation around the z-axis.

Returns
The z-axis rotation value.

◆ rotZChanged

void DISP3DLIB::Renderable3DEntity::rotZChanged ( float  rotZ)
signal

Emit this signal whenever the z-axis rotation changed.

Parameters
[in]rotZThe z-axis rotation value.

◆ scaleChanged

void DISP3DLIB::Renderable3DEntity::scaleChanged ( float  scale)
signal

Emit this signal whenever the scaling changed.

Parameters
[in]scaleThe scaling value.

◆ scaleValue()

float Renderable3DEntity::scaleValue ( ) const
virtual

Returns the current scaling value.

Returns
The scaling value.

Definition at line 231 of file renderable3Dentity.cpp.

◆ setMaterialParameter()

void Renderable3DEntity::setMaterialParameter ( const QVariant &  data,
const QString &  sParameterName 
)
virtual

Sets the value of a specific parameter of the materials for this entity.

Parameters
[in]dataThe value to be set.
[in]sParameterNameThe parameters name.

Definition at line 441 of file renderable3Dentity.cpp.

◆ setMaterialParameterRecursive()

void Renderable3DEntity::setMaterialParameterRecursive ( QObject *  pObject,
const QVariant &  data,
const QString &  sParameterName 
)
protectedvirtual

Sets the value of a specific parameter of the materials for this entity.

Parameters
[in]pObjectThe QObject to be scanned for parameters.
[in]dataThe new data.
[in]sParameterNameThe parameters name.

Definition at line 458 of file renderable3Dentity.cpp.

◆ setPosition()

void Renderable3DEntity::setPosition ( const QVector3D &  position)
virtual

Sets the current position/translation.

Parameters
[in]positionThe position/translation value.

Definition at line 381 of file renderable3Dentity.cpp.

◆ setRotX()

void Renderable3DEntity::setRotX ( float  rotX)
virtual

Sets the current rotation around the x-axis.

Parameters
[in]rotXThe x-axis rotation value.

Definition at line 282 of file renderable3Dentity.cpp.

◆ setRotY()

void Renderable3DEntity::setRotY ( float  rotY)
virtual

Sets the current rotation around the x-axis.

Parameters
[in]rotYThe y-axis rotation value.

Definition at line 315 of file renderable3Dentity.cpp.

◆ setRotZ()

void Renderable3DEntity::setRotZ ( float  rotZ)
virtual

Sets the current rotation around the x-axis.

Parameters
[in]rotZThe z-axis rotation value.

Definition at line 348 of file renderable3Dentity.cpp.

◆ setScale()

void Renderable3DEntity::setScale ( float  scale)
virtual

Sets the current scale.

Parameters
[in]scaleThe new scaling value.

Definition at line 414 of file renderable3Dentity.cpp.

◆ setTransform() [1/2]

void Renderable3DEntity::setTransform ( const FIFFLIB::FiffCoordTrans transform,
bool  bApplyInverse = false 
)
virtual

Sets the entity's transformation. This will clear the old transformation.

Parameters
[in]transformThe new entity's transform.
[in]bApplyInverseWhether to apply the inverse. False by default.

Definition at line 130 of file renderable3Dentity.cpp.

◆ setTransform() [2/2]

void Renderable3DEntity::setTransform ( const Qt3DCore::QTransform &  transform)
virtual

Manual garbage collection, since Qt3D is still a bit buggy when it come to memory handling. Sets the entity's transformation. This will clear the old transformation.

Parameters
[in]transformThe new entity's transform.

Definition at line 123 of file renderable3Dentity.cpp.

◆ setVisible()

void Renderable3DEntity::setVisible ( bool  state)
virtual

Call this function whenever you want to change the visibilty of the 3D rendered content.

Parameters
[in]stateThe visiblity flag.

Definition at line 431 of file renderable3Dentity.cpp.

Member Data Documentation

◆ m_fRotX

float DISP3DLIB::Renderable3DEntity::m_fRotX
protected

The x axis rotation value.

Definition at line 333 of file renderable3Dentity.h.

◆ m_fRotY

float DISP3DLIB::Renderable3DEntity::m_fRotY
protected

The y axis rotation value.

Definition at line 334 of file renderable3Dentity.h.

◆ m_fRotZ

float DISP3DLIB::Renderable3DEntity::m_fRotZ
protected

The z axis rotation value.

Definition at line 335 of file renderable3Dentity.h.

◆ m_fScale

float DISP3DLIB::Renderable3DEntity::m_fScale
protected

The scaling value.

Definition at line 332 of file renderable3Dentity.h.

◆ m_position

QVector3D DISP3DLIB::Renderable3DEntity::m_position
protected

The position/translation value.

Definition at line 336 of file renderable3Dentity.h.

◆ m_pTransform

QPointer<Qt3DCore::QTransform> DISP3DLIB::Renderable3DEntity::m_pTransform
protected

The main transformation.

Definition at line 330 of file renderable3Dentity.h.


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