UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

Unigine::Variable Class

Universal variable for functors.

To use this class, include the UnigineInterpreter.h file.

Unigine::Variable Class

Members


Variable ()

Default constructor.

Variable (const Variable & v)

Copy constructor.

Arguments

  • const Variable & v - The value of the variable.

explicit Variable (int v)

Explicit constructor for a variable of int type.

Arguments

  • int v - The value of the variable.

explicit Variable (long long v)

Explicit constructor for a variable of long long type.

Arguments

  • long long v - The value of the variable.

explicit Variable (float v)

Explicit constructor for a variable of float type.

Arguments

  • float v - The value of the variable.

explicit Variable (double v)

Explicit constructor for a variable of double type.

Arguments

  • double v - The value of the variable.

explicit Variable (const vec2 & v)

Explicit constructor for a variable of vec2 type.

Arguments

  • const vec2 & v - The value of the variable.

explicit Variable (const vec3 & v)

Explicit constructor for a variable of vec3 type.

Arguments

  • const vec3 & v - The value of the variable.

explicit Variable (const vec4 & v)

Explicit constructor for a variable of vec4 type.

Arguments

  • const vec4 & v - The value of the variable.

explicit Variable (const dvec2 & v)

Explicit constructor for a variable of dvec2 type.

Arguments

  • const dvec2 & v - The value of the variable.

explicit Variable (const dvec3 & v)

Explicit constructor for a variable of dvec3 type.

Arguments

  • const dvec3 & v - The value of the variable.

explicit Variable (const dvec4 & v)

Explicit constructor for a variable of dvec4 type.

Arguments

  • const dvec4 & v - The value of the variable.

explicit Variable (const ivec2 & v)

Explicit constructor for a variable of ivec2 type.

Arguments

  • const ivec2 & v - The value of the variable.

explicit Variable (const ivec3 & v)

Explicit constructor for a variable of ivec3 type.

Arguments

  • const ivec3 & v - The value of the variable.

explicit Variable (const ivec4 & v)

Explicit constructor for a variable of ivec4 type.

Arguments

  • const ivec4 & v - The value of the variable.

explicit Variable (const mat4 & m)

Explicit constructor for a variable of mat4 type.

Arguments

  • const mat4 & m - The value of the variable.

explicit Variable (const dmat4 & m)

Explicit constructor for a variable of dmat4 type.

Arguments

  • const dmat4 & m - The value of the variable.

explicit Variable (const quat & q)

Explicit constructor for a variable of quad type.

Arguments

  • const quat & q - The value of the variable.

explicit Variable (const char * s)

Explicit constructor for a variable of string type.

Arguments

  • const char * s - The value of the variable.

Variable (void * interpreter, const char * type_name, void * object, int append, int manage)

External class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const char * type_name - Name of the external class object type.
  • void * object - Pointer to the object.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const TypeInfo & type_info, void * object, int append, int manage)

External class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const TypeInfo & type_info - Type information.
  • void * object - Pointer to the object.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const XmlPtr & xml, int append, int manage)

Xml smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const XmlPtr & xml - Xml smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const GuiPtr & gui, int append, int manage)

Gui smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const GuiPtr & gui - Gui smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const NodePtr & node, int append, int manage)

Node smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const NodePtr & node - Node smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const LightPtr & light, int append, int manage)

Light smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const LightPtr & light - Light smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const ObjectPtr & object, int append, int manage)

Object smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ObjectPtr & object - Object smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const PlayerPtr & player, int append, int manage)

Player smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const PlayerPtr & player - Player smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const ImagePtr & image, int append, int manage)

Image smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ImagePtr & image - Image smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const StreamPtr & stream, int append, int manage)

Stream smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const StreamPtr & stream - Stream smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const ControlsPtr & controls, int append, int manage)

Controls smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ControlsPtr & controls - Controls smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const MaterialPtr & material, int append, int manage)

Material smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const MaterialPtr & material - Material smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const PropertyPtr & property, int append, int manage)

Property smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const PropertyPtr & property - Property smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

Variable (void * interpreter, const WidgetPtr & widget, int append, int manage)

Widget smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const WidgetPtr & widget - Widget smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

~Variable ()

Destructor.

int getType () const

Return the variable type.

Return value

Variable type (see Unigine::Variable:: Enumeration).

String getTypeName () const

Return the variable type name.

Return value

Variable type name string.

String getTypeInfo () const

Return the variable type info.

Return value

Variable type info string.

void set (const Variable & v)

Set a variable.

Arguments

  • const Variable & v - The value of the variable.

const Variable & get () const

Return the current variable.

Return value

The value of the variable.

void setInt (int v)

Set an integer value for the variable.

Arguments

  • int v - The value of the variable.

int getInt () const

Return the current variable as an integer value, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isInt () const

Return a value indicating if the variable is an integer value.

Return value

Returns 1 is the variable is an integer value; otherwise, 0 is returned.

UNIGINE_INLINE int isNull () const

Return a value indicating if the variable is a null value.

Return value

Returns 1 is the variable is a null value; otherwise, 0 is returned.

void setLong (long long v)

Set a long long value for the variable.

Arguments

  • long long v - The value of the variable.

long long getLong () const

Return the current variable as a long long value, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isLong () const

Return a value indicating if the variable is a long long value.

Return value

Returns 1 is the variable is a long long value; otherwise, 0 is returned.

void setFloat (float v)

Set a float value for the variable.

Arguments

  • float v - The value of the variable.

float getFloat () const

Return the current variable as a float value, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isFloat () const

Return a value indicating if the variable is a float value.

Return value

Returns 1 is the variable is a float value; otherwise, 0 is returned.

void setDouble (double v)

Set a double value for the variable.

Arguments

  • double v - The value of the variable.

double getDouble () const

Return the current variable as a double value, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isDouble () const

Return a value indicating if the variable is a double value.

Return value

Returns 1 is the variable is a double value; otherwise, 0 is returned.

void setVec3 (const vec3 & v)

Set a three component vector for the variable.

Arguments

  • const vec3 & v - The value of the variable.

const vec3 & getVec3 () const

Return the current variable as a three component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isVec3 () const

Return a value indicating if the variable is a three component vector.

Return value

Returns 1 is the variable is a three component vector; otherwise, 0 is returned.

void setVec4 (const vec4 & v)

Set a four component vector for the variable.

Arguments

  • const vec4 & v - The value of the variable.

const vec4 & getVec4 () const

Return the current variable as a four component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isVec4 () const

Return a value indicating if the variable is a four component vector.

Return value

Returns 1 is the variable is a four component vector; otherwise, 0 is returned.

void setDVec3 (const dvec3 & v)

Set a three component vector for the variable.

Arguments

  • const dvec3 & v - The value of the variable.

const dvec3 & getDVec3 () const

Return the current variable as a three component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isDVec3 () const

Return a value indicating if the variable is a three component vector.

Return value

Returns 1 is the variable is a three component vector; otherwise, 0 is returned.

void setDVec4 (const dvec4 & v)

Set a four component vector for the variable.

Arguments

  • const dvec4 & v - The value of the variable.

const dvec4 & getDVec4 () const

Return the current variable as a four component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isDVec4 () const

Return a value indicating if the variable is a four component vector.

Return value

Returns 1 is the variable is a four component vector; otherwise, 0 is returned.

void setIVec3 (const ivec3 & v)

Set a three component vector for the variable.

Arguments

  • const ivec3 & v - The value of the variable.

const ivec3 & getIVec3 () const

Return the current variable as a three component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isIVec3 () const

Return a value indicating if the variable is a three component vector.

Return value

Returns 1 is the variable is a three component vector; otherwise, 0 is returned.

void setIVec4 (const ivec4 & v)

Set a four component vector for the variable.

Arguments

  • const ivec4 & v - The value of the variable.

const ivec4 & getIVec4 () const

Return the current variable as a four component vector, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isIVec4 () const

Return a value indicating if the variable is a four component vector.

Return value

Returns 1 is the variable is a four component vector; otherwise, 0 is returned.

void setMat4 (const mat4 & m)

Set a 4x4 matrix for the variable.

Arguments

  • const mat4 & m - The value of the variable.

const mat4 & getMat4 () const

Return the current variable as a 4x4 matrix, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isMat4 () const

Return a value indicating if the variable is a 4x4 matrix.

Return value

Returns 1 is the variable is a 4x4 matrix; otherwise, 0 is returned.

void setDMat4 (const dmat4 & m)

Set a 3x4 matrix for the variable.

Arguments

  • const dmat4 & m - The value of the variable.

const dmat4 & getDMat4 () const

Return the current variable as a 4x4 matrix, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isDMat4 () const

Return a value indicating if the variable is a 4x4 matrix.

Return value

Returns 1 is the variable is a 4x4 matrix; otherwise, 0 is returned.

void setQuat (const quat & q)

Set a quaternion for the variable.

Arguments

  • const quat & q - The value of the variable.

const quat & getQuat () const

Return the current variable as a quaternion, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isQuat () const

Return a value indicating if the variable is a quaternion.

Return value

Returns 1 is the variable is a quaternion; otherwise, 0 is returned.

void setString (const char * s)

Set a string for the variable.

Arguments

  • const char * s - The value of the variable.

const char * getString () const

Return the current variable as a string, if possible.

Return value

The value of the variable.

UNIGINE_INLINE int isString () const

Return a value indicating if the variable is a string.

Return value

Returns 1 is the variable is a string; otherwise, 0 is returned.

void setUserClass (int type, int number, int instance)

Set a user class for the variable.

Arguments

  • int type - User class type ID.
  • int number - User class number.
  • int instance - User class instance.

int getUserClassType () const

Return user class type.

Return value

User class type ID.

int getUserClassNumber () const

Return user class number.

Return value

User class number.

int getUserClassInstance () const

Return user class instance.

Return value

User class instance.

UNIGINE_INLINE int isUserClass () const

Return a value indicating if the variable is an user class.

Return value

Returns 1 is the variable is an user class; otherwise, 0 is returned.

void setExternClassObject (void * interpreter, const char * type_name, void * object, int append, int manage)

Set an external class object for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const char * type_name - Name of the external class object type.
  • void * object - Pointer to the object.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

void setExternClassObject (void * interpreter, const TypeInfo & type_info, void * object, int append, int manage)

Set an external class object for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const TypeInfo & type_info - Type information.
  • void * object - Pointer to the object.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

void * getExternClassObject (void * interpreter, const TypeInfo & type_info) const

Return the external class object pointer.

Arguments

  • void * interpreter - Interpreter pointer.
  • const TypeInfo & type_info - Type information.

TypeInfo getExternClassType (void * interpreter) const

Return type information about the external class object stored in the variable.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Type information.

void appendExternClass (void * interpreter) const

The script will take ownership of the object and be responsible for deleting it.

Arguments

  • void * interpreter - Interpreter pointer.

void manageExternClass (void * interpreter) const

The script will manage the object lifetime through reference counting.

Arguments

  • void * interpreter - Interpreter pointer.

void removeExternClass (void * interpreter) const

The script will drop ownership of the object and be not responsible for deleting it.

Arguments

  • void * interpreter - Interpreter pointer.

void releaseExternClass (void * interpreter) const

The script will drop ownership of the object and clear all references to it.

Arguments

  • void * interpreter - Interpreter pointer.

UNIGINE_INLINE int isExternClass () const

Return a value indicating if the variable is an external class.

Return value

Returns 1 is the variable is an external class; otherwise, 0 is returned.

void setXml (void * interpreter, const XmlPtr & xml, int append, int manage)

Set a xml smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const XmlPtr & xml - Xml smart pointer.
  • int append - The script will take ownership of the xml data and be responsible for deleting it.
  • int manage - The script will manage the xml data lifetime through reference counting.

XmlPtr getXml (void * interpreter) const

Return the current variable as a xml smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isXml (void * interpreter) const

Return a value indicating if the variable is a xml.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a xml; otherwise, 0 is returned.

void setGui (void * interpreter, const GuiPtr & gui, int append, int manage)

Set a gui smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const GuiPtr & gui - Gui smart pointer.
  • int append - The script will take ownership of the gui data and be responsible for deleting it.
  • int manage - The script will manage the gui data lifetime through reference counting.

GuiPtr getGui (void * interpreter) const

Return the current variable as a gui smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isGui (void * interpreter) const

Return a value indicating if the variable is a gui.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a gui; otherwise, 0 is returned.

void setNode (void * interpreter, const NodePtr & node, int append, int manage)

Set a node smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const NodePtr & node - Node smart pointer.
  • int append - The script will take ownership of the node and be responsible for deleting it.
  • int manage - The script will manage the node lifetime through reference counting.

NodePtr getNode (void * interpreter) const

Return the current variable as a node smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isNode (void * interpreter) const

Return a value indicating if the variable is a node.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a node; otherwise, 0 is returned.

void setLight (void * interpreter, const LightPtr & light, int append, int manage)

Set a light smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const LightPtr & light - Light smart pointer.
  • int append - The script will take ownership of the light and be responsible for deleting it.
  • int manage - The script will manage the light lifetime through reference counting.

LightPtr getLight (void * interpreter) const

Return the current variable as a light smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isLight (void * interpreter) const

Return a value indicating if the variable is a light.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a light; otherwise, 0 is returned.

void setObject (void * interpreter, const ObjectPtr & object, int append, int manage)

Set a object smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ObjectPtr & object - Object smart pointer.
  • int append - The script will take ownership of the object and be responsible for deleting it.
  • int manage - The script will manage the object lifetime through reference counting.

ObjectPtr getObject (void * interpreter) const

Return the current variable as a object smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isObject (void * interpreter) const

Return a value indicating if the variable is a object.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a object; otherwise, 0 is returned.

void setPlayer (void * interpreter, const PlayerPtr & player, int append, int manage)

Set a player smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const PlayerPtr & player - Player smart pointer.
  • int append - The script will take ownership of the player and be responsible for deleting it.
  • int manage - The script will manage the player lifetime through reference counting.

PlayerPtr getPlayer (void * interpreter) const

Return the current variable as a player smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isPlayer (void * interpreter) const

Return a value indicating if the variable is a player.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a player; otherwise, 0 is returned.

void setImage (void * interpreter, const ImagePtr & image, int append, int manage)

Set an image smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ImagePtr & image - Image smart pointer.
  • int append - The script will take ownership of the image and be responsible for deleting it.
  • int manage - The script will manage the image lifetime through reference counting.

ImagePtr getImage (void * interpreter) const

Return the current variable as a image smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isImage (void * interpreter) const

Return a value indicating if the variable is an image.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is an image; otherwise, 0 is returned.

void setStream (void * interpreter, const StreamPtr & stream, int append, int manage)

Set a stream smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const StreamPtr & stream - Stream smart pointer.
  • int append - The script will take ownership of the stream data and be responsible for deleting it.
  • int manage - The script will manage the stream data lifetime through reference counting.

StreamPtr getStream (void * interpreter) const

Return the current variable as a stream smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isStream (void * interpreter) const

Return a value indicating if the variable is a stream.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a stream; otherwise, 0 is returned.

void setControls (void * interpreter, const ControlsPtr & controls, int append, int manage)

Set a controls smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const ControlsPtr & controls - Controls smart pointer.
  • int append - The script will take ownership of the controls and be responsible for deleting it.
  • int manage - The script will manage the controls lifetime through reference counting.

ControlsPtr getControls (void * interpreter) const

Return the current variable as a controls smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isControls (void * interpreter) const

Return a value indicating if the variable is a controls.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a controls; otherwise, 0 is returned.

void setMaterial (void * interpreter, const MaterialPtr & material, int append, int manage)

Set a material smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const MaterialPtr & material - Material smart pointer.
  • int append - The script will take ownership of the material and be responsible for deleting it.
  • int manage - The script will manage the material lifetime through reference counting.

MaterialPtr getMaterial (void * interpreter) const

Return the current variable as a material smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isMaterial (void * interpreter) const

Return a value indicating if the variable is a material.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a material; otherwise, 0 is returned.

void setProperty (void * interpreter, const PropertyPtr & property, int append, int manage)

Set a property smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const PropertyPtr & property - Property smart pointer.
  • int append - The script will take ownership of the property and be responsible for deleting it.
  • int manage - The script will manage the property lifetime through reference counting.

PropertyPtr getProperty (void * interpreter) const

Return the current variable as a property smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isProperty (void * interpreter) const

Return a value indicating if the variable is a property.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a property; otherwise, 0 is returned.

void setWidget (void * interpreter, const WidgetPtr & widget, int append, int manage)

Set a widget smart pointer for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • const WidgetPtr & widget - Widget smart pointer.
  • int append - The script will take ownership of the widget and be responsible for deleting it.
  • int manage - The script will manage the widget lifetime through reference counting.

WidgetPtr getWidget (void * interpreter) const

Return the current variable as a widget smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isWidget (void * interpreter) const

Return a value indicating if the variable is a widget.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Returns 1 is the variable is a widget; otherwise, 0 is returned.

Variable & operator= (const Variable & v)

Assignment operator for the variable.

Arguments

  • const Variable & v - The value of the variable.

Variable operator* (const Variable & v) const

Variable multiplication.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator/ (const Variable & v) const

Variable division.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator% (const Variable & v) const

Variable modulo operation.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator+ (const Variable & v) const

Variable addition.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator- (const Variable & v) const

Variable subtraction.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator<< (const Variable & v) const

Variable binary left shift.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator>> (const Variable & v) const

Variable binary right shift.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator& (const Variable & v) const

Variable binary and.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator| (const Variable & v) const

Variable binary or.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

Variable operator^ (const Variable & v) const

Variable binary xor.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The resulting variable.

int operator== (const Variable & v) const

Variable equal comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator!= (const Variable & v) const

Variable not equal comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator<= (const Variable & v) const

Variable less than or equal to comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator>= (const Variable & v) const

Variable greater than or equal to comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator< (const Variable & v) const

Variable less than comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator> (const Variable & v) const

Variable greater than comparison.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator&& (const Variable & v) const

Variable logical and.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

int operator|| (const Variable & v) const

Variable logical or.

Arguments

  • const Variable & v - The value of the second variable.

Return value

The result.

Unigine::Variable::anonymous_21 Enumeration

INT = 0
LONG
FLOAT
DOUBLE
VEC3
VEC4
DVEC3
DVEC4
IVEC3
IVEC4
MAT4
DMAT4
QUAT
STRING
USER_CLASS
EXTERN_CLASS
Last update: 2017-07-03