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