Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_BACKGROUND_H 00002 #define XDKWRL_BACKGROUND_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/mfcolor.h> 00006 #include <xdkwrl/fieldtypes/mffloat.h> 00007 #include <xdkwrl/fieldtypes/mfstring.h> 00008 #include <xdkwrl/fieldtypes/sfbool.h> 00009 00010 namespace wrl 00011 { 00012 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00013 // Interface of Background 00014 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00015 class Background : public Node 00016 { 00017 public: 00018 Background(const char* name=""); 00019 virtual ~Background(); 00020 virtual inline unsigned int nbFields() const; 00021 virtual FieldHandle field(const std::string& n); 00022 virtual FieldHandle field(const unsigned int i); 00023 virtual bool isSetToDefaultValue(const unsigned int i) const; 00024 virtual inline unsigned int nbEventsIn() const; 00025 virtual EventInHandle eventIn(const std::string& n); 00026 virtual EventInHandle eventIn(const unsigned int i); 00027 virtual inline unsigned int nbEventsOut() const; 00028 virtual EventOutHandle eventOut(const std::string& n); 00029 virtual EventOutHandle eventOut(const unsigned int i); 00030 inline const char* typeName() const; 00031 virtual Node* duplicate() const; 00032 virtual Node* duplicate(std::map<const Node*,Node*>&) const; 00033 /*!@name Exposed Fields 00034 * A field that is capable of receiving events via an eventIn to 00035 * change its value(s), and generating events via an eventOut 00036 * when its value(s) change. 00037 */ 00038 //!@{ 00039 /*! 00040 * See <a href="#_details" class="md">Detailed Description</a> 00041 * for meaning of this field. 00042 * Default value is set to MFFloat default value 00043 */ 00044 MFFloat groundAngle; 00045 /*! 00046 * See <a href="#_details" class="md">Detailed Description</a> 00047 * for meaning of this field. 00048 * Default value is set to MFColor default value 00049 */ 00050 MFColor groundColor; 00051 /*! 00052 * See <a href="#_details" class="md">Detailed Description</a> 00053 * for meaning of this field. 00054 * Default value is set to MFString default value 00055 */ 00056 MFString backUrl; 00057 /*! 00058 * See <a href="#_details" class="md">Detailed Description</a> 00059 * for meaning of this field. 00060 * Default value is set to MFString default value 00061 */ 00062 MFString bottomUrl; 00063 /*! 00064 * See <a href="#_details" class="md">Detailed Description</a> 00065 * for meaning of this field. 00066 * Default value is set to MFString default value 00067 */ 00068 MFString frontUrl; 00069 /*! 00070 * See <a href="#_details" class="md">Detailed Description</a> 00071 * for meaning of this field. 00072 * Default value is set to MFString default value 00073 */ 00074 MFString leftUrl; 00075 /*! 00076 * See <a href="#_details" class="md">Detailed Description</a> 00077 * for meaning of this field. 00078 * Default value is set to MFString default value 00079 */ 00080 MFString rightUrl; 00081 /*! 00082 * See <a href="#_details" class="md">Detailed Description</a> 00083 * for meaning of this field. 00084 * Default value is set to MFString default value 00085 */ 00086 MFString topUrl; 00087 /*! 00088 * See <a href="#_details" class="md">Detailed Description</a> 00089 * for meaning of this field. 00090 * Default value is set to MFFloat default value 00091 */ 00092 MFFloat skyAngle; 00093 /*! 00094 * See <a href="#_details" class="md">Detailed Description</a> 00095 * for meaning of this field. 00096 * Default value is set to 00097 \code 00098 skyColor.push_back(SFColor(0,0,0)); 00099 \endcode 00100 */ 00101 MFColor skyColor; 00102 //!@} 00103 /*!@name Fields 00104 * A property or attribute of a node. Each node type has a fixed set 00105 * of fields. Fields may contain various kinds of data and one or many 00106 * values. Each field has a default value. 00107 */ 00108 //!@{ 00109 //!@} 00110 /*!@name Events In 00111 * 00112 */ 00113 //!@{ 00114 /*! 00115 * See <a href="#_details" class="md">Detailed Description</a> 00116 * for meaning of this event. 00117 */ 00118 EventIn<SFBool> set_bind; 00119 /*! 00120 * Set event associated to exposedField groundAngle 00121 */ 00122 EventIn<MFFloat> set_groundAngle; 00123 /*! 00124 * Set event associated to exposedField groundColor 00125 */ 00126 EventIn<MFColor> set_groundColor; 00127 /*! 00128 * Set event associated to exposedField backUrl 00129 */ 00130 EventIn<MFString> set_backUrl; 00131 /*! 00132 * Set event associated to exposedField bottomUrl 00133 */ 00134 EventIn<MFString> set_bottomUrl; 00135 /*! 00136 * Set event associated to exposedField frontUrl 00137 */ 00138 EventIn<MFString> set_frontUrl; 00139 /*! 00140 * Set event associated to exposedField leftUrl 00141 */ 00142 EventIn<MFString> set_leftUrl; 00143 /*! 00144 * Set event associated to exposedField rightUrl 00145 */ 00146 EventIn<MFString> set_rightUrl; 00147 /*! 00148 * Set event associated to exposedField topUrl 00149 */ 00150 EventIn<MFString> set_topUrl; 00151 /*! 00152 * Set event associated to exposedField skyAngle 00153 */ 00154 EventIn<MFFloat> set_skyAngle; 00155 /*! 00156 * Set event associated to exposedField skyColor 00157 */ 00158 EventIn<MFColor> set_skyColor; 00159 //!@} 00160 /*!@name Events Out 00161 * 00162 */ 00163 //!@{ 00164 /*! 00165 * See <a href="#_details" class="md">Detailed Description</a> 00166 * for meaning of this event. 00167 */ 00168 EventOut<SFBool> isBound; 00169 /*! 00170 * Changed event associated to exposedField groundAngle 00171 */ 00172 EventOut<MFFloat> groundAngle_changed; 00173 /*! 00174 * Changed event associated to exposedField groundColor 00175 */ 00176 EventOut<MFColor> groundColor_changed; 00177 /*! 00178 * Changed event associated to exposedField backUrl 00179 */ 00180 EventOut<MFString> backUrl_changed; 00181 /*! 00182 * Changed event associated to exposedField bottomUrl 00183 */ 00184 EventOut<MFString> bottomUrl_changed; 00185 /*! 00186 * Changed event associated to exposedField frontUrl 00187 */ 00188 EventOut<MFString> frontUrl_changed; 00189 /*! 00190 * Changed event associated to exposedField leftUrl 00191 */ 00192 EventOut<MFString> leftUrl_changed; 00193 /*! 00194 * Changed event associated to exposedField rightUrl 00195 */ 00196 EventOut<MFString> rightUrl_changed; 00197 /*! 00198 * Changed event associated to exposedField topUrl 00199 */ 00200 EventOut<MFString> topUrl_changed; 00201 /*! 00202 * Changed event associated to exposedField skyAngle 00203 */ 00204 EventOut<MFFloat> skyAngle_changed; 00205 /*! 00206 * Changed event associated to exposedField skyColor 00207 */ 00208 EventOut<MFColor> skyColor_changed; 00209 //!@} 00210 }; 00211 }; 00212 //************************************************************ 00213 // Implementation of Background 00214 //************************************************************ 00215 /*! 00216 * Returns <code>"Background"</code>. Useful for printing. 00217 */ 00218 inline const char* 00219 wrl::Background::typeName() const 00220 { 00221 return "Background"; 00222 } 00223 /*! 00224 * Returns the number of fields (exposed or not) for this node type. 00225 */ 00226 inline unsigned int 00227 wrl::Background::nbFields() const 00228 { 00229 return 10; 00230 } 00231 /*! 00232 * Returns the number of events in for this node type. 00233 */ 00234 inline unsigned int 00235 wrl::Background::nbEventsIn() const 00236 { 00237 return 1; 00238 } 00239 /*! 00240 * Returns the number of events out for this node type. 00241 */ 00242 inline unsigned int 00243 wrl::Background::nbEventsOut() const 00244 { 00245 return 1; 00246 } 00247 #endif // XDKWRL_BACKGROUND_H 00248 00249 // Local variables section. 00250 // This is only used by emacs! 00251 // Local Variables: 00252 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00253 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |