XdkWrl: navigationinfo.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# navigationinfo.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_NAVIGATIONINFO_H
    00002 #define XDKWRL_NAVIGATIONINFO_H
    00003
    00004 #include <xdkwrl/node.h>
    00005 #include <xdkwrl/fieldtypes/mffloat.h>
    00006 #include <xdkwrl/fieldtypes/mfstring.h>
    00007 #include <xdkwrl/fieldtypes/sfbool.h>
    00008 #include <xdkwrl/fieldtypes/sffloat.h>
    00009
    00010 namespace wrl
    00011 {
    00012   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00013   // Interface of NavigationInfo
    00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00015   class NavigationInfo : public Node
    00016   {
    00017    public:
    00018      NavigationInfo(const char* name="");
    00019      virtual ~NavigationInfo();
    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            avatarSize.push_back(SFFloat(0.25));
    00045     avatarSize.push_back(SFFloat(1.6));
    00046     avatarSize.push_back(SFFloat(0.75));
    00047        \endcode
    00048        */
    00049        MFFloat    avatarSize;
    00050       /*!
    00051        * See <a href="#_details" class="md">Detailed Description</a>
    00052        * for meaning of this field.
    00053        * Default value is set to
    00054        \code
    00055        headlight = true;
    00056        \endcode
    00057        */
    00058        SFBool     headlight;
    00059       /*!
    00060        * See <a href="#_details" class="md">Detailed Description</a>
    00061        * for meaning of this field.
    00062        * Default value is set to
    00063        \code
    00064        speed = 1;
    00065        \endcode
    00066        */
    00067        SFFloat    speed;
    00068       /*!
    00069        * See <a href="#_details" class="md">Detailed Description</a>
    00070        * for meaning of this field.
    00071        * Default value is set to
    00072        \code
    00073
    00074        \endcode
    00075        */
    00076        MFString   type;
    00077       /*!
    00078        * See <a href="#_details" class="md">Detailed Description</a>
    00079        * for meaning of this field.
    00080        * Default value is set to
    00081        \code
    00082        visibilityLimit = 0;
    00083        \endcode
    00084        */
    00085        SFFloat    visibilityLimit;
    00086      //!@}
    00087      /*!@name Fields
    00088       * A property or attribute of a node. Each node type has a fixed set
    00089       * of fields. Fields may contain various kinds of data and one or many
    00090       * values. Each field has a default value.
    00091       */
    00092       //!@{
    00093      //!@}
    00094      /*!@name Events In
    00095       *
    00096       */
    00097       //!@{
    00098       /*!
    00099        * See <a href="#_details" class="md">Detailed Description</a>
    00100        * for meaning of this event.
    00101        */
    00102        EventIn<SFBool>     set_bind;
    00103       /*!
    00104        * Set event associated to exposedField avatarSize
    00105        */
    00106        EventIn<MFFloat>    set_avatarSize;
    00107       /*!
    00108        * Set event associated to exposedField headlight
    00109        */
    00110        EventIn<SFBool>     set_headlight;
    00111       /*!
    00112        * Set event associated to exposedField speed
    00113        */
    00114        EventIn<SFFloat>    set_speed;
    00115       /*!
    00116        * Set event associated to exposedField type
    00117        */
    00118        EventIn<MFString>   set_type;
    00119       /*!
    00120        * Set event associated to exposedField visibilityLimit
    00121        */
    00122        EventIn<SFFloat>    set_visibilityLimit;
    00123   //!@}
    00124      /*!@name Events Out
    00125       *
    00126       */
    00127       //!@{
    00128       /*!
    00129        * See <a href="#_details" class="md">Detailed Description</a>
    00130        * for meaning of this event.
    00131        */
    00132        EventOut<SFBool>     isBound;
    00133       /*!
    00134        * Changed event associated to exposedField avatarSize
    00135        */
    00136        EventOut<MFFloat>    avatarSize_changed;
    00137       /*!
    00138        * Changed event associated to exposedField headlight
    00139        */
    00140        EventOut<SFBool>     headlight_changed;
    00141       /*!
    00142        * Changed event associated to exposedField speed
    00143        */
    00144        EventOut<SFFloat>    speed_changed;
    00145       /*!
    00146        * Changed event associated to exposedField type
    00147        */
    00148        EventOut<MFString>   type_changed;
    00149       /*!
    00150        * Changed event associated to exposedField visibilityLimit
    00151        */
    00152        EventOut<SFFloat>    visibilityLimit_changed;
    00153   //!@}
    00154   };
    00155 };
    00156 //************************************************************
    00157 // Implementation of NavigationInfo
    00158 //************************************************************
    00159 /*!
    00160  * Returns <code>"NavigationInfo"</code>. Useful for printing.
    00161  */
    00162 inline const char*
    00163 wrl::NavigationInfo::typeName() const
    00164 {
    00165   return "NavigationInfo";
    00166 }
    00167 /*!
    00168  * Returns the number of fields (exposed or not) for this node type.
    00169  */
    00170 inline unsigned int
    00171 wrl::NavigationInfo::nbFields() const
    00172 {
    00173    return 5;
    00174 }
    00175 /*!
    00176  * Returns the number of events in for this node type.
    00177  */
    00178 inline unsigned int
    00179 wrl::NavigationInfo::nbEventsIn() const
    00180 {
    00181    return 1;
    00182 }
    00183 /*!
    00184  * Returns the number of events out for this node type.
    00185  */
    00186 inline unsigned int
    00187 wrl::NavigationInfo::nbEventsOut() const
    00188 {
    00189    return 1;
    00190 }
    00191 #endif // XDKWRL_NAVIGATIONINFO_H
    00192
    00193 // Local variables section.
    00194 // This is only used by emacs!
    00195 // Local Variables:
    00196 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00197 // End:

Generated on 28 Jun 2006 with version 1.4.4. |