Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2010, 1:54:49 PM (14 years ago)
Author:
dafrick
Message:

Adding all classes in modules/objects to Objects module (in doxygen).
Created TriggerBase which is the base class of Trigger and MultiTrigger and now provides the shared functionality and data.
Updated some of the documentation in MultiTrigger and Script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h

    r7301 r7601  
    3030    @file DistanceMultiTrigger.h
    3131    @brief Definition of the DistanceMultiTrigger class.
     32    @ingroup MultiTrigger
    3233*/
    3334
     
    3738#include "objects/ObjectsPrereqs.h"
    3839
     40#include <map>
     41
     42#include "core/WeakPtr.h"
     43
    3944#include "worldentities/WorldEntity.h"
    40 #include "core/WeakPtr.h"
    41 #include <map>
    4245
    4346#include "MultiTrigger.h"
     
    4851    /**
    4952    @brief
    50         The DistanceMultiTrigger is a trigger that triggers whenever an object (that is of the specified target type) is in a specified range of the DistanceMultiTrigger. The object can be specified further by adding a DistanceTriggerBeacon (just attaching it) to the objects that can trigger this DistanceMultiTrigger and specify the name of the DistanceTriggerBeacon with the parameter targetname and only objects that have a DistanceTriggerBeacon with that name attached will trigger the DistanceMultiTrigger.
     53        The DistanceMultiTrigger is a MultiTrigger that triggers whenever an object (that is of the specified target type) is in a specified range of the DistanceMultiTrigger. The object can be specified further by adding a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" (by just attaching it) to the objects that can trigger this DistanceMultiTrigger and specify the name of the @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" with the parameter <em>targetname</em> and only objects that have a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" with that name will trigger the DistanceMultiTrigger.
    5154        Parameters are (additional to the ones of MultiTrigger):
    52             'distance', which specifies the maximum distance at which the DistanceMultiTrigger still triggers. Default is 100.
    53             'targetname', which, if not left blank, causes the DistancMultiTrigger to be in single-target mode, meaning, that it only reacts to objects that have a DistanceTriggerBeacon (therefore the target has to be set to DistanceTriggerBeacon for it to work), with the name specified by targetname, attached.
     55        - @b distance Which specifies the maximum distance at which the DistanceMultiTrigger still triggers. Default is 100.
     56        - @b targetname Which, if not left blank, causes the DistancMultiTrigger to be in <em>single-target</em> mode, meaning, that it only reacts to objects that have a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" (therefore the target has to be set to @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" for it to work), with the name specified by <em>targetname</em>, attached.
    5457
    5558        A simple DistanceMultiTrigger would look like this:
     
    5861        @endcode
    5962
    60         An implementation that only reacts to objects with a DistanceTriggerBeacon attached would look like this:
     63        An implementation that only reacts to objects with a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" attached would look like this:
    6164        @code
    6265        <DistanceMultiTrigger position="0,0,0" target="DistanceMultiTrigger" targetname="beacon1" distance="30" />
    6366        @endcode
    64         This particular DistanceMultiTrigger would only react if an object was in range, that had a DistanceTriggerBeacon with the name 'beacon1' attached.
    65     @see MultiTrigger.h
     67        This particular DistanceMultiTrigger would only react if an object was in range, that had a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon" with the name <em>beacon1</em> attached.
     68
     69    @see MultiTrigger
    6670        For more information on MultiTriggers.
     71
    6772    @author
    6873        Damian 'Mozork' Frick
     74
     75    @ingroup MultiTrigger
    6976    */
    7077    class _ObjectsExport DistanceMultiTrigger : public MultiTrigger
     
    106113        private:
    107114            float distance_; //!< The distance at which the DistanceMultiTrigger triggers.
    108             std::string targetName_; //!< The target name, used in singleTargetMode.
    109             bool singleTargetMode_; //!< To indicate whe the MultiDistanceTrigger is in single-target-mode.
     115            std::string targetName_; //!< The target name, used in <em>single-target</em> mode.
     116            bool singleTargetMode_; //!< To indicate whe the MultiDistanceTrigger is in <em>single-target</em> mode.
    110117
    111118            std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
Note: See TracChangeset for help on using the changeset viewer.