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

Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!