Home Hierarchy Members Alphabetical Related Pages

elevationgrid.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_ELEVATIONGRID_H
00002 #define XDKWRL_ELEVATIONGRID_H
00003 
00004 #include <xdkwrl/config.h>
00005 #include <xdkwrl/node.h>
00006 #include <xdkwrl/fieldtypes/mffloat.h>
00007 #include <xdkwrl/fieldtypes/sfbool.h>
00008 #include <xdkwrl/fieldtypes/sffloat.h>
00009 #include <xdkwrl/fieldtypes/sfint32.h>
00010 #include <xdkwrl/fieldtypes/sfnode.h>
00011 
00012 namespace wrl
00013 {
00014   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00015   // Interface of ElevationGrid
00016   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00017   class XDKWRL_EXPORT ElevationGrid : public Node
00018   {
00019    public:
00020      ElevationGrid(const char* name="");
00021      virtual ~ElevationGrid();
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 SFNode default value
00045        */
00046        SFNode     color;
00047       /*!
00048        * See <a href="#_details" class="md">Detailed Description</a>
00049        * for meaning of this field.
00050        * Default value is set to SFNode default value
00051        */
00052        SFNode     normal;
00053       /*!
00054        * See <a href="#_details" class="md">Detailed Description</a>
00055        * for meaning of this field.
00056        * Default value is set to SFNode default value
00057        */
00058        SFNode     texCoord;
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    height;
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        ccw = true;
00078         \endcode
00079        */
00080        SFBool     ccw;
00081       /*!
00082        * See <a href="#_details" class="md">Detailed Description</a>
00083        * for meaning of this field.
00084        * Default value is set to 
00085        \code
00086        colorPerVertex = true;
00087         \endcode
00088        */
00089        SFBool     colorPerVertex;
00090       /*!
00091        * See <a href="#_details" class="md">Detailed Description</a>
00092        * for meaning of this field.
00093        * Default value is set to 
00094        \code
00095        creaseAngle = 0.0f;
00096         \endcode
00097        */
00098        SFFloat    creaseAngle;
00099       /*!
00100        * See <a href="#_details" class="md">Detailed Description</a>
00101        * for meaning of this field.
00102        * Default value is set to 
00103        \code
00104        normalPerVertex = true;
00105         \endcode
00106        */
00107        SFBool     normalPerVertex;
00108       /*!
00109        * See <a href="#_details" class="md">Detailed Description</a>
00110        * for meaning of this field.
00111        * Default value is set to 
00112        \code
00113        solid = true;
00114         \endcode
00115        */
00116        SFBool     solid;
00117       /*!
00118        * See <a href="#_details" class="md">Detailed Description</a>
00119        * for meaning of this field.
00120        * Default value is set to 
00121        \code
00122        xDimension = 0;
00123         \endcode
00124        */
00125        SFInt32    xDimension;
00126       /*!
00127        * See <a href="#_details" class="md">Detailed Description</a>
00128        * for meaning of this field.
00129        * Default value is set to 
00130        \code
00131        xSpacing = 1.0f;
00132         \endcode
00133        */
00134        SFFloat    xSpacing;
00135       /*!
00136        * See <a href="#_details" class="md">Detailed Description</a>
00137        * for meaning of this field.
00138        * Default value is set to 
00139        \code
00140        zDimension = 0;
00141         \endcode
00142        */
00143        SFInt32    zDimension;
00144       /*!
00145        * See <a href="#_details" class="md">Detailed Description</a>
00146        * for meaning of this field.
00147        * Default value is set to 
00148        \code
00149        zSpacing = 1.0f;
00150         \endcode
00151        */
00152        SFFloat    zSpacing;
00153      //!@}
00154      /*!@name Events In
00155       * 
00156       */
00157       //!@{
00158       /*!
00159        * See <a href="#_details" class="md">Detailed Description</a>
00160        * for meaning of this event.
00161        */
00162        EventIn<MFFloat>    set_height;
00163       /*!
00164        * Set event associated to exposedField color
00165        */
00166        EventIn<SFNode>     set_color;
00167       /*!
00168        * Set event associated to exposedField normal
00169        */
00170        EventIn<SFNode>     set_normal;
00171       /*!
00172        * Set event associated to exposedField texCoord
00173        */
00174        EventIn<SFNode>     set_texCoord;
00175   //!@}
00176      /*!@name Events Out
00177       * 
00178       */
00179       //!@{
00180       /*!
00181        * Changed event associated to exposedField color
00182        */
00183        EventOut<SFNode>     color_changed;
00184       /*!
00185        * Changed event associated to exposedField normal
00186        */
00187        EventOut<SFNode>     normal_changed;
00188       /*!
00189        * Changed event associated to exposedField texCoord
00190        */
00191        EventOut<SFNode>     texCoord_changed;
00192   //!@}
00193   };
00194 };
00195 //************************************************************
00196 // Implementation of ElevationGrid
00197 //************************************************************
00198 /*!
00199  * Returns <code>"ElevationGrid"</code>. Useful for printing.
00200  */
00201 inline const char*
00202 wrl::ElevationGrid::typeName() const
00203 {
00204   return "ElevationGrid";
00205 }
00206 /*!
00207  * Returns the number of fields (exposed or not) for this node type.
00208  */
00209 inline unsigned int
00210 wrl::ElevationGrid::nbFields() const
00211 {
00212    return 13;
00213 }
00214 /*!
00215  * Returns the number of events in for this node type.
00216  */
00217 inline unsigned int
00218 wrl::ElevationGrid::nbEventsIn() const
00219 {
00220    return 1;
00221 }
00222 /*!
00223  * Returns the number of events out for this node type.
00224  */
00225 inline unsigned int
00226 wrl::ElevationGrid::nbEventsOut() const
00227 {
00228    return 0;
00229 }
00230 #endif // XDKWRL_ELEVATIONGRID_H
00231 
00232 // Local variables section.
00233 // This is only used by emacs!
00234 // Local Variables:
00235 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes")
00236 // End:

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