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

This abstract class is used as a base class for all materials that are using the phong alpha lightining model in their shaders. More...

#include <abstractphongalphamaterial.h>

Public Types

typedef QSharedPointer< AbstractPhongAlphaMaterialSPtr
 
typedef QSharedPointer< const AbstractPhongAlphaMaterialConstSPtr
 

Public Member Functions

 AbstractPhongAlphaMaterial (bool bUseSortPolicy, QNode *parent)
 
virtual ~AbstractPhongAlphaMaterial ()=default
 
virtual float alpha () const
 
virtual void setAlpha (float fAlpha)
 

Protected Member Functions

virtual void init ()
 
virtual void setShaderCode ()=0
 
virtual void addShaderToRenderPass (const QString &sObjectName, Qt3DRender::QShaderProgram *pShaderProgramm)
 
virtual void onAlphaChanged (const QVariant &fAlpha)
 

Protected Attributes

QPointer< Qt3DRender::QEffect > m_pEffect
 
QPointer< Qt3DRender::QParameter > m_pDiffuseParameter
 
QPointer< Qt3DRender::QParameter > m_pSpecularParameter
 
QPointer< Qt3DRender::QParameter > m_pShininessParameter
 
QPointer< Qt3DRender::QParameter > m_pAlphaParameter
 
QPointer< Qt3DRender::QFilterKey > m_pDrawFilterKey
 
bool m_bUseSortPolicy
 

Detailed Description

This abstract class is used as a base class for all materials that are using the phong alpha lightining model in their shaders.

This abstract class is used as a base class for all materials that are using the phong alpha lightining model in their shaders.

Definition at line 84 of file abstractphongalphamaterial.h.

Inheritance diagram for DISP3DLIB::AbstractPhongAlphaMaterial:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for AbstractPhongAlphaMaterial.

Definition at line 90 of file abstractphongalphamaterial.h.

◆ SPtr

Shared pointer type for AbstractPhongAlphaMaterial.

Definition at line 89 of file abstractphongalphamaterial.h.

Constructor & Destructor Documentation

◆ AbstractPhongAlphaMaterial()

AbstractPhongAlphaMaterial::AbstractPhongAlphaMaterial ( bool  bUseSortPolicy,
QNode *  parent 
)
explicit

Default constructs a AbstractPhongAlphaMaterial object.

Parameters
[in]bUseSortPolicyWhether to use the sort policy in the framegraph.
[in]parentThe parent of this object.

Definition at line 74 of file abstractphongalphamaterial.cpp.

◆ ~AbstractPhongAlphaMaterial()

virtual DISP3DLIB::AbstractPhongAlphaMaterial::~AbstractPhongAlphaMaterial ( )
virtualdefault

The virtual default destructor.

Member Function Documentation

◆ addShaderToRenderPass()

void AbstractPhongAlphaMaterial::addShaderToRenderPass ( const QString &  sObjectName,
Qt3DRender::QShaderProgram *  pShaderProgramm 
)
protectedvirtual

This function searches the children of this item for a QRenderPass with matching name and sets the given shader program.

Parameters
[in]sObjectNameThe object name of the render pass.
[in]pShaderProgrammThe shader programm. Passing a nullptr is not allowed.

Definition at line 161 of file abstractphongalphamaterial.cpp.

◆ alpha()

float AbstractPhongAlphaMaterial::alpha ( ) const
virtual

Get the current alpha value.

Returns
The current alpha value.

Definition at line 94 of file abstractphongalphamaterial.cpp.

◆ init()

void AbstractPhongAlphaMaterial::init ( )
protectedvirtual

Inits the OpenGL 3.3, 2.0, ES2.0 techniques and add phong alpha parameters. This functions needs to be overridden for other techniques.

Reimplemented in DISP3DLIB::GpuInterpolationMaterial.

Definition at line 108 of file abstractphongalphamaterial.cpp.

◆ onAlphaChanged()

void AbstractPhongAlphaMaterial::onAlphaChanged ( const QVariant &  fAlpha)
protectedvirtual

This function gets called whenever the alpha value is changed. It handles the change between opaque and transparent depending on the new alpha.

Parameters
[in]fAlphaThe new alpha value.

Definition at line 173 of file abstractphongalphamaterial.cpp.

◆ setAlpha()

void AbstractPhongAlphaMaterial::setAlpha ( float  fAlpha)
virtual

Set the current alpha value.

Parameters
[in]fAlphaThe new alpha value.

Definition at line 101 of file abstractphongalphamaterial.cpp.

◆ setShaderCode()

virtual void DISP3DLIB::AbstractPhongAlphaMaterial::setShaderCode ( )
protectedpure virtual

This abstract function should be used by the derived class to set the appropriate shader code. The implemented function has to be called by the derived class.

Implemented in DISP3DLIB::GpuInterpolationMaterial.

Member Data Documentation

◆ m_bUseSortPolicy

bool DISP3DLIB::AbstractPhongAlphaMaterial::m_bUseSortPolicy
protected

Flag that indicated hether to use the sort policy in the frame graph.

Definition at line 167 of file abstractphongalphamaterial.h.

◆ m_pAlphaParameter

QPointer<Qt3DRender::QParameter> DISP3DLIB::AbstractPhongAlphaMaterial::m_pAlphaParameter
protected

Parameter that determines the alpha value.

Definition at line 163 of file abstractphongalphamaterial.h.

◆ m_pDiffuseParameter

QPointer<Qt3DRender::QParameter> DISP3DLIB::AbstractPhongAlphaMaterial::m_pDiffuseParameter
protected

Parameter that determines the diffuse value.

Definition at line 160 of file abstractphongalphamaterial.h.

◆ m_pDrawFilterKey

QPointer<Qt3DRender::QFilterKey> DISP3DLIB::AbstractPhongAlphaMaterial::m_pDrawFilterKey
protected

Filter key for navigating in the frame graph.

Definition at line 165 of file abstractphongalphamaterial.h.

◆ m_pEffect

QPointer<Qt3DRender::QEffect> DISP3DLIB::AbstractPhongAlphaMaterial::m_pEffect
protected

Material Effect.

Definition at line 158 of file abstractphongalphamaterial.h.

◆ m_pShininessParameter

QPointer<Qt3DRender::QParameter> DISP3DLIB::AbstractPhongAlphaMaterial::m_pShininessParameter
protected

Parameter that determines the shininess value.

Definition at line 162 of file abstractphongalphamaterial.h.

◆ m_pSpecularParameter

QPointer<Qt3DRender::QParameter> DISP3DLIB::AbstractPhongAlphaMaterial::m_pSpecularParameter
protected

Parameter that determines the specular value.

Definition at line 161 of file abstractphongalphamaterial.h.


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