XdkWrl: nurbspositioninterpolator.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# nurbspositioninterpolator.h

Go to the documentation of this file.

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

Generated on 5 Jan 2007 with version 1.5.1. |