XdkWrl: nurbscurve.h Source File

Home | Hierarchy | Members | Alphabetical | Related Pages

# nurbscurve.h

Go to the documentation of this file.

    00001 #ifndef XDKWRL_NURBSCURVE_H
    00002 #define XDKWRL_NURBSCURVE_H
    00003
    00004 #include <xdkwrl/node.h>
    00005 #include <xdkwrl/fieldtypes/mffloat.h>
    00006 #include <xdkwrl/fieldtypes/mfvec3f.h>
    00007 #include <xdkwrl/fieldtypes/sfint32.h>
    00008
    00009 namespace wrl
    00010 {
    00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00012   // Interface of NurbsCurve
    00013   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    00014   class NurbsCurve : public Node
    00015   {
    00016    public:
    00017      NurbsCurve(const char* name="");
    00018      virtual ~NurbsCurve();
    00019      virtual inline unsigned int nbFields() const;
    00020      virtual FieldHandle field(const std::string& n);
    00021      virtual FieldHandle field(unsigned int i);
    00022      virtual bool isSetToDefaultValue(unsigned int i) const;
    00023      virtual inline unsigned int nbEventsIn() const;
    00024      virtual EventInHandle eventIn(const std::string& n);
    00025      virtual EventInHandle eventIn(unsigned int i);
    00026      virtual inline unsigned int nbEventsOut() const;
    00027      virtual EventOutHandle eventOut(const std::string& n);
    00028      virtual EventOutHandle eventOut(unsigned int i);
    00029      inline const char* typeName() const;
    00030      virtual Node* duplicate() const;
    00031      virtual Node* duplicate(std::map<const Node*,Node*>&) const;
    00032      /*!@name Exposed Fields
    00033       * A field that is capable of receiving events via an eventIn to
    00034       * change its value(s), and generating events via an eventOut
    00035       * when its value(s) change.
    00036       */
    00037       //!@{
    00038       /*!
    00039        * See <a href="#_details" class="md">Detailed Description</a>
    00040        * for meaning of this field.
    00041        * Default value is set to MFVec3f default value
    00042        */
    00043        MFVec3f    controlPoint;
    00044       /*!
    00045        * See <a href="#_details" class="md">Detailed Description</a>
    00046        * for meaning of this field.
    00047        * Default value is set to MFFloat default value
    00048        */
    00049        MFFloat    weight;
    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        tessellation = 0;
    00056        \endcode
    00057        */
    00058        SFInt32    tessellation;
    00059      //!@}
    00060      /*!@name Fields
    00061       * A property or attribute of a node. Each node type has a fixed set
    00062       * of fields. Fields may contain various kinds of data and one or many
    00063       * values. Each field has a default value.
    00064       */
    00065       //!@{
    00066       /*!
    00067        * See <a href="#_details" class="md">Detailed Description</a>
    00068        * for meaning of this field.
    00069        * Default value is set to MFFloat default value
    00070        */
    00071        MFFloat    knot;
    00072       /*!
    00073        * See <a href="#_details" class="md">Detailed Description</a>
    00074        * for meaning of this field.
    00075        * Default value is set to
    00076        \code
    00077        order = 3;
    00078         \endcode
    00079        */
    00080        SFInt32    order;
    00081      //!@}
    00082      /*!@name Events In
    00083       *
    00084       */
    00085       //!@{
    00086       /*!
    00087        * Set event associated to exposedField controlPoint
    00088        */
    00089        EventIn<MFVec3f>    set_controlPoint;
    00090       /*!
    00091        * Set event associated to exposedField weight
    00092        */
    00093        EventIn<MFFloat>    set_weight;
    00094       /*!
    00095        * Set event associated to exposedField tessellation
    00096        */
    00097        EventIn<SFInt32>    set_tessellation;
    00098   //!@}
    00099      /*!@name Events Out
    00100       *
    00101       */
    00102       //!@{
    00103       /*!
    00104        * Changed event associated to exposedField controlPoint
    00105        */
    00106        EventOut<MFVec3f>    controlPoint_changed;
    00107       /*!
    00108        * Changed event associated to exposedField weight
    00109        */
    00110        EventOut<MFFloat>    weight_changed;
    00111       /*!
    00112        * Changed event associated to exposedField tessellation
    00113        */
    00114        EventOut<SFInt32>    tessellation_changed;
    00115   //!@}
    00116   };
    00117 };
    00118 //************************************************************
    00119 // Implementation of NurbsCurve
    00120 //************************************************************
    00121 /*!
    00122  * Returns <code>"NurbsCurve"</code>. Useful for printing.
    00123  */
    00124 inline const char*
    00125 wrl::NurbsCurve::typeName() const
    00126 {
    00127   return "NurbsCurve";
    00128 }
    00129 /*!
    00130  * Returns the number of fields (exposed or not) for this node type.
    00131  */
    00132 inline unsigned int
    00133 wrl::NurbsCurve::nbFields() const
    00134 {
    00135    return 5;
    00136 }
    00137 /*!
    00138  * Returns the number of events in for this node type.
    00139  */
    00140 inline unsigned int
    00141 wrl::NurbsCurve::nbEventsIn() const
    00142 {
    00143    return 0;
    00144 }
    00145 /*!
    00146  * Returns the number of events out for this node type.
    00147  */
    00148 inline unsigned int
    00149 wrl::NurbsCurve::nbEventsOut() const
    00150 {
    00151    return 0;
    00152 }
    00153 #endif // XDKWRL_NURBSCURVE_H
    00154
    00155 // Local variables section.
    00156 // This is only used by emacs!
    00157 // Local Variables:
    00158 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
    00159 // End:

Generated on 28 Jun 2006 with version 1.4.4. |