Home | Hierarchy | Members | Alphabetical | Related Pages |
00001 #ifndef XDKWRL_SOUND_H 00002 #define XDKWRL_SOUND_H 00003 00004 #include <xdkwrl/node.h> 00005 #include <xdkwrl/fieldtypes/sfbool.h> 00006 #include <xdkwrl/fieldtypes/sffloat.h> 00007 #include <xdkwrl/fieldtypes/sfnode.h> 00008 #include <xdkwrl/fieldtypes/sfvec3f.h> 00009 00010 namespace wrl 00011 { 00012 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00013 // Interface of Sound 00014 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00015 class Sound : public Node 00016 { 00017 public: 00018 Sound(const char* name=""); 00019 virtual ~Sound(); 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 00043 \code 00044 direction.setXYZ(0,0,1); 00045 \endcode 00046 */ 00047 SFVec3f direction; 00048 /*! 00049 * See <a href="#_details" class="md">Detailed Description</a> 00050 * for meaning of this field. 00051 * Default value is set to 00052 \code 00053 intensity = 1; 00054 \endcode 00055 */ 00056 SFFloat intensity; 00057 /*! 00058 * See <a href="#_details" class="md">Detailed Description</a> 00059 * for meaning of this field. 00060 * Default value is set to 00061 \code 00062 location.setXYZ(0,0,0); 00063 \endcode 00064 */ 00065 SFVec3f location; 00066 /*! 00067 * See <a href="#_details" class="md">Detailed Description</a> 00068 * for meaning of this field. 00069 * Default value is set to 00070 \code 00071 maxBack = 10; 00072 \endcode 00073 */ 00074 SFFloat maxBack; 00075 /*! 00076 * See <a href="#_details" class="md">Detailed Description</a> 00077 * for meaning of this field. 00078 * Default value is set to 00079 \code 00080 maxFront = 10; 00081 \endcode 00082 */ 00083 SFFloat maxFront; 00084 /*! 00085 * See <a href="#_details" class="md">Detailed Description</a> 00086 * for meaning of this field. 00087 * Default value is set to 00088 \code 00089 minBack = 1; 00090 \endcode 00091 */ 00092 SFFloat minBack; 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 minFront = 1; 00099 \endcode 00100 */ 00101 SFFloat minFront; 00102 /*! 00103 * See <a href="#_details" class="md">Detailed Description</a> 00104 * for meaning of this field. 00105 * Default value is set to 00106 \code 00107 priority = 0; 00108 \endcode 00109 */ 00110 SFFloat priority; 00111 /*! 00112 * See <a href="#_details" class="md">Detailed Description</a> 00113 * for meaning of this field. 00114 * Default value is set to SFNode default value 00115 */ 00116 SFNode source; 00117 //!@} 00118 /*!@name Fields 00119 * A property or attribute of a node. Each node type has a fixed set 00120 * of fields. Fields may contain various kinds of data and one or many 00121 * values. Each field has a default value. 00122 */ 00123 //!@{ 00124 /*! 00125 * See <a href="#_details" class="md">Detailed Description</a> 00126 * for meaning of this field. 00127 * Default value is set to 00128 \code 00129 spatialize = true; 00130 \endcode 00131 */ 00132 SFBool spatialize; 00133 //!@} 00134 /*!@name Events In 00135 * 00136 */ 00137 //!@{ 00138 /*! 00139 * Set event associated to exposedField direction 00140 */ 00141 EventIn<SFVec3f> set_direction; 00142 /*! 00143 * Set event associated to exposedField intensity 00144 */ 00145 EventIn<SFFloat> set_intensity; 00146 /*! 00147 * Set event associated to exposedField location 00148 */ 00149 EventIn<SFVec3f> set_location; 00150 /*! 00151 * Set event associated to exposedField maxBack 00152 */ 00153 EventIn<SFFloat> set_maxBack; 00154 /*! 00155 * Set event associated to exposedField maxFront 00156 */ 00157 EventIn<SFFloat> set_maxFront; 00158 /*! 00159 * Set event associated to exposedField minBack 00160 */ 00161 EventIn<SFFloat> set_minBack; 00162 /*! 00163 * Set event associated to exposedField minFront 00164 */ 00165 EventIn<SFFloat> set_minFront; 00166 /*! 00167 * Set event associated to exposedField priority 00168 */ 00169 EventIn<SFFloat> set_priority; 00170 /*! 00171 * Set event associated to exposedField source 00172 */ 00173 EventIn<SFNode> set_source; 00174 //!@} 00175 /*!@name Events Out 00176 * 00177 */ 00178 //!@{ 00179 /*! 00180 * Changed event associated to exposedField direction 00181 */ 00182 EventOut<SFVec3f> direction_changed; 00183 /*! 00184 * Changed event associated to exposedField intensity 00185 */ 00186 EventOut<SFFloat> intensity_changed; 00187 /*! 00188 * Changed event associated to exposedField location 00189 */ 00190 EventOut<SFVec3f> location_changed; 00191 /*! 00192 * Changed event associated to exposedField maxBack 00193 */ 00194 EventOut<SFFloat> maxBack_changed; 00195 /*! 00196 * Changed event associated to exposedField maxFront 00197 */ 00198 EventOut<SFFloat> maxFront_changed; 00199 /*! 00200 * Changed event associated to exposedField minBack 00201 */ 00202 EventOut<SFFloat> minBack_changed; 00203 /*! 00204 * Changed event associated to exposedField minFront 00205 */ 00206 EventOut<SFFloat> minFront_changed; 00207 /*! 00208 * Changed event associated to exposedField priority 00209 */ 00210 EventOut<SFFloat> priority_changed; 00211 /*! 00212 * Changed event associated to exposedField source 00213 */ 00214 EventOut<SFNode> source_changed; 00215 //!@} 00216 }; 00217 }; 00218 //************************************************************ 00219 // Implementation of Sound 00220 //************************************************************ 00221 /*! 00222 * Returns <code>"Sound"</code>. Useful for printing. 00223 */ 00224 inline const char* 00225 wrl::Sound::typeName() const 00226 { 00227 return "Sound"; 00228 } 00229 /*! 00230 * Returns the number of fields (exposed or not) for this node type. 00231 */ 00232 inline unsigned int 00233 wrl::Sound::nbFields() const 00234 { 00235 return 10; 00236 } 00237 /*! 00238 * Returns the number of events in for this node type. 00239 */ 00240 inline unsigned int 00241 wrl::Sound::nbEventsIn() const 00242 { 00243 return 0; 00244 } 00245 /*! 00246 * Returns the number of events out for this node type. 00247 */ 00248 inline unsigned int 00249 wrl::Sound::nbEventsOut() const 00250 { 00251 return 0; 00252 } 00253 #endif // XDKWRL_SOUND_H 00254 00255 // Local variables section. 00256 // This is only used by emacs! 00257 // Local Variables: 00258 // ff-search-directories: ("../../" "../../../src/xdkwrl/nodes") 00259 // End:
Generated on 24 Feb 2005 with version 1.3.9.1. |