5 #include "VVISF_StringUtils.hpp" 68 ISFValUnion _val = {
false };
69 VVGL::GLBufferRef _imageVal =
nullptr;
91 ISFVal(
const ISFValType & inType,
const double * inXY,
const size_t inSizeToCopy);
93 ISFVal(
const ISFValType & inType,
const double & inR,
const double & inG,
const double & inB,
const double & inA);
110 double getDoubleVal()
const;
112 bool getBoolVal()
const;
114 int32_t getLongVal()
const;
128 VVGL::GLBufferRef imageBuffer()
const;
130 void setImageBuffer(
const VVGL::GLBufferRef & n);
132 string getTypeString()
const;
134 string getValString()
const;
170 friend ostream & operator<<(ostream & os,
const ISFVal & n) { os << VVGL::FmtString(
"<ISFVal %s/%s>", n.
getTypeString().c_str(), n.
getValString().c_str());
return os; }
189 VVISF_EXPORT ISFVal
ISFEventVal(
const bool & n=
false);
194 VVISF_EXPORT ISFVal
ISFBoolVal(
const bool & n);
199 VVISF_EXPORT ISFVal
ISFLongVal(
const int32_t & n);
209 VVISF_EXPORT ISFVal
ISFPoint2DVal(
const double & inX,
const double & inY);
214 VVISF_EXPORT ISFVal
ISFColorVal(
const double & inR,
const double & inG,
const double & inB,
const double & inA);
219 VVISF_EXPORT ISFVal
ISFImageVal(
const VVGL::GLBufferRef & n);
VVISF_EXPORT ISFVal ISFPoint2DVal(const double &inX, const double &inY)
Creates and returns a 2d point-type ISFVal with the passed point values.
VVISF_EXPORT ISFVal ISFFloatVal(const double &n)
Creates and returns a float-type ISFVal with the passed value.
A boolean choice, sends 1 or 0 to the shader.
Definition: ISFVal.hpp:28
bool isAudioVal() const
Returns true if the receiver is an audio value (image).
Definition: ISFVal.hpp:164
VVISF_EXPORT ISFVal ISFBoolVal(const bool &n)
Creates and returns a boolean-type ISFVal with the passed value.
VVISF_EXPORT ISFVal ISFLongVal(const int32_t &n)
Creates and returns a long-type ISFVal with the passed value.
bool isEventVal() const
Returns true if the receiver is an event value.
Definition: ISFVal.hpp:148
Sends a 2 element vector.
Definition: ISFVal.hpp:31
bool isPoint2DVal() const
Returns true if the receiver is a point2D value.
Definition: ISFVal.hpp:156
double * getColorValPtr()
Returns a null if the receiver isn't a color-type object, otherwise it returns a pointer to the four-...
Definition: ISFVal.hpp:122
Definition: ISFAttr.hpp:12
Sends a 4 element vector representing an RGBA color.
Definition: ISFVal.hpp:32
bool isLongVal() const
Returns true if the receiver is a long value.
Definition: ISFVal.hpp:152
string StringFromISFValType(const ISFValType &n)
Returns a string describing the passed value type.
Sends a long- the texture number (like GL_TEXTURE0) to pass to the shader.
Definition: ISFVal.hpp:36
VVISF_EXPORT ISFVal ISFImageVal(const VVGL::GLBufferRef &n)
Creates and returns an image-type ISFVal with the passed buffer.
bool isNullVal() const
Returns true if the receiver is a null value.
Definition: ISFVal.hpp:146
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
bool isCubeVal() const
Returns true if the receiver is a cube texture value.
Definition: ISFVal.hpp:160
VVISF_EXPORT ISFVal ISFColorVal(const double &inR, const double &inG, const double &inB, const double &inA)
Creates and returns a color-type ISFVal with the passed R/G/B/A color values.
string getTypeString() const
Returns a string describing the type of the receiver.
Sends a long.
Definition: ISFVal.hpp:29
double getColorValByChannel(const int &inIndex)
Does nothing if the receiver's value type isn't color or the passed index is out of bounds...
Definition: ISFVal.hpp:124
No data/unknown value type.
Definition: ISFVal.hpp:26
bool isBoolVal() const
Returns true if the receiver is a bool value.
Definition: ISFVal.hpp:150
Sends a long- the texture number (like GL_TEXTURE0) of a cubemap texture to pass to the shader...
Definition: ISFVal.hpp:33
double * getPointValPtr()
Returns a null if the receiver isn't a Point2D-type object, otherwise it returns a pointer to the two...
Definition: ISFVal.hpp:116
bool ISFValTypeUsesImage(const ISFValType &n)
Returns a true if the passed value type uses an image for its value.
Definition: ISFVal.hpp:49
Sends a long- the texture number (like GL_TEXTURE0) to pass to the shader.
Definition: ISFVal.hpp:34
bool isFloatVal() const
Returns true if the receiver is a float value.
Definition: ISFVal.hpp:154
ISFValType type() const
Returns the value type.
Definition: ISFVal.hpp:108
Sends a float.
Definition: ISFVal.hpp:30
bool isAudioFFTVal() const
Returns true if the receiver is an audio fft value (image).
Definition: ISFVal.hpp:166
Sends a long- the texture number (like GL_TEXTURE0) to pass to the shader.
Definition: ISFVal.hpp:35
bool isColorVal() const
Returns true if the receiver is a color value.
Definition: ISFVal.hpp:158
No data, just an event. sends a 1 the next render after the event is received, a 0 any other time it'...
Definition: ISFVal.hpp:27
VVISF_EXPORT ISFVal ISFEventVal(const bool &n=false)
Creates and returns an event-type ISFVal. Events don't technically have a value- events should send a...
void setColorValByChannel(const int &inIndex, const double &inVal)
Does nothing if the receiver's value type isn't color or the passed index is out of bounds...
Definition: ISFVal.hpp:126
string getValString() const
Returns a string describing the value of the receiver.
double getPointValByIndex(const int &inIndex)
Returns 0. if the receiver value type isn't Point2D or the passed index is out of bounds...
Definition: ISFVal.hpp:118
bool isImageVal() const
Returns true if the receiver is an image value.
Definition: ISFVal.hpp:162
VVISF_EXPORT ISFVal ISFNullVal()
Creates and returns a null-type ISFVal.
void setPointValByIndex(const int &inIndex, const double &inVal)
Does nothing if the receiver's value type isn't Point2D or the passed index is out of bounds...
Definition: ISFVal.hpp:120