Home Hierarchy Members Alphabetical Related Pages

extrusion.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_EXTRUSION_H
00002 #define XDKWRL_EXTRUSION_H
00003 
00004 #include <xdkwrl/config.h>
00005 #include <xdkwrl/node.h>
00006 #include <xdkwrl/fieldtypes/mfrotation.h>
00007 #include <xdkwrl/fieldtypes/mfvec2f.h>
00008 #include <xdkwrl/fieldtypes/mfvec3f.h>
00009 #include <xdkwrl/fieldtypes/sfbool.h>
00010 #include <xdkwrl/fieldtypes/sffloat.h>
00011 
00012 namespace wrl
00013 {
00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00015   // Interface of Extrusion
00016   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00017   class XDKWRL_EXPORT Extrusion : public Node
00018   {
00019    public:
00020      Extrusion(const char* name="");
00021      virtual ~Extrusion();
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      /*!@name Fields
00043       * A property or attribute of a node. Each node type has a fixed set
00044       * of fields. Fields may contain various kinds of data and one or many
00045       * values. Each field has a default value.
00046       */
00047       //!@{
00048       /*!
00049        * See <a href="#_details" class="md">Detailed Description</a>
00050        * for meaning of this field.
00051        * Default value is set to 
00052        \code
00053        beginCap = true;
00054         \endcode
00055        */
00056        SFBool     beginCap;
00057       /*!
00058        * See <a href="#_details" class="md">Detailed Description</a>
00059        * for meaning of this field.
00060        * Default value is set to 
00061        \code
00062        ccw = true;
00063         \endcode
00064        */
00065        SFBool     ccw;
00066       /*!
00067        * See <a href="#_details" class="md">Detailed Description</a>
00068        * for meaning of this field.
00069        * Default value is set to 
00070        \code
00071        convex = true;
00072         \endcode
00073        */
00074        SFBool     convex;
00075       /*!
00076        * See <a href="#_details" class="md">Detailed Description</a>
00077        * for meaning of this field.
00078        * Default value is set to 
00079        \code
00080        creaseAngle = 0.0f;
00081         \endcode
00082        */
00083        SFFloat    creaseAngle;
00084       /*!
00085        * See <a href="#_details" class="md">Detailed Description</a>
00086        * for meaning of this field.
00087        * Default value is set to 
00088        \code
00089            crossSection.push_back(SFVec2f(1,1));
00090     crossSection.push_back(SFVec2f(1,-1));
00091     crossSection.push_back(SFVec2f(-1,-1));
00092     crossSection.push_back(SFVec2f(-1,1));
00093     crossSection.push_back(SFVec2f(1,1));
00094         \endcode
00095        */
00096        MFVec2f    crossSection;
00097       /*!
00098        * See <a href="#_details" class="md">Detailed Description</a>
00099        * for meaning of this field.
00100        * Default value is set to 
00101        \code
00102        endCap = true;
00103         \endcode
00104        */
00105        SFBool     endCap;
00106       /*!
00107        * See <a href="#_details" class="md">Detailed Description</a>
00108        * for meaning of this field.
00109        * Default value is set to 
00110        \code
00111            orientation.push_back(SFRotation(0,0,1,0));
00112         \endcode
00113        */
00114        MFRotation orientation;
00115       /*!
00116        * See <a href="#_details" class="md">Detailed Description</a>
00117        * for meaning of this field.
00118        * Default value is set to 
00119        \code
00120            scale.push_back(SFVec2f(1,1));
00121         \endcode
00122        */
00123        MFVec2f    scale;
00124       /*!
00125        * See <a href="#_details" class="md">Detailed Description</a>
00126        * for meaning of this field.
00127        * Default value is set to 
00128        \code
00129        solid = true;
00130         \endcode
00131        */
00132        SFBool     solid;
00133       /*!
00134        * See <a href="#_details" class="md">Detailed Description</a>
00135        * for meaning of this field.
00136        * Default value is set to 
00137        \code
00138            spine.push_back(SFVec3f(0,0,0));
00139     spine.push_back(SFVec3f(0,1,0));
00140         \endcode
00141        */
00142        MFVec3f    spine;
00143      //!@}
00144      /*!@name Events In
00145       * 
00146       */
00147       //!@{
00148       /*!
00149        * See <a href="#_details" class="md">Detailed Description</a>
00150        * for meaning of this event.
00151        */
00152        EventIn<MFVec2f>    set_crossSection;
00153       /*!
00154        * See <a href="#_details" class="md">Detailed Description</a>
00155        * for meaning of this event.
00156        */
00157        EventIn<MFRotation> set_orientation;
00158       /*!
00159        * See <a href="#_details" class="md">Detailed Description</a>
00160        * for meaning of this event.
00161        */
00162        EventIn<MFVec2f>    set_scale;
00163       /*!
00164        * See <a href="#_details" class="md">Detailed Description</a>
00165        * for meaning of this event.
00166        */
00167        EventIn<MFVec3f>    set_spine;
00168   //!@}
00169      /*!@name Events Out
00170       * 
00171       */
00172       //!@{
00173   //!@}
00174   };
00175 };
00176 //************************************************************
00177 // Implementation of Extrusion
00178 //************************************************************
00179 /*!
00180  * Returns <code>"Extrusion"</code>. Useful for printing.
00181  */
00182 inline const char*
00183 wrl::Extrusion::typeName() const
00184 {
00185   return "Extrusion";
00186 }
00187 /*!
00188  * Returns the number of fields (exposed or not) for this node type.
00189  */
00190 inline unsigned int
00191 wrl::Extrusion::nbFields() const
00192 {
00193    return 10;
00194 }
00195 /*!
00196  * Returns the number of events in for this node type.
00197  */
00198 inline unsigned int
00199 wrl::Extrusion::nbEventsIn() const
00200 {
00201    return 4;
00202 }
00203 /*!
00204  * Returns the number of events out for this node type.
00205  */
00206 inline unsigned int
00207 wrl::Extrusion::nbEventsOut() const
00208 {
00209    return 0;
00210 }
00211 #endif // XDKWRL_EXTRUSION_H
00212 
00213 // Local variables section.
00214 // This is only used by emacs!
00215 // Local Variables:
00216 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
00217 // End:

Generated on 5 Jan 2007 with doxygen version 1.5.1. Valid HTML 4.0! Valid CSS!