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