DD::Image::ArrayKnobI::ValueProvider Class Referenceabstract

Inherited by DD::Image::WorldMatrixProvider.

Public Member Functions

virtual bool provideValuesEnabled (const ArrayKnobI *arrayKnob, const DD::Image::OutputContext &oc) const =0
 
virtual std::vector< double > provideValues (const ArrayKnobI *arrayKnob, const DD::Image::OutputContext &oc) const =0
 

Detailed Description

Interface to provide facility for 'output knobs', whose values are not stored in the backend, but synthesised on demand from other values. To create an output knob, implement this interface, create an Array_Knob and call ->setValueProvider() on it pointing at your implementation of the interface.

Member Function Documentation

virtual bool DD::Image::ArrayKnobI::ValueProvider::provideValuesEnabled ( const ArrayKnobI *  arrayKnob,
const DD::Image::OutputContext oc 
) const
pure virtual

This function should return true if the knob is presently an output knob. This allows this functionality to be toggled on/off without (with a bool knob for example) without having to call ->setValueProvider() after the initial setup.

virtual std::vector<double> DD::Image::ArrayKnobI::ValueProvider::provideValues ( const ArrayKnobI *  arrayKnob,
const DD::Image::OutputContext oc 
) const
pure virtual

This function should return the values to be displayed in the output knob. The vector must match the array_size() of the Array_Knob.



©2019 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk