This page has been translated automatically.
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Property Class

Interface for property manipulation.

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

Unigine::Property Class

Members


virtual ~Property ()

Virtual destructor.

virtual void grab () =0

Grab Property. The Property should not be handled by the engine after this function is called.

virtual void release () =0

Release Property. The Property should be handled by the engine after this function is called.

virtual int isOwner () const =0

Return the "owner" flag.

Return value

Returns the "owner" flag.

virtual int isHidden () const =0

Returns a value indicating if the property is hidden.

Return value

Returns 1 if the property is hidden; otherwise, 0.

virtual int isEditable () const =0

Returns a value indicating if the property is editable.

Return value

Returns 1 if the property is editable; otherwise, 0.

virtual const char * getName () const =0

Returns a property name.

Return value

Property name.

virtual Ptr< Property > getParent () const =0

Returns the parent property smart pointer.

Return value

Parent property smart pointer.

virtual Ptr< Property > getCompare () const =0

Returns the compare property smart pointer.

Return value

Compare property smart pointer.

virtual int getNumChilds () const =0

Returns the number of children properties.

Return value

The number of children properties.

virtual Ptr< Property > getChild (int num) const =0

Returns the child property.

Arguments

  • int num - The child number.

Return value

The child property smart pointer.

virtual int isParent (const char * name) const =0

Returns a value indicating if the property is a parent one.

Arguments

  • const char * name - Property name.

Return value

Returns 1 if the property is a parent property.

virtual Ptr< Property > clone (const char * name) const =0

Clones the property.

Arguments

  • const char * name - New property name.

Return value

Return cloned property smart pointer.

virtual Ptr< Property > inherit (const char * name) const =0

Inherits the property.

Arguments

  • const char * name - New property name.

Return value

Return inherited property smart pointer.

virtual void setIntersection (int enable) const =0

Sets intersection option.

Arguments

  • int enable - intersection option.

virtual int getIntersection () const =0

Gets intersection option.

Return value

Returns intersection option.

virtual void setCollision (int enable) const =0

Sets collision option.

Arguments

  • int enable - collision option.

virtual int getCollision () const =0

Gets collision option.

Return value

Returns collision option.

virtual int getNumStates () const =0

Returns the number of states.

Return value

Returns number of states.

virtual const char * getStateName (int num) const =0

Returns the state name.

Arguments

  • int num - The state number.

Return value

State name.

virtual int getStateType (int num) const =0

Returns the state type.

Arguments

  • int num - The state number.

Return value

State type.

virtual int isStateHidden (int num) const =0

Returns a value indicating if the state is hidden.

Arguments

  • int num - The state number.

Return value

Returns 1 is the state is hidden; otherwise, 0.

virtual int findState (const char * name) const =0

Finds a state by its name.

Arguments

  • const char * name - State name.

Return value

State number.

virtual void setState (int num, int value) const =0

Sets state value.

Arguments

  • int num - State number.
  • int value - State value.

virtual int getState (int num) const =0

Gets state value.

Arguments

  • int num - State number.

Return value

State value.

virtual int getStateSwitchNumItems (int num) const =0

Returns the number of switch item names.

Arguments

  • int num - State number.

Return value

Number of switch item names.

virtual const char * getStateSwitchItem (int num, int item) const =0

Returns the switch item name.

Arguments

  • int num - State number.
  • int item - Item number.

Return value

Switch item name.

virtual int getNumParameters () const =0

Returns the number of parameters.

Return value

Returns number of parameters.

virtual const char * getParameterName (int num) const =0

Returns the parameter name.

Arguments

  • int num - The parameter number.

Return value

State name.

virtual int getParameterType (int num) const =0

Returns the parameter type.

Arguments

  • int num - The parameter number.

Return value

State type.

virtual int isParameterHidden (int num) const =0

Returns a value indicating if the parameter is hidden.

Arguments

  • int num - The parameter number.

Return value

Returns 1 is the parameter is hidden; otherwise, 0.

virtual int findParameter (const char * name) const =0

Finds a parameter by its name.

Arguments

  • const char * name - State name.

Return value

State number.

virtual void setParameterInt (int num, int value) const =0

Sets integer parameter value.

Arguments

  • int num - Parameter number.
  • int value - Parameter value.

virtual int getParameterInt (int num) const =0

Gets integer parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterFloat (int num, float value) const =0

Sets float parameter value.

Arguments

  • int num - Parameter number.
  • float value - Parameter value.

virtual float getParameterFloat (int num) const =0

Gets float parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterDouble (int num, double value) const =0

Sets double parameter value.

Arguments

  • int num - Parameter number.
  • double value - Parameter value.

virtual double getParameterDouble (int num) const =0

Gets double parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterToggle (int num, int value) const =0

Sets toggle parameter value.

Arguments

  • int num - Parameter number.
  • int value - Parameter value.

virtual int getParameterToggle (int num) const =0

Gets toggle parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterSwitch (int num, int value) const =0

Sets switch parameter value.

Arguments

  • int num - Parameter number.
  • int value - Parameter value.

virtual int getParameterSwitch (int num) const =0

Gets switch parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterString (int num, const char * value) const =0

Sets string parameter value.

Arguments

  • int num - Parameter number.
  • const char * value - Parameter value.

virtual String getParameterString (int num) const =0

Gets string parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterColor (int num, const vec4 & value) const =0

Sets color parameter value.

Arguments

  • int num - Parameter number.
  • const vec4 & value - Parameter value.

virtual vec4 getParameterColor (int num) const =0

Gets color parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterVec3 (int num, const vec3 & value) const =0

Sets vec3 parameter value.

Arguments

  • int num - Parameter number.
  • const vec3 & value - Parameter value.

virtual vec3 getParameterVec3 (int num) const =0

Gets vec3 parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual void setParameterVec4 (int num, const vec4 & value) const =0

Sets vec4 parameter value.

Arguments

  • int num - Parameter number.
  • const vec4 & value - Parameter value.

virtual vec4 getParameterVec4 (int num) const =0

Gets vec4 parameter value.

Arguments

  • int num - Parameter number.

Return value

Parameter value.

virtual int loadWorld (const XmlPtr & xml) const =0

Load a render state from the Xml.

Arguments

  • const XmlPtr & xml - Xml smart pointer.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual int saveWorld (const XmlPtr & xml) const =0

Save a render state into the Xml.

Arguments

  • const XmlPtr & xml - Xml smart pointer.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual int saveState (const StreamPtr & stream) const =0

Save a render state into the stream.

Arguments

  • const StreamPtr & stream - Stream smart pointer.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual int restoreState (const StreamPtr & stream) const =0

Restore a render state from the stream.

Arguments

  • const StreamPtr & stream - Stream smart pointer.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

Unigine::Property::anonymous_76 Enumeration

STATE_TOGGLE = 0
STATE_SWITCH

Unigine::Property::anonymous_77 Enumeration

PARAMETER_INT = 0
PARAMETER_FLOAT
PARAMETER_DOUBLE
PARAMETER_TOGGLE
PARAMETER_SWITCH
PARAMETER_STRING
PARAMETER_COLOR
PARAMETER_VEC3
PARAMETER_VEC4
Last update: 2017-07-03
Build: ()