This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
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
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::WorldTrigger Class

Header:#include <UnigineWorlds.h>
Inherits:Node

WorldTrigger Class

Members


static WorldTriggerPtr create(const Math::vec3 & size)

Constructor. Creates a new world trigger with given dimensions.

Arguments

  • const Math::vec3 & size - Dimensions of the new world trigger. If negative values are provided, 0 will be used instead of them.

Ptr<WorldTrigger> cast(const Ptr<Node> & node)

Casts a WorldTrigger out of the Node instance.

Arguments

  • const Ptr<Node> & node - Pointer to Node.

Return value

Pointer to WorldTrigger.

void setEnterCallback(const Ptr<EnterCallback> & func)

Arguments

  • const Ptr<EnterCallback> & func

void setEnterCallbackName(const char * name)

Sets a callback function to be fired when nodes are entering the world trigger. Unlike setEnterCallback(), this callback function accepts a node that entered the world trigger and world trigger itself as arguments.

Arguments

  • const char * name - World script function name.

const char * getEnterCallbackName()

Returns the name of callback function to be fired on entering the world trigger. This callback function is set via setEnterCallbackName().

Return value

World script function name.

void setExcludeNodes(const Set< Ptr<Node> > & nodes)

Sets a list of excluded nodes, on which the world trigger will not react.

Arguments

  • const Set< Ptr<Node> > & nodes - Exclude nodes vector.

Set< Ptr<Node> > getExcludeNodes()

Returns the current list of excluded nodes, on which the world trigger does not react.

Arguments

    void setExcludeTypes(const Set< int > & types)

    Sets a list of excluded node types, on which the world trigger will not react.

    Arguments

    • const Set< int > & types - Exclude node types vector.

    Set< int > getExcludeTypes()

    Returns the current list of excluded node types, on which the world trigger does not react.

    Arguments

      void setLeaveCallback(const Ptr<LeaveCallback> & func)

      Arguments

      • const Ptr<LeaveCallback> & func

      void setLeaveCallbackName(const char * name)

      Sets a callback function to be fired when nodes are leaving the world trigger. Unlike setLeaveCallback(), this callback function accepts a node that left the world trigger and world trigger itself as arguments.

      Arguments

      • const char * name - World script function name.

      const char * getLeaveCallbackName()

      Returns the name of the callback function name to be fired on leaving the world trigger. This callback function is set via setLeaveCallbackName().

      Return value

      World script function name.

      Ptr<Node> getNode(int num)

      Returns a node pointer.

      Arguments

      • int num - Node number in range from 0 to the total number of nodes.

      Return value

      Node pointer.

      Ptr<Node> getNode()

      Returns a node pointer.

      Return value

      Node pointer.

      Vector< Ptr<Node> > getNodes()

      Gets nodes contained in the trigger.

      Arguments

        int getNumNodes()

        Returns the number of nodes contained in the world trigger.

        Return value

        Number of nodes contained in the trigger.

        void setSize(const Math::vec3 & size)

        Updates the current dimensions of the world trigger. The minimum size is vec3(0,0,0).

        Arguments

        • const Math::vec3 & size - Dimensions of the world trigger.

        Math::vec3 getSize()

        Returns the current dimensions of the world trigger.

        Return value

        Current dimensions of the world trigger.

        void setTargetNodes(const Set< Ptr<Node> > & nodes)

        Sets a list of target nodes, which will fire callbacks. If this list is empty, all nodes fire callbacks.

        Arguments

        • const Set< Ptr<Node> > & nodes - Target nodes vector.

        Set< Ptr<Node> > getTargetNodes()

        Returns the current list of target nodes, which fire callbacks. If this list is empty, all nodes fire callbacks.

        Arguments

          void setTargetTypes(const Set< int > & types)

          Sets a list of target node types, which will fire callbacks. If this list is empty, all nodes fire callbacks.

          Arguments

          • const Set< int > & types - Target node types vector.

          Set< int > getTargetTypes()

          Returns the current list of target node types, which fire callbacks. If this list is empty, all nodes fire callbacks.

          Arguments

            void setTouch(int touch)

            Sets a touch mode for the trigger. With this mode on, the trigger will react to the node by partial contact. When set to off, the trigger reacts only if the whole bounding sphere/box gets inside or outside of it. The default is 0.

            Arguments

            • int touch - Touch mode flag: 1 to enable the touch mode, 0 to disable it.

            int isTouch()

            Returns a value indicating if a touch mode is enabled for the trigger. With this mode on, the trigger will react to the node by partial contact. When set to off, the trigger reacts only if the whole bounding sphere/box gets inside or outside of it.

            Return value

            Returns 1 if the touch mode is enabled; otherwise, 0.

            int type()

            Returns the type of the node.

            Return value

            World type identifier.
            Last update: 2018-04-26
            Build: ()