XdkWrl: planesensor.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# planesensor.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_PLANESENSOR_H
    00002 #define XDKWRL_PLANESENSOR_H
    00003
    00004 #include <xdkwrl/config.h>
    00005 #include <xdkwrl/node.h>
    00006 #include <xdkwrl/fieldtypes/sfbool.h>
    00007 #include <xdkwrl/fieldtypes/sfvec2f.h>
    00008 #include <xdkwrl/fieldtypes/sfvec3f.h>
    00009
    00010 namespace wrl
    00011 {
    00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00013   // Interface of PlaneSensor
    00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00015   class XDKWRL_EXPORT PlaneSensor : public Node
    00016   {
    00017    public:
    00018      PlaneSensor(const char* name="");
    00019      virtual ~PlaneSensor();
    00020      virtual inline unsigned int nbFields() const;
    00021      virtual FieldHandle field(const std::string& n);
    00022      virtual FieldHandle field(unsigned int i);
    00023      virtual bool isSetToDefaultValue(unsigned int i) const;
    00024      virtual inline unsigned int nbEventsIn() const;
    00025      virtual EventInHandle eventIn(const std::string& n);
    00026      virtual EventInHandle eventIn(unsigned int i);
    00027      virtual inline unsigned int nbEventsOut() const;
    00028      virtual EventOutHandle eventOut(const std::string& n);
    00029      virtual EventOutHandle eventOut(unsigned int i);
    00030      inline const char* typeName() const;
    00031      virtual Node* duplicate() const;
    00032      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
    00033      /*!@name Exposed Fields
    00034       * A field that is capable of receiving events via an eventIn to
    00035       * change its value(s), and generating events via an eventOut
    00036       * when its value(s) change.
    00037       */
    00038       //!@{
    00039       /*!
    00040        * See <a href="#_details" class="md">Detailed Description</a>
    00041        * for meaning of this field.
    00042        * Default value is set to
    00043        \code
    00044        autoOffset = true;
    00045        \endcode
    00046        */
    00047        SFBool     autoOffset;
    00048       /*!
    00049        * See <a href="#_details" class="md">Detailed Description</a>
    00050        * for meaning of this field.
    00051        * Default value is set to
    00052        \code
    00053        enabled = true;
    00054        \endcode
    00055        */
    00056        SFBool     enabled;
    00057       /*!
    00058        * See <a href="#_details" class="md">Detailed Description</a>
    00059        * for meaning of this field.
    00060        * Default value is set to
    00061        \code
    00062        maxPosition.setXY(-1,-1);
    00063        \endcode
    00064        */
    00065        SFVec2f    maxPosition;
    00066       /*!
    00067        * See <a href="#_details" class="md">Detailed Description</a>
    00068        * for meaning of this field.
    00069        * Default value is set to
    00070        \code
    00071        minPosition.setXY(0,0);
    00072        \endcode
    00073        */
    00074        SFVec2f    minPosition;
    00075       /*!
    00076        * See <a href="#_details" class="md">Detailed Description</a>
    00077        * for meaning of this field.
    00078        * Default value is set to
    00079        \code
    00080        offset.setXYZ(0,0,0);
    00081        \endcode
    00082        */
    00083        SFVec3f    offset;
    00084      //!@}
    00085      /*!@name Fields
    00086       * A property or attribute of a node. Each node type has a fixed set
    00087       * of fields. Fields may contain various kinds of data and one or many
    00088       * values. Each field has a default value.
    00089       */
    00090       //!@{
    00091      //!@}
    00092      /*!@name Events In
    00093       *
    00094       */
    00095       //!@{
    00096       /*!
    00097        * Set event associated to exposedField autoOffset
    00098        */
    00099        EventIn<SFBool>     set_autoOffset;
    00100       /*!
    00101        * Set event associated to exposedField enabled
    00102        */
    00103        EventIn<SFBool>     set_enabled;
    00104       /*!
    00105        * Set event associated to exposedField maxPosition
    00106        */
    00107        EventIn<SFVec2f>    set_maxPosition;
    00108       /*!
    00109        * Set event associated to exposedField minPosition
    00110        */
    00111        EventIn<SFVec2f>    set_minPosition;
    00112       /*!
    00113        * Set event associated to exposedField offset
    00114        */
    00115        EventIn<SFVec3f>    set_offset;
    00116   //!@}
    00117      /*!@name Events Out
    00118       *
    00119       */
    00120       //!@{
    00121       /*!
    00122        * See <a href="#_details" class="md">Detailed Description</a>
    00123        * for meaning of this event.
    00124        */
    00125        EventOut<SFBool>     isActive;
    00126       /*!
    00127        * See <a href="#_details" class="md">Detailed Description</a>
    00128        * for meaning of this event.
    00129        */
    00130        EventOut<SFVec3f>    trackPoint_changed;
    00131       /*!
    00132        * See <a href="#_details" class="md">Detailed Description</a>
    00133        * for meaning of this event.
    00134        */
    00135        EventOut<SFVec3f>    translation_changed;
    00136       /*!
    00137        * Changed event associated to exposedField autoOffset
    00138        */
    00139        EventOut<SFBool>     autoOffset_changed;
    00140       /*!
    00141        * Changed event associated to exposedField enabled
    00142        */
    00143        EventOut<SFBool>     enabled_changed;
    00144       /*!
    00145        * Changed event associated to exposedField maxPosition
    00146        */
    00147        EventOut<SFVec2f>    maxPosition_changed;
    00148       /*!
    00149        * Changed event associated to exposedField minPosition
    00150        */
    00151        EventOut<SFVec2f>    minPosition_changed;
    00152       /*!
    00153        * Changed event associated to exposedField offset
    00154        */
    00155        EventOut<SFVec3f>    offset_changed;
    00156   //!@}
    00157   };
    00158 };
    00159 //************************************************************
    00160 // Implementation of PlaneSensor
    00161 //************************************************************
    00162 /*!
    00163  * Returns <code>"PlaneSensor"</code>. Useful for printing.
    00164  */
    00165 inline const char*
    00166 wrl::PlaneSensor::typeName() const
    00167 {
    00168   return "PlaneSensor";
    00169 }
    00170 /*!
    00171  * Returns the number of fields (exposed or not) for this node type.
    00172  */
    00173 inline unsigned int
    00174 wrl::PlaneSensor::nbFields() const
    00175 {
    00176    return 5;
    00177 }
    00178 /*!
    00179  * Returns the number of events in for this node type.
    00180  */
    00181 inline unsigned int
    00182 wrl::PlaneSensor::nbEventsIn() const
    00183 {
    00184    return 0;
    00185 }
    00186 /*!
    00187  * Returns the number of events out for this node type.
    00188  */
    00189 inline unsigned int
    00190 wrl::PlaneSensor::nbEventsOut() const
    00191 {
    00192    return 3;
    00193 }
    00194 #endif // XDKWRL_PLANESENSOR_H
    00195
    00196 // Local variables section.
    00197 // This is only used by emacs!
    00198 // Local Variables:
    00199 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00200 // End:

Generated on 5 Jan 2007 with version 1.5.1. |