This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::Variable Class

Header:#include <UnigineInterpreter.h>

Universal variable for functors.

Variable Class

Members


Variable(void * interpreter, const EllipsoidPtr & ellipsoid, int append, int manage)

Arguments

  • void * interpreter
  • const EllipsoidPtr & ellipsoid
  • int append
  • int manage

Variable(void * interpreter, const CameraPtr & camera, int append, int manage)

Arguments

  • void * interpreter
  • const CameraPtr & camera
  • int append
  • int manage

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 PathPtr & path, int append, int manage)

Path smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const PathPtr & path - Path 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 MeshPtr & mesh, int append, int manage)

Mesh smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const MeshPtr & mesh - Mesh 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 DecalPtr & decal, int append, int manage)

Decal smart pointer class object constructor.

Arguments

  • void * interpreter - Interpreter pointer.
  • const DecalPtr & decal - Decal 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.

void set(const Variable & v)

Sets a variable.

Arguments

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

const Variable & get() const

Returns the current variable.

Return value

The value of the variable.

void setCamera(void * interpreter, const CameraPtr & camera, int append, int manage)

Arguments

  • void * interpreter
  • const CameraPtr & camera
  • int append
  • int manage

CameraPtr getCamera(void * interpreter)

Arguments

  • void * interpreter

int isCamera(void * interpreter)

Arguments

  • void * interpreter

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

Sets 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

Returns 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

Returns 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 setDecal(void * interpreter, const DecalPtr & decal, int append, int manage)

Sets a decal smart pointer for the variable.

Arguments

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

DecalPtr getDecal(void * interpreter) const

Returns the current variable as a decal smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isDecal(void * interpreter) const

Returns a value indicating if the variable is a decal.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

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

void setDMat4(const dmat4 & m)

Sets a 3x4 matrix for the variable.

Arguments

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

const dmat4 & getDMat4() const

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

Return value

The value of the variable.

int isDMat4() const

Returns 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 setDouble(double v)

Sets a double value for the variable.

Arguments

  • double v - The value of the variable.

double getDouble() const

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

Return value

The value of the variable.

int isDouble() const

Returns 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 setDVec3(const dvec3 & v)

Sets a three component vector for the variable.

Arguments

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

const dvec3 & getDVec3() const

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

Return value

The value of the variable.

int isDVec3() const

Returns 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)

Sets a four component vector for the variable.

Arguments

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

const dvec4 & getDVec4() const

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

Return value

The value of the variable.

int isDVec4() const

Returns 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 setEllipsoid(void * interpreter, const EllipsoidPtr & ellipsoid, int append, int manage)

Arguments

  • void * interpreter
  • const EllipsoidPtr & ellipsoid
  • int append
  • int manage

EllipsoidPtr getEllipsoid(void * interpreter)

Arguments

  • void * interpreter

int isEllipsoid(void * interpreter)

Arguments

  • void * interpreter

int isExternClass() const

Returns a value indicating if the variable belongs to the external class.

Return value

1 is the variable belongs to the external class; otherwise, 0.

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

Sets 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)

Sets 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 setExternClassObject(void * interpreter, Type * object, int append, int manage)

Sets an external class object for the variable.

Arguments

  • void * interpreter - Interpreter pointer.
  • Type * 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

Returns the external class object pointer.

Arguments

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

Type * getExternClassObject(void * interpreter) const

Returns the type of the external class object.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Object type.

int isExternClassObject(void * interpreter) const

Returns a value indicating if the object belongs to the external class.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

1 is the variable belongs to the external class; otherwise, 0.

Type & getExternClassObjectRef(void * interpreter) const

Returns the type of the external class object stored in the variable.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Object type.

TypeInfo getExternClassType(void * interpreter) const

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

Arguments

  • void * interpreter - Interpreter pointer.

Return value

Type information.

void setFloat(float v)

Sets a float value for the variable.

Arguments

  • float v - The value of the variable.

float getFloat() const

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

Return value

The value of the variable.

int isFloat() const

Returns 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 setGui(void * interpreter, const GuiPtr & gui, int append, int manage)

Sets 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

Returns 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

Returns 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 setImage(void * interpreter, const ImagePtr & image, int append, int manage)

Sets 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

Returns 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

Returns 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 setInt(int v)

Sets an integer value for the variable.

Arguments

  • int v - The value of the variable.

int getInt() const

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

Return value

The value of the variable.

int isInt() const

Returns 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.

void setIVec3(const ivec3 & v)

Sets a three component vector for the variable.

Arguments

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

const ivec3 & getIVec3() const

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

Return value

The value of the variable.

int isIVec3() const

Returns 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)

Sets a four component vector for the variable.

Arguments

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

const ivec4 & getIVec4() const

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

Return value

The value of the variable.

int isIVec4() const

Returns 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 setLight(void * interpreter, const LightPtr & light, int append, int manage)

Sets 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

Returns 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

Returns 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 setLong(long long v)

Sets a long long value for the variable.

Arguments

  • long long v - The value of the variable.

long long getLong() const

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

Return value

The value of the variable.

int isLong() const

Returns 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 setMat4(const mat4 & m)

Sets a 4x4 matrix for the variable.

Arguments

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

const mat4 & getMat4() const

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

Return value

The value of the variable.

int isMat4() const

Returns 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 setMaterial(void * interpreter, const MaterialPtr & material, int append, int manage)

Sets 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

Returns 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

Returns 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 setMesh(void * interpreter, const MeshPtr & mesh, int append, int manage)

Sets a mesh smart pointer for the variable.

Arguments

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

MeshPtr getMesh(void * interpreter) const

Returns the current variable as a mesh smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isMesh(void * interpreter) const

Returns a value indicating if the variable is a mesh.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

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

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

Sets 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

Returns 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

Returns 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.

int isNull() const

Returns 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 setObject(void * interpreter, const ObjectPtr & object, int append, int manage)

Sets 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

Returns 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

Returns 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 setPath(void * interpreter, const PathPtr & path, int append, int manage)

Sets a path smart pointer for the variable.

Arguments

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

PathPtr getPath(void * interpreter) const

Returns the current variable as a path smart pointer, if possible.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

The value of the variable.

int isPath(void * interpreter) const

Returns a value indicating if the variable is a path.

Arguments

  • void * interpreter - Interpreter pointer.

Return value

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

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

Sets 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

Returns 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

Returns 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 setProperty(void * interpreter, const PropertyPtr & property, int append, int manage)

Sets 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

Returns 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

Returns 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 setQuat(const quat & q)

Sets a quaternion for the variable.

Arguments

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

const quat & getQuat() const

Returns the current variable as a quaternion, if possible.

Return value

The value of the variable.

int isQuat() const

Returns a value indicating if the variable is a quaternion.

Return value

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

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

Sets 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

Returns 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

Returns 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 setString(const char * s)

Sets a string for the variable.

Arguments

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

const char * getString() const

Returns the current variable as a string, if possible.

Return value

The value of the variable.

int isString() const

Returns a value indicating if the variable is a string.

Return value

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

int getType() const

Returns the variable type.

Return value

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

String getTypeInfo() const

Returns the variable type info.

Return value

Variable type info string.

String getTypeName() const

Returns the variable type name.

Return value

Variable type name string.

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

Sets a user class for the variable.

Arguments

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

int isUserClass() const

Returns 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.

int getUserClassInstance() const

Returns user class instance.

Return value

User class instance.

int getUserClassNumber() const

Returns user class number.

Return value

User class number.

int getUserClassType() const

Returns user class type.

Return value

User class type ID.

void setVec3(const vec3 & v)

Sets a three component vector for the variable.

Arguments

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

const vec3 & getVec3() const

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

Return value

The value of the variable.

int isVec3() const

Returns 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)

Sets a four component vector for the variable.

Arguments

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

const vec4 & getVec4() const

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

Return value

The value of the variable.

int isVec4() const

Returns 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 setWidget(void * interpreter, const WidgetPtr & widget, int append, int manage)

Sets 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

Returns 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

Returns 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.

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

Sets 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

Returns 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

Returns 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 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.

int operator!=(const Variable & v) const

Variable not equal comparison.

Arguments

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

Return value

The result.

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 binary and.

Arguments

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

Return value

The resulting variable.

int operator&&(const Variable & v) const

Variable logical and.

Arguments

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

Return value

The result.

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 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 division.

Arguments

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

Return value

The resulting variable.

int operator<(const Variable & v) const

Variable less than comparison.

Arguments

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

Return value

The result.

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.

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.

Variable & operator=(const Variable & v)

Assignment operator for the variable.

Arguments

  • const Variable & v - The value of the 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 greater 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 or equal to comparison.

Arguments

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

Return value

The result.

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 xor.

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.

int operator||(const Variable & v) const

Variable logical or.

Arguments

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

Return value

The result.

void releaseExternClass(void * interpreter) const

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

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.
Last update: 03.07.2017
Build: ()