XdkWrl: cylindersensor.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# cylindersensor.h

Go to the documentation of this file.

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

Generated on 5 Jan 2007 with version 1.5.1. |