XdkWrl: geoviewpoint.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# geoviewpoint.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_GEOVIEWPOINT_H
    00002 #define XDKWRL_GEOVIEWPOINT_H
    00003
    00004 #include <xdkwrl/node.h>
    00005 #include <xdkwrl/fieldtypes/mfstring.h>
    00006 #include <xdkwrl/fieldtypes/sfbool.h>
    00007 #include <xdkwrl/fieldtypes/sffloat.h>
    00008 #include <xdkwrl/fieldtypes/sfnode.h>
    00009 #include <xdkwrl/fieldtypes/sfrotation.h>
    00010 #include <xdkwrl/fieldtypes/sfstring.h>
    00011 #include <xdkwrl/fieldtypes/sftime.h>
    00012
    00013 namespace wrl
    00014 {
    00015   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00016   // Interface of GeoViewpoint
    00017   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00018   class GeoViewpoint : public Node
    00019   {
    00020    public:
    00021      GeoViewpoint(const char* name="");
    00022      virtual ~GeoViewpoint();
    00023      virtual inline unsigned int nbFields() const;
    00024      virtual FieldHandle field(const std::string& n);
    00025      virtual FieldHandle field(unsigned int i);
    00026      virtual bool isSetToDefaultValue(unsigned int i) const;
    00027      virtual inline unsigned int nbEventsIn() const;
    00028      virtual EventInHandle eventIn(const std::string& n);
    00029      virtual EventInHandle eventIn(unsigned int i);
    00030      virtual inline unsigned int nbEventsOut() const;
    00031      virtual EventOutHandle eventOut(const std::string& n);
    00032      virtual EventOutHandle eventOut(unsigned int i);
    00033      inline const char* typeName() const;
    00034      virtual Node* duplicate() const;
    00035      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
    00036      /*!@name Exposed Fields
    00037       * A field that is capable of receiving events via an eventIn to
    00038       * change its value(s), and generating events via an eventOut
    00039       * when its value(s) change.
    00040       */
    00041       //!@{
    00042       /*!
    00043        * See <a href="#_details" class="md">Detailed Description</a>
    00044        * for meaning of this field.
    00045        * Default value is set to
    00046        \code
    00047        fieldOfView = 0.785398;
    00048        \endcode
    00049        */
    00050        SFFloat    fieldOfView;
    00051       /*!
    00052        * See <a href="#_details" class="md">Detailed Description</a>
    00053        * for meaning of this field.
    00054        * Default value is set to
    00055        \code
    00056        headlight = true;
    00057        \endcode
    00058        */
    00059        SFBool     headlight;
    00060       /*!
    00061        * See <a href="#_details" class="md">Detailed Description</a>
    00062        * for meaning of this field.
    00063        * Default value is set to
    00064        \code
    00065        jump = true;
    00066        \endcode
    00067        */
    00068        SFBool     jump;
    00069       /*!
    00070        * See <a href="#_details" class="md">Detailed Description</a>
    00071        * for meaning of this field.
    00072        * Default value is set to
    00073        \code
    00074
    00075        \endcode
    00076        */
    00077        MFString   navType;
    00078      //!@}
    00079      /*!@name Fields
    00080       * A property or attribute of a node. Each node type has a fixed set
    00081       * of fields. Fields may contain various kinds of data and one or many
    00082       * values. Each field has a default value.
    00083       */
    00084       //!@{
    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        description = string("");
    00091         \endcode
    00092        */
    00093        SFString   description;
    00094       /*!
    00095        * See <a href="#_details" class="md">Detailed Description</a>
    00096        * for meaning of this field.
    00097        * Default value is set to SFNode default value
    00098        */
    00099        SFNode     geoOrigin;
    00100       /*!
    00101        * See <a href="#_details" class="md">Detailed Description</a>
    00102        * for meaning of this field.
    00103        * Default value is set to
    00104        \code
    00105
    00106         \endcode
    00107        */
    00108        MFString   geoSystem;
    00109       /*!
    00110        * See <a href="#_details" class="md">Detailed Description</a>
    00111        * for meaning of this field.
    00112        * Default value is set to
    00113        \code
    00114        orientation.setAxisAndAngle(0,0,1,0);
    00115         \endcode
    00116        */
    00117        SFRotation orientation;
    00118       /*!
    00119        * See <a href="#_details" class="md">Detailed Description</a>
    00120        * for meaning of this field.
    00121        * Default value is set to
    00122        \code
    00123        position = string("0 0 100000");
    00124         \endcode
    00125        */
    00126        SFString   position;
    00127       /*!
    00128        * See <a href="#_details" class="md">Detailed Description</a>
    00129        * for meaning of this field.
    00130        * Default value is set to
    00131        \code
    00132        speedFactor = 1;
    00133         \endcode
    00134        */
    00135        SFFloat    speedFactor;
    00136      //!@}
    00137      /*!@name Events In
    00138       *
    00139       */
    00140       //!@{
    00141       /*!
    00142        * See <a href="#_details" class="md">Detailed Description</a>
    00143        * for meaning of this event.
    00144        */
    00145        EventIn<SFBool>     set_bind;
    00146       /*!
    00147        * See <a href="#_details" class="md">Detailed Description</a>
    00148        * for meaning of this event.
    00149        */
    00150        EventIn<SFString>   set_orientation;
    00151       /*!
    00152        * See <a href="#_details" class="md">Detailed Description</a>
    00153        * for meaning of this event.
    00154        */
    00155        EventIn<SFString>   set_position;
    00156       /*!
    00157        * Set event associated to exposedField fieldOfView
    00158        */
    00159        EventIn<SFFloat>    set_fieldOfView;
    00160       /*!
    00161        * Set event associated to exposedField headlight
    00162        */
    00163        EventIn<SFBool>     set_headlight;
    00164       /*!
    00165        * Set event associated to exposedField jump
    00166        */
    00167        EventIn<SFBool>     set_jump;
    00168       /*!
    00169        * Set event associated to exposedField navType
    00170        */
    00171        EventIn<MFString>   set_navType;
    00172   //!@}
    00173      /*!@name Events Out
    00174       *
    00175       */
    00176       //!@{
    00177       /*!
    00178        * See <a href="#_details" class="md">Detailed Description</a>
    00179        * for meaning of this event.
    00180        */
    00181        EventOut<SFTime>     bindTime;
    00182       /*!
    00183        * See <a href="#_details" class="md">Detailed Description</a>
    00184        * for meaning of this event.
    00185        */
    00186        EventOut<SFBool>     isBound;
    00187       /*!
    00188        * Changed event associated to exposedField fieldOfView
    00189        */
    00190        EventOut<SFFloat>    fieldOfView_changed;
    00191       /*!
    00192        * Changed event associated to exposedField headlight
    00193        */
    00194        EventOut<SFBool>     headlight_changed;
    00195       /*!
    00196        * Changed event associated to exposedField jump
    00197        */
    00198        EventOut<SFBool>     jump_changed;
    00199       /*!
    00200        * Changed event associated to exposedField navType
    00201        */
    00202        EventOut<MFString>   navType_changed;
    00203   //!@}
    00204   };
    00205 };
    00206 //************************************************************
    00207 // Implementation of GeoViewpoint
    00208 //************************************************************
    00209 /*!
    00210  * Returns <code>"GeoViewpoint"</code>. Useful for printing.
    00211  */
    00212 inline const char*
    00213 wrl::GeoViewpoint::typeName() const
    00214 {
    00215   return "GeoViewpoint";
    00216 }
    00217 /*!
    00218  * Returns the number of fields (exposed or not) for this node type.
    00219  */
    00220 inline unsigned int
    00221 wrl::GeoViewpoint::nbFields() const
    00222 {
    00223    return 10;
    00224 }
    00225 /*!
    00226  * Returns the number of events in for this node type.
    00227  */
    00228 inline unsigned int
    00229 wrl::GeoViewpoint::nbEventsIn() const
    00230 {
    00231    return 3;
    00232 }
    00233 /*!
    00234  * Returns the number of events out for this node type.
    00235  */
    00236 inline unsigned int
    00237 wrl::GeoViewpoint::nbEventsOut() const
    00238 {
    00239    return 2;
    00240 }
    00241 #endif // XDKWRL_GEOVIEWPOINT_H
    00242
    00243 // Local variables section.
    00244 // This is only used by emacs!
    00245 // Local Variables:
    00246 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00247 // End:

Generated on 28 Jun 2006 with version 1.4.4. |