Workspace 6.21.5
Public Member Functions | List of all members
VolumeShader Class Reference

Volume shader for rendering 3D volume data.

#include <Rendering/SceneComponents/Shaders/volumeshader.h>

Inheritance diagram for VolumeShader:
[legend]

Public Member Functions

 VolumeShader ()
 
 VolumeShader (const VolumeShader &shader)
 
 ~VolumeShader () override
 
bool appliesTransparency () const override
 
VolumeShaderclone () const override
 
double getAlphaThreshold () const
 
bool getLimitDataToBounds () const
 
double getLowerBoundLimit () const
 
int getNumSamples () const
 
const DataAnalysis::TransferFunction2dgetTransferFunction () const
 
double getUpperBoundLimit () const
 
bool getUseInterpolation () const
 
bool getUseLighting () const
 
bool getUseStochasticJittering () const
 
DataAnalysis::Array3dScalargetVolumeData ()
 
const DataAnalysis::Array3dScalargetVolumeData () const
 
VolumeShaderoperator= (const VolumeShader &shader)
 
void setAlphaThreshold (double threshold)
 
void setLimitDataToBounds (bool val)
 
void setLowerBoundLimit (double val)
 
void setNumSamples (int n)
 
void setTransferFunction (const DataAnalysis::TransferFunction2d &tf)
 
void setUpperBoundLimit (double val)
 
void setUseInterpolation (bool b)
 
void setUseLighting (bool b)
 
void setUseStochasticJittering (bool b)
 
void setVolumedata (DataAnalysis::Array3dScalar &data)
 
- Public Member Functions inherited from TypedShader< VolumeShader >
 ~TypedShader () override=default
 
- Public Member Functions inherited from Shader
 ~Shader () override
 
bool activate (SceneRenderer &renderer)
 Activates the shader on the target WSGLRenderer in preparation for drawing an object.
 
virtual bool appliesScreenSpaceAmbientOcclusion ()
 
virtual bool appliesSpecular ()
 
virtual bool appliesTransparency () const =0
 
Shaderclone () const override=0
 
bool deactivate (SceneRenderer &renderer)
 Deactivates the shader on the target WSGLRenderer, setting it back to the state it was in before the shader was bound.
 
int getId () const
 
Mesh::MeshModelSource::MeshModelInterfaceLockedPtr getMeshModelInterface (const QString &modelId, Mesh::MeshModelLibrary &modelLib)
 
bool getModelSourceUpdateRequested () const
 
bool getOptimizeOutInternalVolumeElements () const
 
double getSegmentLineWidth () const
 
virtual TexturizergetTexturizer ()
 
virtual const TexturizergetTexturizer () const
 
bool renderCurrentModel (SceneRenderer &renderer)
 Renders the model currently being processed by the specified renderer.s.
 
bool renderCurrentModelGlyphs (SceneRenderer &renderer)
 
void setOptimizeOutInternalVolumeElements (bool val)
 
void setSegmentLineWidth (double width)
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from TypedShader< VolumeShader >
static void registerImplementation (const SceneRendererTypeId &rendererId, const ShaderImplementationFactory &factory)
 
- Protected Member Functions inherited from TypedShader< VolumeShader >
 TypedShader ()
 
 TypedShader (const TypedShader &shader)
 
TypedShaderclone () const override=0
 
- Protected Member Functions inherited from Shader
 Shader ()
 
 Shader (const Shader &shader)
 
void addImplementation (const SceneRendererContext &context, ShaderImplementation &impl)
 
void setId (int id)
 

Constructor & Destructor Documentation

◆ VolumeShader() [1/2]

◆ VolumeShader() [2/2]

VolumeShader ( const VolumeShader shader)

◆ ~VolumeShader()

~VolumeShader ( )
override

Member Function Documentation

◆ appliesTransparency()

bool appliesTransparency ( ) const
overridevirtual

Subclasses must override this to specify whether they apply transparency to objects or not when they are enabled.

Implements Shader.

◆ clone()

VolumeShader * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

Implements TypedShader< VolumeShader >.

◆ getAlphaThreshold()

double getAlphaThreshold ( ) const

◆ getLimitDataToBounds()

bool getLimitDataToBounds ( ) const

◆ getLowerBoundLimit()

double getLowerBoundLimit ( ) const

◆ getNumSamples()

int getNumSamples ( ) const

TEMP: Number of steps can be determined by looking at the dataset.

◆ getTransferFunction()

const DataAnalysis::TransferFunction2d & getTransferFunction ( ) const

◆ getUpperBoundLimit()

double getUpperBoundLimit ( ) const

◆ getUseInterpolation()

bool getUseInterpolation ( ) const
Returns
b If true, samples will be interpolated. If false, nearest-neighbour sampling will be used.

◆ getUseLighting()

bool getUseLighting ( ) const
Returns

◆ getUseStochasticJittering()

bool getUseStochasticJittering ( ) const

◆ getVolumeData() [1/2]

DataAnalysis::Array3dScalar & getVolumeData ( )

◆ getVolumeData() [2/2]

const Array3dScalar & getVolumeData ( ) const

◆ operator=()

VolumeShader & operator= ( const VolumeShader shader)

◆ setAlphaThreshold()

void setAlphaThreshold ( double  threshold)

◆ setLimitDataToBounds()

void setLimitDataToBounds ( bool  val)

◆ setLowerBoundLimit()

void setLowerBoundLimit ( double  val)

◆ setNumSamples()

void setNumSamples ( int  n)

◆ setTransferFunction()

void setTransferFunction ( const DataAnalysis::TransferFunction2d tf)

◆ setUpperBoundLimit()

void setUpperBoundLimit ( double  val)

◆ setUseInterpolation()

void setUseInterpolation ( bool  b)
Parameters
bIf true, samples will be interpolated. If false, nearest-neighbour sampling will be used.

◆ setUseLighting()

void setUseLighting ( bool  b)
Parameters
b

◆ setUseStochasticJittering()

void setUseStochasticJittering ( bool  b)

◆ setVolumedata()

void setVolumedata ( DataAnalysis::Array3dScalar data)