gramods
Loading...
Searching...
No Matches
gramods::gmGraphics::ChromaKeyView Class Reference

The ChromaKeyView filters another view making it transparent where the chroma key is matched within the CbCr color space within a specified tolerance. More...

#include <ChromaKeyView.hh>

Inheritance diagram for gramods::gmGraphics::ChromaKeyView:
Collaboration diagram for gramods::gmGraphics::ChromaKeyView:

Classes

struct  Impl

Public Member Functions

void renderFullPipeline (ViewSettings settings) override
 Appends local scene graph nodes to the view settings, forwards rendering to the sub views, and applies chroma key to the alpha of the results.
void traverse (Visitor *visitor) override
 Propagates the specified visitor.
void addView (std::shared_ptr< View >)
 Adds a view to mask with chroma key.
void setKey (gmCore::float3 key)
 Set the RGB key to mask with.
void setTolerance (gmCore::float2 tol)
 Set the minimum and maximum tolerances against the key when masking.
Public Member Functions inherited from gramods::gmGraphics::ViewBase
void addNode (std::shared_ptr< Node > node)
 Adds a scene graph to the view.
void setViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Sets the viewpoint to use in the views rendered by this ViewBase.
void addViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Adds a viewpoint to use in the views rendered by this ViewBase.
void traverse (Visitor *visitor) override
 Propagates the specified visitor.
Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data.
virtual ~Object ()
 Cleaning up internal data.
virtual void initialize ()
 Called to initialize the Object.
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument.
bool isInitialized ()
 Returns true if the Object is initialized.

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
Static Public Attributes inherited from gramods::gmGraphics::View
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
Static Public Attributes inherited from gramods::gmGraphics::ViewBase
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi

Additional Inherited Members

Protected Member Functions inherited from gramods::gmGraphics::ViewBase
void populateViewSettings (ViewSettings &settings)
 Adds the dispatcher's local renderers and viewpoint, if set.
Protected Attributes inherited from gramods::gmGraphics::ViewBase
Node::list nodes
std::vector< std::shared_ptr< Viewpoint > > viewpoints

Detailed Description

The ChromaKeyView filters another view making it transparent where the chroma key is matched within the CbCr color space within a specified tolerance.

Member Function Documentation

◆ addView()

void gramods::gmGraphics::ChromaKeyView::addView ( std::shared_ptr< View > view)

Adds a view to mask with chroma key.

XML-attribute: view

◆ renderFullPipeline()

void gramods::gmGraphics::ChromaKeyView::renderFullPipeline ( ViewSettings settings)
overridevirtual

Appends local scene graph nodes to the view settings, forwards rendering to the sub views, and applies chroma key to the alpha of the results.

Reimplemented from gramods::gmGraphics::ViewBase.

◆ setKey()

void gramods::gmGraphics::ChromaKeyView::setKey ( gmCore::float3 key)

Set the RGB key to mask with.

Default is [0, 1, 0].

XML-attribute: key

◆ setTolerance()

void gramods::gmGraphics::ChromaKeyView::setTolerance ( gmCore::float2 tol)

Set the minimum and maximum tolerances against the key when masking.

This will specify a ramp in decimal CrCb (2D) color space. Default is [0.48, 0.50].

XML-attribute: tolerance

◆ traverse()

void gramods::gmGraphics::ChromaKeyView::traverse ( Visitor * visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.


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