Workspace 7.1.0
Public Types | Public Member Functions | List of all members
TextureProjectionShader Class Reference

A basic lambertian shader which can be attached to meshmodels.

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

Inheritance diagram for TextureProjectionShader:
[legend]

Public Types

enum  BlendMethod { Additive , Average }
 

Public Member Functions

 TextureProjectionShader ()
 
 TextureProjectionShader (const TextureProjectionShader &shader)
 
 ~TextureProjectionShader () override
 
void addCamera (Camera &camera, QImage &image)
 
bool appliesTransparency () const override
 
void clear () const
 
TextureProjectionShaderclone () const override
 
float getAlphaValue () const
 
BlendMethod getBlendMethod () const
 Get the Blend Method used to combine overlapping textures.
 
CameragetCamera (int i) const
 
const DataExecution::ObjectArraygetCameraImages () const
 
const DataExecution::ObjectArraygetCameras () const
 
QImagegetImage (int i) const
 
SurfaceRepresentation getSurfaceRepresentation () const
 
size_t numCameras () const
 
TextureProjectionShaderoperator= (const TextureProjectionShader &shader)
 
void setAlphaValue (float alpha)
 
void setBlendMethod (BlendMethod method)
 Set the Blend Method object.
 
void setSurfaceRepresentation (SurfaceRepresentation r)
 
void setUseLighting (bool b)
 
void setUseTextureAlpha (bool b)
 
bool useLighting () const
 
bool useTextureAlpha () const
 
- Public Member Functions inherited from TypedShader< TextureProjectionShader >
 ~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
 
Shaderoperator= (const Shader &)
 
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< TextureProjectionShader >
static void registerImplementation (const SceneRendererTypeId &rendererId, const ShaderImplementationFactory &factory)
 
- Protected Member Functions inherited from TypedShader< TextureProjectionShader >
 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)
 

Member Enumeration Documentation

◆ BlendMethod

Enumerator
Additive 
Average 

Constructor & Destructor Documentation

◆ TextureProjectionShader() [1/2]

◆ TextureProjectionShader() [2/2]

◆ ~TextureProjectionShader()

~TextureProjectionShader ( )
overridedefault

Member Function Documentation

◆ addCamera()

void addCamera ( Camera camera,
QImage image 
)
Parameters
camera
image

◆ 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.

◆ clear()

void clear ( ) const

◆ clone()

TextureProjectionShader * 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< TextureProjectionShader >.

◆ getAlphaValue()

float getAlphaValue ( ) const

◆ getBlendMethod()

TextureProjectionShader::BlendMethod getBlendMethod ( ) const

◆ getCamera()

Camera & getCamera ( int  i) const
Parameters
i
Returns

◆ getCameraImages()

const DataExecution::ObjectArray & getCameraImages ( ) const
Returns

◆ getCameras()

const DataExecution::ObjectArray & getCameras ( ) const
Returns

◆ getImage()

QImage & getImage ( int  i) const
Parameters
i
Returns

◆ getSurfaceRepresentation()

SurfaceRepresentation getSurfaceRepresentation ( ) const

◆ numCameras()

size_t numCameras ( ) const
Returns

◆ operator=()

TextureProjectionShader & operator= ( const TextureProjectionShader shader)

◆ setAlphaValue()

void setAlphaValue ( float  alpha)

◆ setBlendMethod()

void setBlendMethod ( BlendMethod  method)
Parameters
methodThe method to use to blend overlapping images

◆ setSurfaceRepresentation()

void setSurfaceRepresentation ( SurfaceRepresentation  r)

◆ setUseLighting()

void setUseLighting ( bool  b)

◆ setUseTextureAlpha()

void setUseTextureAlpha ( bool  b)

◆ useLighting()

bool useLighting ( ) const

◆ useTextureAlpha()

bool useTextureAlpha ( ) const