38 vector<string> _labelArray;
39 vector<int32_t> _valArray;
41 bool _isFilterInputImage =
false;
42 bool _isTransStartImage =
false;
43 bool _isTransEndImage =
false;
44 bool _isTransProgressFloat =
false;
45 int32_t _uniformLocation[4] = { -1, -1, -1, -1 };
47 double _evalVariable = 1.0;
64 const string & inDesc,
65 const string & inLabel,
71 const vector<string> * inLabels=
nullptr,
72 const vector<int32_t> * inVals=
nullptr);
76 inline string &
name()
const {
return const_cast<string&
>(_name); }
78 inline string &
description()
const {
return const_cast<string&
>(_description); }
80 inline string &
label()
const {
return const_cast<string&
>(_label); }
88 double * updateAndGetEvalVariable();
94 inline void setCurrentImageBuffer(
const VVGL::GLBufferRef & n) {
if (shouldHaveImageBuffer()) _currentVal =
ISFImageVal(n);
else cout <<
"\terr: tried to set current image buffer in non-image attr (" << _name <<
")\n"; }
106 inline vector<int32_t> &
valArray() {
return _valArray; }
109 inline void setIsFilterInputImage(
const bool & n) { _isFilterInputImage=n; }
112 inline void setIsTransStartImage(
const bool & n) { _isTransStartImage=n; }
115 inline void setIsTransEndImage(
const bool & n) { _isTransEndImage=n; }
118 inline void setIsTransProgressFloat(
const bool & n) { _isTransProgressFloat=n; }
120 inline void clearUniformLocations() {
for (
int i=0; i<4; ++i) _uniformLocation[i]=0; }
121 inline void setUniformLocation(
const int & inIndex,
const int32_t & inNewVal) {
if (inIndex<0 || inIndex>3)
return; _uniformLocation[inIndex] = inNewVal; }
122 inline int32_t getUniformLocation(
const int & inIndex) {
if (inIndex<0 || inIndex>3)
return 0;
return _uniformLocation[inIndex]; }
125 VVISF_EXPORT
friend ostream & operator<<(ostream & os,
const ISFAttr & n);
126 void lengthyDescription();
128 string getAttrDescription();
void setCurrentVal(const ISFVal &n)
Sets the attribute's current value.
Definition: ISFAttr.hpp:86
void setCurrentImageBuffer(const VVGL::GLBufferRef &n)
Sets the receiver's current value with the passed image buffer.
Definition: ISFAttr.hpp:94
bool isTransEndImage()
Returns a true if this attribute is used to send the end image to the transition. ...
Definition: ISFAttr.hpp:114
bool shouldHaveImageBuffer() const
Returns a true if this attribute's value is expressed with an image buffer.
Definition: ISFAttr.hpp:90
ISFVal & minVal()
Gets the attribute's min val.
Definition: ISFAttr.hpp:96
bool isTransProgressFloat()
Returns a true if this attribute is used to send the progress value to the transition.
Definition: ISFAttr.hpp:117
ISFVal & maxVal()
Gets the attribute's max val.
Definition: ISFAttr.hpp:98
bool isTransStartImage()
Returns a true if this attribute is used to send the start image to the transition.
Definition: ISFAttr.hpp:111
vector< int32_t > & valArray()
Gets the attribute's values as a vector of int values. Only used if the attribute is a 'long'...
Definition: ISFAttr.hpp:106
Definition: ISFAttr.hpp:12
VVGL::GLBufferRef getCurrentImageBuffer()
Returns the receiver's image buffer.
Definition: ISFAttr.hpp:92
vector< string > & labelArray()
Gets the attribute's labels as a vector of string values. Only used if the attribute is a 'long'...
Definition: ISFAttr.hpp:104
VVISF_EXPORT ISFVal ISFImageVal(const VVGL::GLBufferRef &n)
Creates and returns an image-type ISFVal with the passed buffer.
ISFVal describes an ISF value- it has a type (ISFValType) and a type-dependent value. Intended to be immutable.
Definition: ISFVal.hpp:57
ISFValType
Enumerates the different kinds of ISF values.
Definition: ISFVal.hpp:25
Describes a single ISF attribute.
Definition: ISFAttr.hpp:26
bool isFilterInputImage()
Returns a true if this attribute is used to send the input image to the filter.
Definition: ISFAttr.hpp:108
string & description() const
Returns the attribute's description, or null.
Definition: ISFAttr.hpp:78
No data/unknown value type.
Definition: ISFVal.hpp:26
ISFValType & type() const
Returns the attribute's value type.
Definition: ISFAttr.hpp:82
ISFVal & identityVal()
Gets the attribute's identity val (the value at which this attribute's effects are indistinguishable ...
Definition: ISFAttr.hpp:102
string & label() const
Returns the attribute's label, or null.
Definition: ISFAttr.hpp:80
VVGL::GLBufferRef imageBuffer() const
Returns null if the receiver's value type cannot be represented as an image, otherwise it returns the...
bool ISFValTypeUsesImage(const ISFValType &n)
Returns a true if the passed value type uses an image for its value.
Definition: ISFVal.hpp:49
string & name() const
Returns the attribute's name, or null.
Definition: ISFAttr.hpp:76
ISFVal & currentVal()
Returns the attribute's current value.
Definition: ISFAttr.hpp:84
ISFVal & defaultVal()
Gets the attribute's default val (the value which will be assigned to the attribute when it is first ...
Definition: ISFAttr.hpp:100
VVISF_EXPORT ISFVal ISFNullVal()
Creates and returns a null-type ISFVal.