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